{ "version": 3, "sources": ["../../../node_modules/base64-js/index.js", "../../../node_modules/ieee754/index.js", "../../../node_modules/buffer/index.js", "../../../node_modules/lodash/lodash.js", "../../../node_modules/string-natural-compare/natural-compare.js", "../../../node_modules/list.js/src/utils/get-by-class.js", "../../../node_modules/list.js/src/utils/extend.js", "../../../node_modules/list.js/src/utils/index-of.js", "../../../node_modules/list.js/src/utils/to-array.js", "../../../node_modules/list.js/src/utils/events.js", "../../../node_modules/list.js/src/utils/to-string.js", "../../../node_modules/list.js/src/utils/classes.js", "../../../node_modules/list.js/src/utils/get-attribute.js", "../../../node_modules/list.js/src/item.js", "../../../node_modules/list.js/src/add-async.js", "../../../node_modules/list.js/src/pagination.js", "../../../node_modules/list.js/src/parse.js", "../../../node_modules/list.js/src/templater.js", "../../../node_modules/list.js/src/search.js", "../../../node_modules/list.js/src/filter.js", "../../../node_modules/list.js/src/sort.js", "../../../node_modules/list.js/src/utils/fuzzy.js", "../../../node_modules/list.js/src/fuzzy-search.js", "../../../node_modules/list.js/src/index.js", "../../../node_modules/isomorphic-localstorage/browser.js", "../../../node_modules/cross-fetch/dist/browser-ponyfill.js", "../../../node_modules/eventemitter3/index.js", "../../../node_modules/@lit/reactive-element/src/css-tag.ts", "../../../node_modules/@lit/reactive-element/src/reactive-element.ts", "../../../node_modules/lit-html/src/lit-html.ts", "../../../node_modules/lit-element/src/lit-element.ts", "../../../node_modules/lit/index.js", "../../../node_modules/@lit/reactive-element/src/decorators/custom-element.ts", "../../../node_modules/@lit/reactive-element/src/decorators/property.ts", "../../../node_modules/@lit/reactive-element/src/decorators/state.ts", "../../../node_modules/@lit/reactive-element/src/decorators/query-assigned-elements.ts", "../../../node_modules/lit/decorators.js", "../../../node_modules/lit-html/src/directive.ts", "../../../node_modules/lit-html/src/directives/style-map.ts", "../../../node_modules/lit/directives/style-map.js", "../../../node_modules/qrcode-generator/qrcode.js", "../../../node_modules/@nightlylabs/qr-code/src/generator/parts.ts", "../../../node_modules/@nightlylabs/qr-code/src/utils/types.ts", "../../../node_modules/@nightlylabs/qr-code/src/utils/utils.ts", "../../../node_modules/@nightlylabs/qr-code/src/utils/consts.ts", "../../../node_modules/@nightlylabs/qr-code/src/generator/index.ts", "../../../node_modules/node_modules/.pnpm/@rollup+plugin-typescript@11.1.1_rollup@3.23.1_tslib@2.5.3_typescript@5.0.2/node_modules/tslib/tslib.es6.js", "../../../node_modules/@nightlylabs/src/shared/tailwind.element.ts", "../../../node_modules/@nightlylabs/src/utils/types.ts", "../../../node_modules/@nightlylabs/src/utils/images.ts", "../../../node_modules/node_modules/.pnpm/lit-html@2.7.4/node_modules/lit-html/lit-html.js", "../../../node_modules/node_modules/.pnpm/lit-html@2.7.4/node_modules/lit-html/static.js", "../../../node_modules/@nightlylabs/src/components/nightly-wallet-selector-item/nightly-wallet-selector-item.ts", "../../../node_modules/@nightlylabs/src/utils/utils.ts", "../../../node_modules/@nightlylabs/src/components/nightly-wallet-selector-page/nightly-wallet-selector-page.ts", "../../../node_modules/@nightlylabs/src/components/nightly-desktop-main/nightly-desktop-main.ts", "../../../node_modules/@nightlylabs/src/components/nightly-connect-wallet/nightly-connect-wallet.ts", "../../../node_modules/@nightlylabs/src/components/nightly-header/nightly-header.ts", "../../../node_modules/@nightlylabs/src/components/nightly-mobile-all-wallets/nightly-mobile-all-wallets.ts", "../../../node_modules/@nightlylabs/src/components/nightly-mobile-qr/nightly-mobile-qr.ts", "../../../node_modules/@nightlylabs/src/components/nightly-mobile-main/nightly-mobile-main.ts", "../../../node_modules/@nightlylabs/src/components/nightly-selector/nightly-selector.ts", "../../../node_modules/@nightlylabs/src/index.ts", "../../../node_modules/bn.js/lib/bn.js", "../../../node_modules/@polkadot/wasm-crypto-wasm/cjs/bytes.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto-wasm/cjs/bytes.js", "../../../node_modules/react/cjs/react.development.js", "../../../node_modules/react/index.js", "../../../node_modules/react/cjs/react-jsx-runtime.development.js", "../../../node_modules/react/jsx-runtime.js", "webpack://secretjs/webpack/universalModuleDefinition", "webpack://secretjs/node_modules/@cosmjs/encoding/build/ascii.js", "webpack://secretjs/node_modules/@cosmjs/encoding/build/base64.js", "webpack://secretjs/node_modules/@cosmjs/encoding/build/bech32.js", "webpack://secretjs/node_modules/@cosmjs/encoding/build/hex.js", "webpack://secretjs/node_modules/@cosmjs/encoding/build/index.js", "webpack://secretjs/node_modules/@cosmjs/encoding/build/rfc3339.js", "webpack://secretjs/node_modules/@cosmjs/encoding/build/utf8.js", "webpack://secretjs/node_modules/@cosmjs/encoding/node_modules/bech32/index.js", "webpack://secretjs/node_modules/@noble/hashes/_sha2.js", "webpack://secretjs/node_modules/@noble/hashes/_u64.js", "webpack://secretjs/node_modules/@noble/hashes/cryptoBrowser.js", "webpack://secretjs/node_modules/@noble/hashes/hkdf.js", "webpack://secretjs/node_modules/@noble/hashes/hmac.js", "webpack://secretjs/node_modules/@noble/hashes/ripemd160.js", "webpack://secretjs/node_modules/@noble/hashes/sha256.js", "webpack://secretjs/node_modules/@noble/hashes/sha3.js", "webpack://secretjs/node_modules/@noble/hashes/utils.js", "webpack://secretjs/node_modules/@noble/secp256k1/lib/index.js", "webpack://secretjs/node_modules/@protobufjs/aspromise/index.js", "webpack://secretjs/node_modules/@protobufjs/base64/index.js", "webpack://secretjs/node_modules/@protobufjs/eventemitter/index.js", "webpack://secretjs/node_modules/@protobufjs/float/index.js", "webpack://secretjs/node_modules/@protobufjs/inquire/index.js", "webpack://secretjs/node_modules/@protobufjs/pool/index.js", "webpack://secretjs/node_modules/@protobufjs/utf8/index.js", "webpack://secretjs/node_modules/assert/build/assert.js", "webpack://secretjs/node_modules/assert/build/internal/assert/assertion_error.js", "webpack://secretjs/node_modules/assert/build/internal/errors.js", "webpack://secretjs/node_modules/assert/build/internal/util/comparisons.js", "webpack://secretjs/node_modules/base-x/src/index.js", "webpack://secretjs/node_modules/base64-js/index.js", "webpack://secretjs/node_modules/bech32/dist/index.js", "webpack://secretjs/node_modules/big-integer/BigInteger.js", "webpack://secretjs/node_modules/bignumber.js/bignumber.js", "webpack://secretjs/node_modules/bip32/src/bip32.js", "webpack://secretjs/node_modules/bip32/src/crypto.js", "webpack://secretjs/node_modules/bip32/src/index.js", "webpack://secretjs/node_modules/bip39/src/_wordlists.js", "webpack://secretjs/node_modules/bip39/src/index.js", "webpack://secretjs/node_modules/bn.js/lib/bn.js", "webpack://secretjs/node_modules/brorand/index.js", "webpack://secretjs/node_modules/bs58/index.js", "webpack://secretjs/node_modules/bs58check/base.js", "webpack://secretjs/node_modules/bs58check/index.js", "webpack://secretjs/node_modules/buffer/index.js", "webpack://secretjs/node_modules/call-bind/callBound.js", "webpack://secretjs/node_modules/call-bind/index.js", "webpack://secretjs/node_modules/cipher-base/index.js", "webpack://secretjs/node_modules/console-browserify/index.js", "webpack://secretjs/node_modules/create-hash/browser.js", "webpack://secretjs/node_modules/create-hash/md5.js", "webpack://secretjs/node_modules/create-hmac/browser.js", "webpack://secretjs/node_modules/create-hmac/legacy.js", "webpack://secretjs/node_modules/cross-fetch/dist/browser-ponyfill.js", "webpack://secretjs/node_modules/curve25519-js/lib/index.js", "webpack://secretjs/node_modules/define-data-property/index.js", "webpack://secretjs/node_modules/define-properties/index.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/curve/base.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/curve/edwards.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/curve/index.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/curve/mont.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/curve/short.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/curves.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/ec/index.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/ec/key.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/ec/signature.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/eddsa/index.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/eddsa/key.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/eddsa/signature.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js", "webpack://secretjs/node_modules/elliptic/lib/elliptic/utils.js", "webpack://secretjs/node_modules/events/events.js", "webpack://secretjs/node_modules/for-each/index.js", "webpack://secretjs/node_modules/function-bind/implementation.js", "webpack://secretjs/node_modules/function-bind/index.js", "webpack://secretjs/node_modules/get-intrinsic/index.js", "webpack://secretjs/node_modules/gopd/index.js", "webpack://secretjs/node_modules/has-property-descriptors/index.js", "webpack://secretjs/node_modules/has-proto/index.js", "webpack://secretjs/node_modules/has-symbols/index.js", "webpack://secretjs/node_modules/has-symbols/shams.js", "webpack://secretjs/node_modules/has-tostringtag/shams.js", "webpack://secretjs/node_modules/has/src/index.js", "webpack://secretjs/node_modules/hash-base/index.js", "webpack://secretjs/node_modules/hash.js/lib/hash.js", "webpack://secretjs/node_modules/hash.js/lib/hash/common.js", "webpack://secretjs/node_modules/hash.js/lib/hash/hmac.js", "webpack://secretjs/node_modules/hash.js/lib/hash/ripemd.js", "webpack://secretjs/node_modules/hash.js/lib/hash/sha.js", "webpack://secretjs/node_modules/hash.js/lib/hash/sha/1.js", "webpack://secretjs/node_modules/hash.js/lib/hash/sha/224.js", "webpack://secretjs/node_modules/hash.js/lib/hash/sha/256.js", "webpack://secretjs/node_modules/hash.js/lib/hash/sha/384.js", "webpack://secretjs/node_modules/hash.js/lib/hash/sha/512.js", "webpack://secretjs/node_modules/hash.js/lib/hash/sha/common.js", "webpack://secretjs/node_modules/hash.js/lib/hash/utils.js", "webpack://secretjs/node_modules/hmac-drbg/lib/hmac-drbg.js", "webpack://secretjs/node_modules/ieee754/index.js", "webpack://secretjs/node_modules/inherits/inherits_browser.js", "webpack://secretjs/node_modules/is-arguments/index.js", "webpack://secretjs/node_modules/is-callable/index.js", "webpack://secretjs/node_modules/is-generator-function/index.js", "webpack://secretjs/node_modules/is-nan/implementation.js", "webpack://secretjs/node_modules/is-nan/index.js", "webpack://secretjs/node_modules/is-nan/polyfill.js", "webpack://secretjs/node_modules/is-nan/shim.js", "webpack://secretjs/node_modules/is-typed-array/index.js", "webpack://secretjs/node_modules/long/src/long.js", "webpack://secretjs/node_modules/md5.js/index.js", "webpack://secretjs/node_modules/minimalistic-assert/index.js", "webpack://secretjs/node_modules/minimalistic-crypto-utils/lib/utils.js", "webpack://secretjs/node_modules/miscreant/release/aead.js", "webpack://secretjs/node_modules/miscreant/release/exceptions.js", "webpack://secretjs/node_modules/miscreant/release/index.js", "webpack://secretjs/node_modules/miscreant/release/internals/block.js", "webpack://secretjs/node_modules/miscreant/release/internals/constant-time.js", "webpack://secretjs/node_modules/miscreant/release/internals/ctz.js", "webpack://secretjs/node_modules/miscreant/release/internals/wipe.js", "webpack://secretjs/node_modules/miscreant/release/internals/xor.js", "webpack://secretjs/node_modules/miscreant/release/mac/cmac.js", "webpack://secretjs/node_modules/miscreant/release/mac/pmac.js", "webpack://secretjs/node_modules/miscreant/release/providers/polyfill.js", "webpack://secretjs/node_modules/miscreant/release/providers/polyfill/aes.js", "webpack://secretjs/node_modules/miscreant/release/providers/polyfill/aes_ctr.js", "webpack://secretjs/node_modules/miscreant/release/providers/webcrypto.js", "webpack://secretjs/node_modules/miscreant/release/providers/webcrypto/aes.js", "webpack://secretjs/node_modules/miscreant/release/providers/webcrypto/aes_ctr.js", "webpack://secretjs/node_modules/miscreant/release/siv.js", "webpack://secretjs/node_modules/miscreant/release/stream.js", "webpack://secretjs/node_modules/object-is/implementation.js", "webpack://secretjs/node_modules/object-is/index.js", "webpack://secretjs/node_modules/object-is/polyfill.js", "webpack://secretjs/node_modules/object-is/shim.js", "webpack://secretjs/node_modules/object-keys/implementation.js", "webpack://secretjs/node_modules/object-keys/index.js", "webpack://secretjs/node_modules/object-keys/isArguments.js", "webpack://secretjs/node_modules/object.assign/implementation.js", "webpack://secretjs/node_modules/object.assign/polyfill.js", "webpack://secretjs/node_modules/pako/index.js", "webpack://secretjs/node_modules/pako/lib/deflate.js", "webpack://secretjs/node_modules/pako/lib/inflate.js", "webpack://secretjs/node_modules/pako/lib/utils/common.js", "webpack://secretjs/node_modules/pako/lib/utils/strings.js", "webpack://secretjs/node_modules/pako/lib/zlib/adler32.js", "webpack://secretjs/node_modules/pako/lib/zlib/constants.js", "webpack://secretjs/node_modules/pako/lib/zlib/crc32.js", "webpack://secretjs/node_modules/pako/lib/zlib/deflate.js", "webpack://secretjs/node_modules/pako/lib/zlib/gzheader.js", "webpack://secretjs/node_modules/pako/lib/zlib/inffast.js", "webpack://secretjs/node_modules/pako/lib/zlib/inflate.js", "webpack://secretjs/node_modules/pako/lib/zlib/inftrees.js", "webpack://secretjs/node_modules/pako/lib/zlib/messages.js", "webpack://secretjs/node_modules/pako/lib/zlib/trees.js", "webpack://secretjs/node_modules/pako/lib/zlib/zstream.js", "webpack://secretjs/node_modules/pbkdf2/browser.js", "webpack://secretjs/node_modules/pbkdf2/lib/async.js", "webpack://secretjs/node_modules/pbkdf2/lib/default-encoding.js", "webpack://secretjs/node_modules/pbkdf2/lib/precondition.js", "webpack://secretjs/node_modules/pbkdf2/lib/sync-browser.js", "webpack://secretjs/node_modules/pbkdf2/lib/to-buffer.js", "webpack://secretjs/node_modules/process/browser.js", "webpack://secretjs/node_modules/protobufjs/minimal.js", "webpack://secretjs/node_modules/protobufjs/src/index-minimal.js", "webpack://secretjs/node_modules/protobufjs/src/reader.js", "webpack://secretjs/node_modules/protobufjs/src/reader_buffer.js", "webpack://secretjs/node_modules/protobufjs/src/roots.js", "webpack://secretjs/node_modules/protobufjs/src/rpc.js", "webpack://secretjs/node_modules/protobufjs/src/rpc/service.js", "webpack://secretjs/node_modules/protobufjs/src/util/longbits.js", "webpack://secretjs/node_modules/protobufjs/src/util/minimal.js", "webpack://secretjs/node_modules/protobufjs/src/writer.js", "webpack://secretjs/node_modules/protobufjs/src/writer_buffer.js", "webpack://secretjs/node_modules/randombytes/browser.js", "webpack://secretjs/node_modules/readable-stream/errors-browser.js", "webpack://secretjs/node_modules/readable-stream/lib/_stream_duplex.js", "webpack://secretjs/node_modules/readable-stream/lib/_stream_passthrough.js", "webpack://secretjs/node_modules/readable-stream/lib/_stream_readable.js", "webpack://secretjs/node_modules/readable-stream/lib/_stream_transform.js", "webpack://secretjs/node_modules/readable-stream/lib/_stream_writable.js", "webpack://secretjs/node_modules/readable-stream/lib/internal/streams/async_iterator.js", "webpack://secretjs/node_modules/readable-stream/lib/internal/streams/buffer_list.js", "webpack://secretjs/node_modules/readable-stream/lib/internal/streams/destroy.js", "webpack://secretjs/node_modules/readable-stream/lib/internal/streams/end-of-stream.js", "webpack://secretjs/node_modules/readable-stream/lib/internal/streams/from-browser.js", "webpack://secretjs/node_modules/readable-stream/lib/internal/streams/pipeline.js", "webpack://secretjs/node_modules/readable-stream/lib/internal/streams/state.js", "webpack://secretjs/node_modules/readable-stream/lib/internal/streams/stream-browser.js", "webpack://secretjs/node_modules/readable-stream/readable-browser.js", "webpack://secretjs/node_modules/ripemd160/index.js", "webpack://secretjs/node_modules/safe-buffer/index.js", "webpack://secretjs/node_modules/secure-random/lib/secure-random.js", "webpack://secretjs/node_modules/sha.js/hash.js", "webpack://secretjs/node_modules/sha.js/index.js", "webpack://secretjs/node_modules/sha.js/sha.js", "webpack://secretjs/node_modules/sha.js/sha1.js", "webpack://secretjs/node_modules/sha.js/sha224.js", "webpack://secretjs/node_modules/sha.js/sha256.js", "webpack://secretjs/node_modules/sha.js/sha384.js", "webpack://secretjs/node_modules/sha.js/sha512.js", "webpack://secretjs/node_modules/stream-browserify/index.js", "webpack://secretjs/node_modules/string_decoder/lib/string_decoder.js", "webpack://secretjs/node_modules/tiny-secp256k1/js.js", "webpack://secretjs/node_modules/tiny-secp256k1/rfc6979.js", "webpack://secretjs/src/encryption.ts", "webpack://secretjs/src/extensions/access_control/index.ts", "webpack://secretjs/src/extensions/access_control/permit/index.ts", "webpack://secretjs/src/extensions/access_control/permit/permit_signer.ts", "webpack://secretjs/src/extensions/access_control/viewing_key/msgs.ts", "webpack://secretjs/src/extensions/snip1155/query.ts", "webpack://secretjs/src/extensions/snip1155/tx.ts", "webpack://secretjs/src/extensions/snip20/index.ts", "webpack://secretjs/src/extensions/snip20/query.ts", "webpack://secretjs/src/extensions/snip20/tx.ts", "webpack://secretjs/src/extensions/snip721/index.ts", "webpack://secretjs/src/extensions/snip721/query.ts", "webpack://secretjs/src/extensions/snip721/tx.ts", "webpack://secretjs/src/grpc_gateway/cosmos/auth/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/authz/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/bank/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/base/node/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/base/tendermint/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/distribution/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/evidence/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/feegrant/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/gov/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/mint/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/params/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/slashing/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/staking/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/tx/v1beta1/service.pb.ts", "webpack://secretjs/src/grpc_gateway/cosmos/upgrade/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/fetch.pb.ts", "webpack://secretjs/src/grpc_gateway/ibc/applications/fee/v1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/ibc/applications/interchain_accounts/controller/v1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/ibc/applications/interchain_accounts/host/v1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/ibc/applications/packetforward/v1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/ibc/applications/transfer/v1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/ibc/core/channel/v1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/ibc/core/client/v1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/ibc/core/connection/v1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/secret/compute/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/secret/emergencybutton/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/secret/intertx/v1beta1/query.pb.ts", "webpack://secretjs/src/grpc_gateway/secret/registration/v1beta1/query.pb.ts", "webpack://secretjs/src/index.ts", "webpack://secretjs/src/protobuf/confio/proofs.ts", "webpack://secretjs/src/protobuf/cosmos/authz/v1beta1/authz.ts", "webpack://secretjs/src/protobuf/cosmos/authz/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/bank/v1beta1/authz.ts", "webpack://secretjs/src/protobuf/cosmos/bank/v1beta1/bank.ts", "webpack://secretjs/src/protobuf/cosmos/bank/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/base/abci/v1beta1/abci.ts", "webpack://secretjs/src/protobuf/cosmos/base/v1beta1/coin.ts", "webpack://secretjs/src/protobuf/cosmos/crisis/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/crypto/ed25519/keys.ts", "webpack://secretjs/src/protobuf/cosmos/crypto/multisig/keys.ts", "webpack://secretjs/src/protobuf/cosmos/crypto/multisig/v1beta1/multisig.ts", "webpack://secretjs/src/protobuf/cosmos/crypto/secp256k1/keys.ts", "webpack://secretjs/src/protobuf/cosmos/distribution/v1beta1/distribution.ts", "webpack://secretjs/src/protobuf/cosmos/distribution/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/evidence/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/feegrant/v1beta1/feegrant.ts", "webpack://secretjs/src/protobuf/cosmos/feegrant/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/gov/v1beta1/gov.ts", "webpack://secretjs/src/protobuf/cosmos/gov/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/params/v1beta1/params.ts", "webpack://secretjs/src/protobuf/cosmos/slashing/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/staking/v1beta1/authz.ts", "webpack://secretjs/src/protobuf/cosmos/staking/v1beta1/staking.ts", "webpack://secretjs/src/protobuf/cosmos/staking/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/tx/signing/v1beta1/signing.ts", "webpack://secretjs/src/protobuf/cosmos/tx/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/cosmos/upgrade/v1beta1/upgrade.ts", "webpack://secretjs/src/protobuf/cosmos/vesting/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/google/protobuf/any.ts", "webpack://secretjs/src/protobuf/google/protobuf/duration.ts", "webpack://secretjs/src/protobuf/google/protobuf/timestamp.ts", "webpack://secretjs/src/protobuf/ibc/applications/fee/v1/fee.ts", "webpack://secretjs/src/protobuf/ibc/applications/fee/v1/tx.ts", "webpack://secretjs/src/protobuf/ibc/applications/transfer/v1/tx.ts", "webpack://secretjs/src/protobuf/ibc/core/channel/v1/channel.ts", "webpack://secretjs/src/protobuf/ibc/core/channel/v1/tx.ts", "webpack://secretjs/src/protobuf/ibc/core/client/v1/client.ts", "webpack://secretjs/src/protobuf/ibc/core/client/v1/tx.ts", "webpack://secretjs/src/protobuf/ibc/core/commitment/v1/commitment.ts", "webpack://secretjs/src/protobuf/ibc/core/connection/v1/connection.ts", "webpack://secretjs/src/protobuf/ibc/core/connection/v1/tx.ts", "webpack://secretjs/src/protobuf/secret/compute/v1beta1/msg.ts", "webpack://secretjs/src/protobuf/secret/emergencybutton/v1beta1/tx.ts", "webpack://secretjs/src/protobuf/secret/registration/v1beta1/msg.ts", "webpack://secretjs/src/protobuf/tendermint/abci/types.ts", "webpack://secretjs/src/protobuf/tendermint/crypto/keys.ts", "webpack://secretjs/src/protobuf/tendermint/crypto/proof.ts", "webpack://secretjs/src/protobuf/tendermint/types/params.ts", "webpack://secretjs/src/protobuf/tendermint/types/types.ts", "webpack://secretjs/src/protobuf/tendermint/types/validator.ts", "webpack://secretjs/src/protobuf/tendermint/version/types.ts", "webpack://secretjs/src/query/auth.ts", "webpack://secretjs/src/query/authz.ts", "webpack://secretjs/src/query/bank.ts", "webpack://secretjs/src/query/compute.ts", "webpack://secretjs/src/query/distribution.ts", "webpack://secretjs/src/query/emergency_button.ts", "webpack://secretjs/src/query/evidence.ts", "webpack://secretjs/src/query/feegrant.ts", "webpack://secretjs/src/query/gov.ts", "webpack://secretjs/src/query/ibc_channel.ts", "webpack://secretjs/src/query/ibc_client.ts", "webpack://secretjs/src/query/ibc_connection.ts", "webpack://secretjs/src/query/ibc_fee.ts", "webpack://secretjs/src/query/ibc_interchain_accounts_controller.ts", "webpack://secretjs/src/query/ibc_interchain_accounts_host.ts", "webpack://secretjs/src/query/ibc_packet_forward.ts", "webpack://secretjs/src/query/ibc_transfer.ts", "webpack://secretjs/src/query/index.ts", "webpack://secretjs/src/query/mauth.ts", "webpack://secretjs/src/query/mint.ts", "webpack://secretjs/src/query/node.ts", "webpack://secretjs/src/query/params.ts", "webpack://secretjs/src/query/registration.ts", "webpack://secretjs/src/query/slashing.ts", "webpack://secretjs/src/query/staking.ts", "webpack://secretjs/src/query/tendermint.ts", "webpack://secretjs/src/query/upgrade.ts", "webpack://secretjs/src/secret_network_client.ts", "webpack://secretjs/src/tx/authz.ts", "webpack://secretjs/src/tx/bank.ts", "webpack://secretjs/src/tx/compute.ts", "webpack://secretjs/src/tx/crisis.ts", "webpack://secretjs/src/tx/distribution.ts", "webpack://secretjs/src/tx/emergency_button.ts", "webpack://secretjs/src/tx/evidence.ts", "webpack://secretjs/src/tx/feegrant.ts", "webpack://secretjs/src/tx/gov.ts", "webpack://secretjs/src/tx/ibc_channel.ts", "webpack://secretjs/src/tx/ibc_client.ts", "webpack://secretjs/src/tx/ibc_connection.ts", "webpack://secretjs/src/tx/ibc_fee.ts", "webpack://secretjs/src/tx/ibc_transfer.ts", "webpack://secretjs/src/tx/index.ts", "webpack://secretjs/src/tx/registration.ts", "webpack://secretjs/src/tx/slashing.ts", "webpack://secretjs/src/tx/staking.ts", "webpack://secretjs/src/tx/vesting.ts", "webpack://secretjs/src/utils.ts", "webpack://secretjs/src/wallet_amino.ts", "webpack://secretjs/src/wallet_metamask.ts", "webpack://secretjs/src/wallet_proto.ts", "webpack://secretjs/node_modules/typeforce/errors.js", "webpack://secretjs/node_modules/typeforce/extra.js", "webpack://secretjs/node_modules/typeforce/index.js", "webpack://secretjs/node_modules/typeforce/native.js", "webpack://secretjs/node_modules/util-deprecate/browser.js", "webpack://secretjs/node_modules/util/support/isBufferBrowser.js", "webpack://secretjs/node_modules/util/support/types.js", "webpack://secretjs/node_modules/util/util.js", "webpack://secretjs/node_modules/which-typed-array/index.js", "webpack://secretjs/node_modules/wif/index.js", "webpack://secretjs/node_modules/available-typed-arrays/index.js", "webpack://secretjs/webpack/bootstrap", "webpack://secretjs/webpack/runtime/global", "webpack://secretjs/webpack/runtime/node%20module%20decorator", "webpack://secretjs/webpack/startup", "../../../node_modules/loglevel/lib/loglevel.js", "../../../node_modules/bignumber.js/bignumber.mjs", "../../javascript/src/big_number.js", "../../javascript/src/buffer.js", "../../javascript/src/lodash.js", "../../javascript/src/list.js", "../../../node_modules/isomorphic-ws/browser.js", "../../../node_modules/uuid/dist/esm-browser/rng.js", "../../../node_modules/uuid/dist/esm-browser/stringify.js", "../../../node_modules/uuid/dist/esm-browser/native.js", "../../../node_modules/uuid/dist/esm-browser/v4.js", "../../../node_modules/eventemitter3/index.mjs", "../../../src/Accounts.ts", "../../../src/Signer.ts", "../../../src/app.ts", "../../../src/utils.ts", "../../../src/client.ts", "../../../src/http-client.ts", "../../../src/persistence.ts", "../../../src/utils.ts", "../../../src/types.ts", "../../../src/logoBase64.ts", "../../../src/modal.ts", "../../../node_modules/@nightlylabs/wallet-selector-polkadot/src/tempIcons.ts", "../../../node_modules/@nightlylabs/wallet-selector-polkadot/src/detection.ts", "../../../node_modules/@nightlylabs/wallet-selector-polkadot/src/utils.ts", "../../../node_modules/@nightlylabs/wallet-selector-polkadot/src/adapter.ts", "../../../node_modules/@polkadot/x-textdecoder/node_modules/@polkadot/x-global/index.js", "../../../node_modules/@polkadot/x-textdecoder/fallback.js", "../../../node_modules/@polkadot/x-textdecoder/browser.js", "../../../node_modules/@polkadot/x-textencoder/node_modules/@polkadot/x-global/index.js", "../../../node_modules/@polkadot/x-textencoder/fallback.js", "../../../node_modules/@polkadot/x-textencoder/browser.js", "../../../node_modules/@polkadot/util/node_modules/@polkadot/x-global/index.js", "../../../node_modules/@polkadot/util/is/function.js", "../../../node_modules/@polkadot/util/array/chunk.js", "../../../node_modules/@polkadot/util/array/flatten.js", "../../../node_modules/@polkadot/util/assert.js", "../../../node_modules/@polkadot/util/node_modules/@polkadot/x-bigint/index.js", "../../../node_modules/@polkadot/util/bi/consts.js", "../../../node_modules/@polkadot/util/hex/toU8a.js", "../../../node_modules/@polkadot/util/bn/bn.js", "../../../node_modules/@polkadot/util/is/bn.js", "../../../node_modules/@polkadot/util/is/hex.js", "../../../node_modules/@polkadot/util/is/object.js", "../../../node_modules/@polkadot/util/is/helpers.js", "../../../node_modules/@polkadot/util/is/toBigInt.js", "../../../node_modules/@polkadot/util/is/toBn.js", "../../../node_modules/@polkadot/util/bi/helpers.js", "../../../node_modules/@polkadot/util/has.js", "../../../node_modules/@polkadot/util/is/buffer.js", "../../../node_modules/@polkadot/util/is/u8a.js", "../../../node_modules/@polkadot/util/string/toU8a.js", "../../../node_modules/@polkadot/util/u8a/toU8a.js", "../../../node_modules/@polkadot/util/u8a/concat.js", "../../../node_modules/@polkadot/util/u8a/eq.js", "../../../node_modules/@polkadot/util/u8a/toFloat.js", "../../../node_modules/@polkadot/util/u8a/toBn.js", "../../../node_modules/@polkadot/util/u8a/toHex.js", "../../../node_modules/@polkadot/util/u8a/toNumber.js", "../../../node_modules/@polkadot/util/u8a/toString.js", "../../../node_modules/@polkadot/util/bn/consts.js", "../../../node_modules/@polkadot/util/hex/stripPrefix.js", "../../../node_modules/@polkadot/util/hex/toBn.js", "../../../node_modules/@polkadot/util/bn/min.js", "../../../node_modules/@polkadot/util/is/bigInt.js", "../../../node_modules/@polkadot/util/bn/toBn.js", "../../../node_modules/@polkadot/util/bn/sqrt.js", "../../../node_modules/@polkadot/util/bn/toU8a.js", "../../../node_modules/@polkadot/util/bn/toHex.js", "../../../node_modules/@polkadot/util/compact/toU8a.js", "../../../node_modules/@polkadot/util/compact/addLength.js", "../../../node_modules/@polkadot/util/compact/fromU8a.js", "../../../node_modules/@polkadot/util/compact/stripLength.js", "../../../node_modules/@polkadot/util/float/toU8a.js", "../../../node_modules/@polkadot/util/is/boolean.js", "../../../node_modules/@polkadot/util/format/formatDecimal.js", "../../../node_modules/@polkadot/util/format/getSeparator.js", "../../../node_modules/@polkadot/util/format/si.js", "../../../node_modules/@polkadot/util/format/formatBalance.js", "../../../node_modules/@polkadot/util/format/formatDate.js", "../../../node_modules/@polkadot/util/format/formatNumber.js", "../../../node_modules/@polkadot/util/is/string.js", "../../../node_modules/@polkadot/util/is/ascii.js", "../../../node_modules/@polkadot/util/is/class.js", "../../../node_modules/@polkadot/util/is/childClass.js", "../../../node_modules/@polkadot/util/is/codec.js", "../../../node_modules/@polkadot/util/is/compact.js", "../../../node_modules/@polkadot/util/stringify.js", "../../../node_modules/@polkadot/util/is/null.js", "../../../node_modules/@polkadot/util/is/number.js", "../../../node_modules/@polkadot/util/is/undefined.js", "../../../node_modules/@polkadot/util/is/utf8.js", "../../../node_modules/@polkadot/util/lazy.js", "../../../node_modules/@polkadot/util/logger.js", "../../../node_modules/@polkadot/util/memoize.js", "../../../node_modules/@polkadot/util/nextTick.js", "../../../node_modules/@polkadot/util/object/clear.js", "../../../node_modules/@polkadot/util/object/spread.js", "../../../node_modules/@polkadot/util/object/property.js", "../../../node_modules/@polkadot/util/string/camelCase.js", "../../../node_modules/@polkadot/util/string/lowerFirst.js", "../../../node_modules/@polkadot/util/string/toHex.js", "../../../node_modules/@polkadot/api/packageInfo.js", "../../../node_modules/@polkadot/x-randomvalues/node_modules/@polkadot/x-global/index.js", "../../../node_modules/@polkadot/x-randomvalues/browser.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@polkadot/x-global/index.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@polkadot/x-bigint/index.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@noble/secp256k1/lib/esm/index.js", "../../../node_modules/@polkadot/wasm-bridge/wbg.js", "../../../node_modules/@polkadot/wasm-bridge/bridge.js", "../../../node_modules/@polkadot/wasm-bridge/init.js", "../../../node_modules/@polkadot/wasm-crypto-wasm/node_modules/@polkadot/wasm-util/base64.js", "../../../node_modules/@polkadot/wasm-crypto-wasm/node_modules/@polkadot/wasm-util/fflate.js", "../../../node_modules/@polkadot/wasm-crypto-wasm/bundle.js", "../../../node_modules/@polkadot/wasm-crypto-init/wasm.js", "../../../node_modules/@polkadot/wasm-crypto/init.js", "../../../node_modules/@polkadot/wasm-crypto/bundle.js", "../../../node_modules/@polkadot/util-crypto/crypto.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@noble/hashes/src/_assert.ts", "../../../node_modules/@polkadot/util-crypto/node_modules/@noble/hashes/src/cryptoBrowser.ts", "../../../node_modules/@polkadot/util-crypto/node_modules/@noble/hashes/src/utils.ts", "../../../node_modules/@polkadot/util-crypto/node_modules/@noble/hashes/src/_u64.ts", "../../../node_modules/@polkadot/util-crypto/node_modules/@scure/base/lib/esm/index.js", "../../../node_modules/@polkadot/util-crypto/base32/helpers.js", "../../../node_modules/@polkadot/util-crypto/base58/bs58.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@noble/hashes/src/_blake2.ts", "../../../node_modules/@polkadot/util-crypto/node_modules/@noble/hashes/src/blake2b.ts", "../../../node_modules/@polkadot/util-crypto/helpers.js", "../../../node_modules/@polkadot/util-crypto/blake2/asU8a.js", "../../../node_modules/@polkadot/util-crypto/address/sshash.js", "../../../node_modules/@polkadot/util-crypto/address/checksum.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@substrate/ss58-registry/esm/index.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@polkadot/networks/defaults/genesis.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@polkadot/networks/defaults/icons.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@polkadot/networks/defaults/ledger.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@polkadot/networks/defaults/testnets.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@polkadot/networks/interfaces.js", "../../../node_modules/@polkadot/util-crypto/address/defaults.js", "../../../node_modules/@polkadot/util-crypto/address/decode.js", "../../../node_modules/@polkadot/util-crypto/address/check.js", "../../../node_modules/@polkadot/util-crypto/bn.js", "../../../node_modules/@polkadot/util-crypto/address/encode.js", "../../../node_modules/@polkadot/util-crypto/node_modules/@noble/hashes/src/sha3.ts", "../../../node_modules/@polkadot/util-crypto/keccak/asU8a.js", "../../../node_modules/@polkadot/util-crypto/secp256k1/expand.js", "../../../node_modules/@polkadot/util-crypto/ethereum/encode.js", "../../../node_modules/@polkadot/util-crypto/ethereum/isChecksum.js", "../../../node_modules/@polkadot/util-crypto/ethereum/isAddress.js", "../../../node_modules/@polkadot/util-crypto/xxhash/xxhash64.js", "../../../node_modules/@polkadot/util-crypto/xxhash/asU8a.js", "../../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js", "../../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/x-global/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/x-fetch/browser.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-provider/coder/error.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-provider/coder/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-provider/defaults.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-provider/lru.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-provider/http/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/x-ws/browser.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-provider/ws/errors.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-provider/ws/index.js", "../../../node_modules/tslib/tslib.es6.mjs", "../../../node_modules/rxjs/src/internal/util/isFunction.ts", "../../../node_modules/rxjs/src/internal/util/createErrorClass.ts", "../../../node_modules/rxjs/src/internal/util/UnsubscriptionError.ts", "../../../node_modules/rxjs/src/internal/util/arrRemove.ts", "../../../node_modules/rxjs/src/internal/Subscription.ts", "../../../node_modules/rxjs/src/internal/config.ts", "../../../node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts", "../../../node_modules/rxjs/src/internal/util/reportUnhandledError.ts", "../../../node_modules/rxjs/src/internal/util/noop.ts", "../../../node_modules/rxjs/src/internal/NotificationFactories.ts", "../../../node_modules/rxjs/src/internal/util/errorContext.ts", "../../../node_modules/rxjs/src/internal/Subscriber.ts", "../../../node_modules/rxjs/src/internal/symbol/observable.ts", "../../../node_modules/rxjs/src/internal/util/identity.ts", "../../../node_modules/rxjs/src/internal/util/pipe.ts", "../../../node_modules/rxjs/src/internal/Observable.ts", "../../../node_modules/rxjs/src/internal/util/lift.ts", "../../../node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts", "../../../node_modules/rxjs/src/internal/operators/refCount.ts", "../../../node_modules/rxjs/src/internal/observable/ConnectableObservable.ts", "../../../node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts", "../../../node_modules/rxjs/src/internal/Subject.ts", "../../../node_modules/rxjs/src/internal/BehaviorSubject.ts", "../../../node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts", "../../../node_modules/rxjs/src/internal/ReplaySubject.ts", "../../../node_modules/rxjs/src/internal/scheduler/Action.ts", "../../../node_modules/rxjs/src/internal/scheduler/intervalProvider.ts", "../../../node_modules/rxjs/src/internal/scheduler/AsyncAction.ts", "../../../node_modules/rxjs/src/internal/util/Immediate.ts", "../../../node_modules/rxjs/src/internal/scheduler/immediateProvider.ts", "../../../node_modules/rxjs/src/internal/scheduler/AsapAction.ts", "../../../node_modules/rxjs/src/internal/Scheduler.ts", "../../../node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts", "../../../node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts", "../../../node_modules/rxjs/src/internal/scheduler/asap.ts", "../../../node_modules/rxjs/src/internal/observable/empty.ts", "../../../node_modules/rxjs/src/internal/util/isScheduler.ts", "../../../node_modules/rxjs/src/internal/util/args.ts", "../../../node_modules/rxjs/src/internal/util/isArrayLike.ts", "../../../node_modules/rxjs/src/internal/util/isPromise.ts", "../../../node_modules/rxjs/src/internal/util/isInteropObservable.ts", "../../../node_modules/rxjs/src/internal/util/isAsyncIterable.ts", "../../../node_modules/rxjs/src/internal/util/throwUnobservableError.ts", "../../../node_modules/rxjs/src/internal/symbol/iterator.ts", "../../../node_modules/rxjs/src/internal/util/isIterable.ts", "../../../node_modules/rxjs/src/internal/util/isReadableStreamLike.ts", "../../../node_modules/rxjs/src/internal/observable/innerFrom.ts", "../../../node_modules/rxjs/src/internal/util/executeSchedule.ts", "../../../node_modules/rxjs/src/internal/operators/observeOn.ts", "../../../node_modules/rxjs/src/internal/operators/subscribeOn.ts", "../../../node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts", "../../../node_modules/rxjs/src/internal/scheduled/schedulePromise.ts", "../../../node_modules/rxjs/src/internal/scheduled/scheduleArray.ts", "../../../node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts", "../../../node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts", "../../../node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts", "../../../node_modules/rxjs/src/internal/scheduled/scheduled.ts", "../../../node_modules/rxjs/src/internal/observable/from.ts", "../../../node_modules/rxjs/src/internal/observable/of.ts", "../../../node_modules/rxjs/src/internal/util/EmptyError.ts", "../../../node_modules/rxjs/src/internal/firstValueFrom.ts", "../../../node_modules/rxjs/src/internal/operators/map.ts", "../../../node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts", "../../../node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts", "../../../node_modules/rxjs/src/internal/util/createObject.ts", "../../../node_modules/rxjs/src/internal/observable/combineLatest.ts", "../../../node_modules/rxjs/src/internal/operators/mergeInternals.ts", "../../../node_modules/rxjs/src/internal/operators/mergeMap.ts", "../../../node_modules/rxjs/src/internal/operators/mergeAll.ts", "../../../node_modules/rxjs/src/internal/operators/concatAll.ts", "../../../node_modules/rxjs/src/internal/observable/concat.ts", "../../../node_modules/rxjs/src/internal/operators/filter.ts", "../../../node_modules/rxjs/src/internal/operators/catchError.ts", "../../../node_modules/rxjs/src/internal/operators/scanInternals.ts", "../../../node_modules/rxjs/src/internal/operators/reduce.ts", "../../../node_modules/rxjs/src/internal/operators/toArray.ts", "../../../node_modules/rxjs/src/internal/observable/fromSubscribable.ts", "../../../node_modules/rxjs/src/internal/operators/connect.ts", "../../../node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts", "../../../node_modules/rxjs/src/internal/operators/take.ts", "../../../node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts", "../../../node_modules/rxjs/src/internal/operators/throwIfEmpty.ts", "../../../node_modules/rxjs/src/internal/operators/first.ts", "../../../node_modules/rxjs/src/internal/operators/multicast.ts", "../../../node_modules/rxjs/src/internal/operators/publishReplay.ts", "../../../node_modules/rxjs/src/internal/operators/startWith.ts", "../../../node_modules/rxjs/src/internal/operators/switchMap.ts", "../../../node_modules/rxjs/src/internal/operators/tap.ts", "../../../node_modules/@polkadot/api-derive/accounts/index.js", "../../../node_modules/@polkadot/types-create/types/types.js", "../../../node_modules/@polkadot/types-codec/utils/util.js", "../../../node_modules/@polkadot/types-codec/utils/compareArray.js", "../../../node_modules/@polkadot/types-codec/abstract/Array.js", "../../../node_modules/@polkadot/types-codec/abstract/Base.js", "../../../node_modules/@polkadot/types-codec/abstract/Int.js", "../../../node_modules/@polkadot/types-codec/utils/compareMap.js", "../../../node_modules/@polkadot/types-codec/utils/compareSet.js", "../../../node_modules/@polkadot/types-codec/utils/decodeU8a.js", "../../../node_modules/@polkadot/types-codec/utils/typeToConstructor.js", "../../../node_modules/@polkadot/types-codec/utils/mapToTypeMap.js", "../../../node_modules/@polkadot/types-codec/utils/sanitize.js", "../../../node_modules/@polkadot/types-codec/utils/sortValues.js", "../../../node_modules/@polkadot/types-codec/utils/typesToMap.js", "../../../node_modules/@polkadot/types-codec/base/Compact.js", "../../../node_modules/@polkadot/types-codec/base/DoNotConstruct.js", "../../../node_modules/@polkadot/types-codec/base/Null.js", "../../../node_modules/@polkadot/types-codec/base/Enum.js", "../../../node_modules/@polkadot/types-codec/base/Int.js", "../../../node_modules/@polkadot/types-codec/base/Option.js", "../../../node_modules/@polkadot/types-codec/base/Result.js", "../../../node_modules/@polkadot/types-codec/base/Tuple.js", "../../../node_modules/@polkadot/types-codec/base/UInt.js", "../../../node_modules/@polkadot/types-codec/base/Vec.js", "../../../node_modules/@polkadot/types-codec/base/VecFixed.js", "../../../node_modules/@polkadot/types-codec/native/Raw.js", "../../../node_modules/@polkadot/types-codec/extended/BitVec.js", "../../../node_modules/@polkadot/types-codec/native/Struct.js", "../../../node_modules/@polkadot/types-codec/extended/Map.js", "../../../node_modules/@polkadot/types-codec/extended/BTreeMap.js", "../../../node_modules/@polkadot/types-codec/extended/BTreeSet.js", "../../../node_modules/@polkadot/types-codec/extended/Bytes.js", "../../../node_modules/@polkadot/types-codec/extended/HashMap.js", "../../../node_modules/@polkadot/types-codec/native/Bool.js", "../../../node_modules/@polkadot/types-codec/extended/OptionBool.js", "../../../node_modules/@polkadot/types-codec/extended/Range.js", "../../../node_modules/@polkadot/types-codec/extended/RangeInclusive.js", "../../../node_modules/@polkadot/types-codec/native/Text.js", "../../../node_modules/@polkadot/types-codec/extended/Type.js", "../../../node_modules/@polkadot/types-codec/extended/U8aFixed.js", "../../../node_modules/@polkadot/types-codec/extended/WrapperKeepOpaque.js", "../../../node_modules/@polkadot/types-codec/extended/WrapperOpaque.js", "../../../node_modules/@polkadot/types-codec/native/Float.js", "../../../node_modules/@polkadot/types-codec/native/Json.js", "../../../node_modules/@polkadot/types-codec/native/Set.js", "../../../node_modules/@polkadot/types-codec/primitive/F32.js", "../../../node_modules/@polkadot/types-codec/primitive/F64.js", "../../../node_modules/@polkadot/types-codec/primitive/I8.js", "../../../node_modules/@polkadot/types-codec/primitive/I16.js", "../../../node_modules/@polkadot/types-codec/primitive/I32.js", "../../../node_modules/@polkadot/types-codec/primitive/I64.js", "../../../node_modules/@polkadot/types-codec/primitive/I128.js", "../../../node_modules/@polkadot/types-codec/primitive/I256.js", "../../../node_modules/@polkadot/types-codec/primitive/U8.js", "../../../node_modules/@polkadot/types-codec/primitive/U16.js", "../../../node_modules/@polkadot/types-codec/primitive/U32.js", "../../../node_modules/@polkadot/types-codec/primitive/U64.js", "../../../node_modules/@polkadot/types-codec/primitive/U128.js", "../../../node_modules/@polkadot/types-codec/primitive/U256.js", "../../../node_modules/@polkadot/types-codec/primitive/USize.js", "../../../node_modules/@polkadot/types-create/util/typeSplit.js", "../../../node_modules/@polkadot/types-create/util/getTypeDef.js", "../../../node_modules/@polkadot/types-create/create/class.js", "../../../node_modules/@polkadot/types-create/create/type.js", "../../../node_modules/@polkadot/types-create/util/encodeTypes.js", "../../../node_modules/@polkadot/types-create/util/xcm.js", "../../../node_modules/@polkadot/api-derive/node_modules/@polkadot/rpc-core/util/refCountDelay.js", "../../../node_modules/@polkadot/api-derive/node_modules/@polkadot/rpc-core/util/drr.js", "../../../node_modules/@polkadot/api-derive/node_modules/@polkadot/rpc-core/util/memo.js", "../../../node_modules/@polkadot/api-derive/util/blockNumber.js", "../../../node_modules/@polkadot/api-derive/util/cacheImpl.js", "../../../node_modules/@polkadot/api-derive/util/cache.js", "../../../node_modules/@polkadot/api-derive/util/first.js", "../../../node_modules/@polkadot/api-derive/util/lazy.js", "../../../node_modules/@polkadot/api-derive/accounts/accountId.js", "../../../node_modules/@polkadot/api-derive/accounts/flags.js", "../../../node_modules/@polkadot/api-derive/accounts/idAndIndex.js", "../../../node_modules/@polkadot/api-derive/accounts/idToIndex.js", "../../../node_modules/@polkadot/api-derive/accounts/identity.js", "../../../node_modules/@polkadot/api-derive/accounts/indexToId.js", "../../../node_modules/@polkadot/api-derive/accounts/indexes.js", "../../../node_modules/@polkadot/api-derive/accounts/info.js", "../../../node_modules/@polkadot/api-derive/alliance/index.js", "../../../node_modules/@polkadot/api-derive/collective/helpers.js", "../../../node_modules/@polkadot/api-derive/collective/members.js", "../../../node_modules/@polkadot/api-derive/collective/prime.js", "../../../node_modules/@polkadot/api-derive/collective/proposals.js", "../../../node_modules/@polkadot/api-derive/bagsList/index.js", "../../../node_modules/@polkadot/api-derive/bagsList/util.js", "../../../node_modules/@polkadot/api-derive/bagsList/get.js", "../../../node_modules/@polkadot/api-derive/bagsList/getExpanded.js", "../../../node_modules/@polkadot/api-derive/bagsList/listNodes.js", "../../../node_modules/@polkadot/api-derive/balances/index.js", "../../../node_modules/@polkadot/api-derive/balances/all.js", "../../../node_modules/@polkadot/api-derive/balances/account.js", "../../../node_modules/@polkadot/api-derive/balances/votingBalances.js", "../../../node_modules/@polkadot/api-derive/bounties/index.js", "../../../node_modules/@polkadot/api-derive/bounties/helpers/filterBountyProposals.js", "../../../node_modules/@polkadot/api-derive/bounties/bounties.js", "../../../node_modules/@polkadot/api-derive/chain/index.js", "../../../node_modules/@polkadot/api-derive/chain/util.js", "../../../node_modules/@polkadot/api-derive/chain/bestNumber.js", "../../../node_modules/@polkadot/api-derive/chain/bestNumberFinalized.js", "../../../node_modules/@polkadot/api-derive/chain/bestNumberLag.js", "../../../node_modules/@polkadot/api-derive/type/util.js", "../../../node_modules/@polkadot/api-derive/type/HeaderExtended.js", "../../../node_modules/@polkadot/api-derive/type/SignedBlockExtended.js", "../../../node_modules/@polkadot/api-derive/chain/getHeader.js", "../../../node_modules/@polkadot/api-derive/chain/getBlock.js", "../../../node_modules/@polkadot/api-derive/chain/getBlockByNumber.js", "../../../node_modules/@polkadot/api-derive/chain/subscribeFinalizedHeads.js", "../../../node_modules/@polkadot/api-derive/chain/subscribeNewBlocks.js", "../../../node_modules/@polkadot/api-derive/chain/subscribeNewHeads.js", "../../../node_modules/@polkadot/api-derive/contracts/index.js", "../../../node_modules/@polkadot/api-derive/contracts/fees.js", "../../../node_modules/@polkadot/api-derive/council/index.js", "../../../node_modules/@polkadot/api-derive/council/votes.js", "../../../node_modules/@polkadot/api-derive/council/votesOf.js", "../../../node_modules/@polkadot/api-derive/crowdloan/index.js", "../../../node_modules/@polkadot/api-derive/crowdloan/childKey.js", "../../../node_modules/@polkadot/api-derive/crowdloan/util.js", "../../../node_modules/@polkadot/api-derive/crowdloan/contributions.js", "../../../node_modules/@polkadot/api-derive/crowdloan/ownContributions.js", "../../../node_modules/@polkadot/api-derive/democracy/index.js", "../../../node_modules/@polkadot/api-derive/democracy/util.js", "../../../node_modules/@polkadot/api-derive/democracy/dispatchQueue.js", "../../../node_modules/@polkadot/api-derive/democracy/locks.js", "../../../node_modules/@polkadot/api-derive/democracy/nextExternal.js", "../../../node_modules/@polkadot/api-derive/democracy/preimages.js", "../../../node_modules/@polkadot/api-derive/democracy/proposals.js", "../../../node_modules/@polkadot/api-derive/democracy/referendumIds.js", "../../../node_modules/@polkadot/api-derive/democracy/referendums.js", "../../../node_modules/@polkadot/api-derive/democracy/referendumsActive.js", "../../../node_modules/@polkadot/api-derive/democracy/referendumsFinished.js", "../../../node_modules/@polkadot/api-derive/democracy/referendumsInfo.js", "../../../node_modules/@polkadot/api-derive/democracy/sqrtElectorate.js", "../../../node_modules/@polkadot/api-derive/elections/index.js", "../../../node_modules/@polkadot/api-derive/elections/info.js", "../../../node_modules/@polkadot/api-derive/imOnline/index.js", "../../../node_modules/@polkadot/api-derive/imOnline/receivedHeartbeats.js", "../../../node_modules/@polkadot/api-derive/membership/index.js", "../../../node_modules/@polkadot/api-derive/parachains/index.js", "../../../node_modules/@polkadot/api-derive/parachains/util.js", "../../../node_modules/@polkadot/api-derive/parachains/info.js", "../../../node_modules/@polkadot/api-derive/parachains/overview.js", "../../../node_modules/@polkadot/api-derive/session/index.js", "../../../node_modules/@polkadot/api-derive/session/indexes.js", "../../../node_modules/@polkadot/api-derive/session/info.js", "../../../node_modules/@polkadot/api-derive/session/progress.js", "../../../node_modules/@polkadot/api-derive/society/index.js", "../../../node_modules/@polkadot/api-derive/society/candidates.js", "../../../node_modules/@polkadot/api-derive/society/info.js", "../../../node_modules/@polkadot/api-derive/society/member.js", "../../../node_modules/@polkadot/api-derive/society/members.js", "../../../node_modules/@polkadot/api-derive/staking/index.js", "../../../node_modules/@polkadot/api-derive/staking/account.js", "../../../node_modules/@polkadot/api-derive/staking/currentPoints.js", "../../../node_modules/@polkadot/api-derive/staking/cache.js", "../../../node_modules/@polkadot/api-derive/staking/util.js", "../../../node_modules/@polkadot/api-derive/staking/erasExposure.js", "../../../node_modules/@polkadot/api-derive/staking/erasHistoric.js", "../../../node_modules/@polkadot/api-derive/staking/erasPoints.js", "../../../node_modules/@polkadot/api-derive/staking/erasPrefs.js", "../../../node_modules/@polkadot/api-derive/staking/erasRewards.js", "../../../node_modules/@polkadot/api-derive/staking/erasSlashes.js", "../../../node_modules/@polkadot/api-derive/staking/electedInfo.js", "../../../node_modules/@polkadot/api-derive/staking/keys.js", "../../../node_modules/@polkadot/api-derive/staking/overview.js", "../../../node_modules/@polkadot/api-derive/staking/ownExposure.js", "../../../node_modules/@polkadot/api-derive/staking/ownSlashes.js", "../../../node_modules/@polkadot/api-derive/staking/query.js", "../../../node_modules/@polkadot/api-derive/staking/stakerExposure.js", "../../../node_modules/@polkadot/api-derive/staking/stakerPoints.js", "../../../node_modules/@polkadot/api-derive/staking/stakerPrefs.js", "../../../node_modules/@polkadot/api-derive/staking/stakerRewards.js", "../../../node_modules/@polkadot/api-derive/staking/stakerSlashes.js", "../../../node_modules/@polkadot/api-derive/staking/stashes.js", "../../../node_modules/@polkadot/api-derive/staking/validators.js", "../../../node_modules/@polkadot/api-derive/staking/waitingInfo.js", "../../../node_modules/@polkadot/api-derive/technicalCommittee/index.js", "../../../node_modules/@polkadot/api-derive/treasury/index.js", "../../../node_modules/@polkadot/api-derive/treasury/proposals.js", "../../../node_modules/@polkadot/api-derive/tx/index.js", "../../../node_modules/@polkadot/api-derive/tx/events.js", "../../../node_modules/@polkadot/api-derive/tx/constants.js", "../../../node_modules/@polkadot/api-derive/tx/signingInfo.js", "../../../node_modules/@polkadot/api-derive/derive.js", "../../../node_modules/@polkadot/api-derive/bundle.js", "../../../node_modules/@polkadot/api/util/decorate.js", "../../../node_modules/@polkadot/api/util/logging.js", "../../../node_modules/@polkadot/api/util/filterEvents.js", "../../../node_modules/@polkadot/api/util/isKeyringPair.js", "../../../node_modules/@polkadot/api/submittable/Result.js", "../../../node_modules/@polkadot/api/submittable/createClass.js", "../../../node_modules/@polkadot/api/submittable/createSubmittable.js", "../../../node_modules/@polkadot/api/base/find.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/hashers.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/v9.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/v10.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/v11.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/v12.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/v13.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/scaleInfo/v1.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/v14.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/metadata/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/runtime/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/runtime/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/scaleInfo/v0.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/scaleInfo/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/assets/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/authorship/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/aura/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/aura/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/babe/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/babe/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/babe/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/balances/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/beefy/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/beefy/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/beefy/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/benchmark/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/benchmark/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/blockbuilder/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/blockbuilder/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/collective/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/consensus/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/contracts/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/contracts/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/contracts/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/democracy/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/dev/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/dev/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/discovery/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/discovery/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/elections/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/engine/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/engine/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/evm/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/extrinsics/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/genericAsset/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/gilt/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/grandpa/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/grandpa/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/grandpa/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/identity/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/imOnline/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/lottery/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/mmr/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/mmr/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/mmr/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/nompools/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/nompools/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/offences/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/pow/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/pow/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/proxy/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/recovery/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/scheduler/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/session/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/session/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/society/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/staking/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/support/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/syncstate/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/syncstate/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/system/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/system/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/system/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/treasury/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/txpayment/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/txqueue/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/txqueue/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/uniques/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/utility/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/vesting/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/attestations/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/bridges/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/claims/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/crowdloan/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/cumulus/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/cumulus/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/finality/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/finality/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/parachains/hrmp.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/parachains/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/parachains/slots.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/parachains/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/poll/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/purchase/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/xcm/v0.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/xcm/v1.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/xcm/v2.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/xcm/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/contractsAbi/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/eth/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/eth/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/eth/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/nimbus/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/nimbus/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/ormlOracle/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/ormlOracle/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/ormlTokens/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/ormlTokens/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/rpc/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/rpc/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/author/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/author/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/chain/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/chain/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/childstate/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/childstate/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/offchain/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/offchain/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/offchain/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/payment/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/payment/runtime.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/payment/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/state/rpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/state/definitions.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/jsonrpc.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/create/lazy.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/signedExtensions/emptyCheck.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/signedExtensions/polkadot.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/signedExtensions/shell.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/signedExtensions/statemint.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/signedExtensions/substrate.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/signedExtensions/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/Event.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/index.types.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/v4/Extrinsic.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/constants.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/Extrinsic.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/ExtrinsicEra.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/ExtrinsicPayload.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/ExtrinsicPayloadUnknown.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/ExtrinsicUnknown.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/SignerPayload.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/util.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/v4/ExtrinsicPayload.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/extrinsic/v4/ExtrinsicSignature.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/ethereum/AccountId.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/AccountIndex.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/ethereum/LookupSource.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/AccountId.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/Block.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/Call.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/ChainProperties.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/ConsensusEngineId.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/LookupSource.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/MultiAddress.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/generic/Vote.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/primitive/Data.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/util/flattenUniq.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/util/getSiName.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/util/extractTypes.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/util/validateTypes.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/util/getUniqTypes.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/util/toCallsOnly.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/primitive/StorageKey.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/v9/toV10.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/v10/toV11.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/v11/toV12.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/v12/toV13.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/interfaces/alias.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/v13/toV14.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/v14/toLatest.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/MagicNumber.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/MetadataVersioned.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/Metadata.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/util.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/constants/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/errors/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/events/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/extrinsics/createUnchecked.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/extrinsics/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/storage/getHasher.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/storage/createFunction.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/storage/util.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/storage/substrate.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/storage/getStorage.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/storage/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/decorate/index.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/metadata/PortableRegistry/PortableRegistry.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/types/create/registry.js", "../../../node_modules/@polkadot/types-known/chain/index.js", "../../../node_modules/@polkadot/types-known/spec/centrifuge-chain.js", "../../../node_modules/@polkadot/types-known/spec/kusama.js", "../../../node_modules/@polkadot/types-known/spec/node.js", "../../../node_modules/@polkadot/types-known/spec/node-template.js", "../../../node_modules/@polkadot/types-known/spec/polkadot.js", "../../../node_modules/@polkadot/types-known/spec/rococo.js", "../../../node_modules/@polkadot/types-known/spec/shell.js", "../../../node_modules/@polkadot/types-known/spec/statemint.js", "../../../node_modules/@polkadot/types-known/spec/westend.js", "../../../node_modules/@polkadot/types-known/spec/index.js", "../../../node_modules/@polkadot/types-known/node_modules/@substrate/ss58-registry/esm/index.js", "../../../node_modules/@polkadot/types-known/node_modules/@polkadot/networks/defaults/genesis.js", "../../../node_modules/@polkadot/types-known/node_modules/@polkadot/networks/defaults/icons.js", "../../../node_modules/@polkadot/types-known/node_modules/@polkadot/networks/defaults/ledger.js", "../../../node_modules/@polkadot/types-known/node_modules/@polkadot/networks/defaults/testnets.js", "../../../node_modules/@polkadot/types-known/node_modules/@polkadot/networks/interfaces.js", "../../../node_modules/@polkadot/types-known/upgrades/e2e/index.js", "../../../node_modules/@polkadot/types-known/upgrades/e2e/kusama.js", "../../../node_modules/@polkadot/types-known/upgrades/e2e/polkadot.js", "../../../node_modules/@polkadot/types-known/upgrades/e2e/westend.js", "../../../node_modules/@polkadot/types-known/upgrades/index.js", "../../../node_modules/@polkadot/types-known/util.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-core/util/refCountDelay.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-core/util/drr.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-core/util/memo.js", "../../../node_modules/@polkadot/api/node_modules/@polkadot/rpc-core/bundle.js", "../../../node_modules/@polkadot/api/util/augmentObject.js", "../../../node_modules/@polkadot/api/util/validate.js", "../../../node_modules/@polkadot/api/base/Events.js", "../../../node_modules/@polkadot/api/base/Decorate.js", "../../../node_modules/@polkadot/api/base/Init.js", "../../../node_modules/@polkadot/api/base/Getters.js", "../../../node_modules/@polkadot/api/base/index.js", "../../../node_modules/@polkadot/api/promise/Combinator.js", "../../../node_modules/@polkadot/api/promise/decorateMethod.js", "../../../node_modules/@polkadot/api/promise/Api.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/hashers.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/v9.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/v10.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/v11.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/v12.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/v13.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/scaleInfo/v1.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/v14.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/metadata/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/runtime/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/runtime/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/scaleInfo/v0.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/scaleInfo/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/assets/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/authorship/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/aura/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/aura/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/babe/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/babe/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/babe/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/balances/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/beefy/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/beefy/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/beefy/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/benchmark/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/benchmark/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/blockbuilder/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/blockbuilder/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/collective/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/consensus/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/contracts/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/contracts/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/contracts/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/democracy/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/dev/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/dev/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/discovery/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/discovery/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/elections/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/engine/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/engine/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/evm/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/extrinsics/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/genericAsset/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/gilt/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/grandpa/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/grandpa/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/grandpa/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/identity/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/imOnline/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/lottery/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/mmr/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/mmr/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/mmr/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/nompools/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/nompools/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/offences/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/pow/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/pow/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/proxy/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/recovery/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/scheduler/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/session/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/session/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/society/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/staking/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/support/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/syncstate/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/syncstate/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/system/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/system/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/system/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/treasury/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/txpayment/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/txqueue/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/txqueue/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/uniques/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/utility/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/vesting/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/attestations/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/bridges/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/claims/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/crowdloan/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/cumulus/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/cumulus/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/finality/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/finality/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/parachains/hrmp.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/parachains/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/parachains/slots.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/parachains/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/poll/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/purchase/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/xcm/v0.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/xcm/v1.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/xcm/v2.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/xcm/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/contractsAbi/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/eth/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/eth/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/eth/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/nimbus/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/nimbus/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/ormlOracle/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/ormlOracle/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/ormlTokens/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/ormlTokens/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/rpc/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/rpc/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/author/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/author/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/chain/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/chain/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/childstate/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/childstate/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/offchain/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/offchain/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/offchain/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/payment/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/payment/runtime.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/payment/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/state/rpc.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/state/definitions.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/create/lazy.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/signedExtensions/emptyCheck.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/signedExtensions/polkadot.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/signedExtensions/shell.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/signedExtensions/statemint.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/signedExtensions/substrate.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/signedExtensions/index.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/Event.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/index.types.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/v4/Extrinsic.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/constants.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/Extrinsic.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/ExtrinsicEra.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/ExtrinsicPayload.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/ExtrinsicPayloadUnknown.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/ExtrinsicUnknown.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/SignerPayload.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/util.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/v4/ExtrinsicPayload.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/extrinsic/v4/ExtrinsicSignature.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/ethereum/AccountId.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/AccountIndex.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/ethereum/LookupSource.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/AccountId.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/Block.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/Call.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/ChainProperties.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/ConsensusEngineId.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/LookupSource.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/MultiAddress.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/generic/Vote.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/primitive/Data.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/util/flattenUniq.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/util/getSiName.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/util/extractTypes.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/util/validateTypes.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/util/getUniqTypes.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/util/toCallsOnly.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/primitive/StorageKey.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/v9/toV10.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/v10/toV11.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/v11/toV12.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/v12/toV13.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/interfaces/alias.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/v13/toV14.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/v14/toLatest.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/MagicNumber.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/MetadataVersioned.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/Metadata.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/decorate/util.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/decorate/constants/index.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/decorate/events/index.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/decorate/extrinsics/createUnchecked.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/decorate/extrinsics/index.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/PortableRegistry/PortableRegistry.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/metadata/PortableRegistry/toV1.js", "../../../node_modules/@polkadot/api-contract/node_modules/@polkadot/types/create/registry.js", "../../../node_modules/@polkadot/api-contract/Abi/toV1.js", "../../../node_modules/@polkadot/api-contract/Abi/toV2.js", "../../../node_modules/@polkadot/api-contract/Abi/toV3.js", "../../../node_modules/@polkadot/api-contract/Abi/toV4.js", "../../../node_modules/@polkadot/api-contract/Abi/toLatest.js", "../../../node_modules/@polkadot/api-contract/Abi/index.js", "../../../node_modules/@polkadot/api-contract/util.js", "../../../node_modules/@polkadot/api-contract/base/Base.js", "../../../node_modules/@polkadot/api-contract/base/util.js", "../../../node_modules/@polkadot/api-contract/base/Contract.js", "../../../node_modules/@polkadot/api-contract/promise/index.js", "../../../node_modules/@polkadot/extension-dapp/bundle.js", "../../../node_modules/@polkadot/x-global/index.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/x-textdecoder/fallback.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/x-textdecoder/browser.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/x-textencoder/fallback.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/x-textencoder/browser.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/is/function.js", "../../../node_modules/@polkadot/x-bigint/index.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/hex/toU8a.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/is/hex.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/has.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/is/buffer.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/is/u8a.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/string/toU8a.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/u8a/toU8a.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/u8a/concat.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util/u8a/toString.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/x-randomvalues/browser.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-bridge/wbg.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-bridge/bridge.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-bridge/init.js", "../../../node_modules/@polkadot/wasm-util/base64.js", "../../../node_modules/@polkadot/wasm-util/fflate.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto-wasm/bundle.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto-init/wasm.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto/init.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto/bundle.js", "../../../node_modules/@scure/base/index.ts", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/base32/helpers.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/base58/bs58.js", "../../../node_modules/@noble/hashes/src/_assert.ts", "../../../node_modules/@noble/hashes/src/utils.ts", "../../../node_modules/@noble/hashes/src/_blake.ts", "../../../node_modules/@noble/hashes/src/_u64.ts", "../../../node_modules/@noble/hashes/src/blake2b.ts", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/blake2/asU8a.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/address/sshash.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/address/checksum.js", "../../../node_modules/@substrate/ss58-registry/esm/index.js", "../../../node_modules/@polkadot/networks/defaults/genesis.js", "../../../node_modules/@polkadot/networks/defaults/icons.js", "../../../node_modules/@polkadot/networks/defaults/ledger.js", "../../../node_modules/@polkadot/networks/defaults/testnets.js", "../../../node_modules/@polkadot/networks/interfaces.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/address/defaults.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/address/decode.js", "../../../node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/address/encode.js", "../../javascript/src/polkadotjs.js", "../../javascript/src/secretjs.js", "../../javascript/src/toastr.js", "../../../node_modules/@rails/activestorage/app/assets/javascripts/activestorage.esm.js", "../../../node_modules/just-extend/index.esm.js", "../../../node_modules/dropzone/dist/src/dropzone.js", "../../../node_modules/dropzone/dist/src/emitter.js", "../../../node_modules/dropzone/dist/src/options.js", "../../../node_modules/dropzone/dist/node_modules/@parcel/runtime-js/lib/bundles/runtime-044f6de40395a564.js", "../../javascript/src/secret_network/constants.js", "../../javascript/src/secret_network/helpers.js", "../../javascript/src/application/account.js", "../../javascript/src/aleph_zero/constants.js", "../../javascript/src/aleph_zero/tokens.js", "../../javascript/src/aleph_zero/helpers.js", "../../javascript/src/application/button_migration.js", "../../javascript/src/application/trading.js", "../../javascript/src/application/_balance.js", "../../javascript/src/application/_token_button.js", "../../javascript/src/application/_transactions_table.js", "../../javascript/src/aleph_zero/pages/button_swap.js", "../../javascript/src/aleph_zero/pages/desuntralised.js", "../../javascript/src/secret_network/address_alias.js", "../../javascript/src/secret_network/block_locker.js", "../../javascript/src/secret_network/butt_lode.js", "../../javascript/src/secret_network/button_swap.js", "../../javascript/src/secret_network/mount_doom.js", "../../javascript/src/secret_network/password_manager.js", "../../javascript/src/secret_network/pools.js", "../../javascript/src/secret_network/smart_contract_interface.js", "../../javascript/src/secret_network/transactions.js", "../../javascript/application.js"], "sourcesContent": ["'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n", "/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n", "/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n", "/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

' + func(text) + '

';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

fred, barney, & pebbles

'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('d\u00E9j\u00E0 vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '\n * ```\n * @nocollapse\n * @category styles\n */\n static styles?: CSSResultGroup;\n\n /**\n * The set of properties defined by this class that caused an accessor to be\n * added during `createProperty`.\n * @nocollapse\n */\n private static __reactivePropertyKeys?: Set;\n\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // note: piggy backing on this to ensure we're finalized.\n this.finalize();\n const attributes: string[] = [];\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this.elementProperties.forEach((v, p) => {\n const attr = this.__attributeNameForProperty(p, v);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n attributes.push(attr);\n }\n });\n return attributes;\n }\n\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(\n name: PropertyKey,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n // if this is a state property, force the attribute to false.\n if (options.state) {\n // Cast as any since this is readonly.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (options as any).attribute = false;\n }\n // Note, since this can be called by the `@property` decorator which\n // is called before `finalize`, we ensure finalization has been kicked off.\n this.finalize();\n this.elementProperties.set(name, options);\n // Do not generate an accessor if the prototype already has one, since\n // it would be lost otherwise and that would never be the user's intention;\n // Instead, we expect users to call `requestUpdate` themselves from\n // user-defined accessors. Note that if the super has an accessor we will\n // still overwrite it\n if (!options.noAccessor && !this.prototype.hasOwnProperty(name)) {\n const key = typeof name === 'symbol' ? Symbol() : `__${name}`;\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n Object.defineProperty(this.prototype, name, descriptor);\n if (DEV_MODE) {\n // If this class doesn't have its own set, create one and initialize\n // with the values in the set from the nearest ancestor class, if any.\n if (!this.hasOwnProperty('__reactivePropertyKeys')) {\n this.__reactivePropertyKeys = new Set(\n this.__reactivePropertyKeys ?? []\n );\n }\n this.__reactivePropertyKeys!.add(name);\n }\n }\n }\n }\n\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n protected static getPropertyDescriptor(\n name: PropertyKey,\n key: string | symbol,\n options: PropertyDeclaration\n ): PropertyDescriptor | undefined {\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(): any {\n return (this as {[key: string]: unknown})[key as string];\n },\n set(this: ReactiveElement, value: unknown) {\n const oldValue = (this as {} as {[key: string]: unknown})[\n name as string\n ];\n (this as {} as {[key: string]: unknown})[key as string] = value;\n (this as unknown as ReactiveElement).requestUpdate(\n name,\n oldValue,\n options\n );\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name: PropertyKey) {\n return this.elementProperties.get(name) || defaultPropertyDeclaration;\n }\n\n /**\n * Creates property accessors for registered properties, sets up element\n * styling, and ensures any superclasses are also finalized. Returns true if\n * the element was finalized.\n * @nocollapse\n */\n protected static finalize() {\n if (this.hasOwnProperty(finalized)) {\n return false;\n }\n this[finalized] = true;\n // finalize any superclasses\n const superCtor = Object.getPrototypeOf(this) as typeof ReactiveElement;\n superCtor.finalize();\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n this.elementProperties = new Map(superCtor.elementProperties);\n // initialize Map populated in observedAttributes\n this.__attributeToPropertyMap = new Map();\n // make any properties\n // Note, only process \"own\" properties since this element will inherit\n // any properties defined on the superClass, and finalization ensures\n // the entire prototype chain is finalized.\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n // support symbols in properties (IE11 does not support this)\n const propKeys = [\n ...Object.getOwnPropertyNames(props),\n ...Object.getOwnPropertySymbols(props),\n ];\n // This for/of is ok because propKeys is an array\n for (const p of propKeys) {\n // note, use of `any` is due to TypeScript lack of support for symbol in\n // index types\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.createProperty(p, (props as any)[p]);\n }\n }\n this.elementStyles = this.finalizeStyles(this.styles);\n // DEV mode warnings\n if (DEV_MODE) {\n const warnRemovedOrRenamed = (name: string, renamed = false) => {\n if (this.prototype.hasOwnProperty(name)) {\n issueWarning(\n renamed ? 'renamed-api' : 'removed-api',\n `\\`${name}\\` is implemented on class ${this.name}. It ` +\n `has been ${renamed ? 'renamed' : 'removed'} ` +\n `in this version of LitElement.`\n );\n }\n };\n warnRemovedOrRenamed('initialize');\n warnRemovedOrRenamed('requestUpdateInternal');\n warnRemovedOrRenamed('_getUpdateComplete', true);\n }\n return true;\n }\n\n /**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n protected static finalizeStyles(\n styles?: CSSResultGroup\n ): Array {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set((styles as Array).flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s as CSSResultOrNative));\n }\n } else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n * @category rendering\n */\n readonly renderRoot!: HTMLElement | ShadowRoot;\n\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n private static __attributeNameForProperty(\n name: PropertyKey,\n options: PropertyDeclaration\n ) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n\n private __instanceProperties?: PropertyValues = new Map();\n // Initialize to an unresolved Promise so we can make sure the element has\n // connected before first update.\n private __updatePromise!: Promise;\n\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n isUpdatePending = false;\n\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n hasUpdated = false;\n\n /**\n * Map with keys for any properties that have changed since the last\n * update cycle with previous values.\n *\n * @internal\n */\n _$changedProperties!: PropertyValues;\n\n /**\n * Map with keys of properties that should be reflected when updated.\n */\n private __reflectingProperties?: Map;\n\n /**\n * Name of currently reflecting property\n */\n private __reflectingProperty: PropertyKey | null = null;\n\n /**\n * Set of controllers.\n */\n private __controllers?: ReactiveController[];\n\n constructor() {\n super();\n this.__initialize();\n }\n\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n */\n private __initialize() {\n this.__updatePromise = new Promise(\n (res) => (this.enableUpdating = res)\n );\n this._$changedProperties = new Map();\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n (this.constructor as typeof ReactiveElement)._initializers?.forEach((i) =>\n i(this)\n );\n }\n\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller: ReactiveController) {\n (this.__controllers ??= []).push(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller: ReactiveController) {\n // Note, if the indexOf is -1, the >>> will flip the sign which makes the\n // splice do nothing.\n this.__controllers?.splice(this.__controllers.indexOf(controller) >>> 0, 1);\n }\n\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n private __saveInstanceProperties() {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n (this.constructor as typeof ReactiveElement).elementProperties.forEach(\n (_v, p) => {\n if (this.hasOwnProperty(p)) {\n this.__instanceProperties!.set(p, this[p as keyof this]);\n delete this[p as keyof this];\n }\n }\n );\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n protected createRenderRoot(): Element | ShadowRoot {\n const renderRoot =\n this.shadowRoot ??\n this.attachShadow(\n (this.constructor as typeof ReactiveElement).shadowRootOptions\n );\n adoptStyles(\n renderRoot,\n (this.constructor as typeof ReactiveElement).elementStyles\n );\n return renderRoot;\n }\n\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // create renderRoot before first update.\n if (this.renderRoot === undefined) {\n (\n this as {\n renderRoot: Element | DocumentFragment;\n }\n ).renderRoot = this.createRenderRoot();\n }\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n protected enableUpdating(_requestedUpdate: boolean) {}\n\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(\n name: string,\n _old: string | null,\n value: string | null\n ) {\n this._$attributeToProperty(name, value);\n }\n\n private __propertyToAttribute(\n name: PropertyKey,\n value: unknown,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n const attr = (\n this.constructor as typeof ReactiveElement\n ).__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter =\n (options.converter as ComplexAttributeConverter)?.toAttribute !==\n undefined\n ? (options.converter as ComplexAttributeConverter)\n : defaultConverter;\n const attrValue = converter.toAttribute!(value, options.type);\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.indexOf(\n 'migration'\n ) >= 0 &&\n attrValue === undefined\n ) {\n issueWarning(\n 'undefined-attribute-value',\n `The attribute value for the ${name as string} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`\n );\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n } else {\n this.setAttribute(attr, attrValue as string);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /** @internal */\n _$attributeToProperty(name: string, value: string | null) {\n const ctor = this.constructor as typeof ReactiveElement;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = (ctor.__attributeToPropertyMap as AttributeMap).get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter =\n typeof options.converter === 'function'\n ? {fromAttribute: options.converter}\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n this[propName as keyof this] = converter.fromAttribute!(\n value,\n options.type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @category updates\n */\n requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration\n ): void {\n let shouldRequestUpdate = true;\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n options =\n options ||\n (this.constructor as typeof ReactiveElement).getPropertyOptions(name);\n const hasChanged = options.hasChanged || notEqual;\n if (hasChanged(this[name as keyof this], oldValue)) {\n if (!this._$changedProperties.has(name)) {\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `_reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true && this.__reflectingProperty !== name) {\n if (this.__reflectingProperties === undefined) {\n this.__reflectingProperties = new Map();\n }\n this.__reflectingProperties.set(name, options);\n }\n } else {\n // Abort the request if the property should not be considered changed.\n shouldRequestUpdate = false;\n }\n }\n if (!this.isUpdatePending && shouldRequestUpdate) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n // Note, since this no longer returns a promise, in dev mode we return a\n // thenable which warns if it's called.\n return DEV_MODE\n ? (requestUpdateThenable(this.localName) as unknown as void)\n : undefined;\n }\n\n /**\n * Sets up the element to asynchronously update.\n */\n private async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n } catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n protected scheduleUpdate(): void | Promise {\n return this.performUpdate();\n }\n\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * Note: To ensure `performUpdate()` synchronously completes a pending update,\n * it should not be overridden. In LitElement 2.x it was suggested to override\n * `performUpdate()` to also customizing update scheduling. Instead, you should now\n * override `scheduleUpdate()`. For backwards compatibility with LitElement 2.x,\n * scheduling updates via `performUpdate()` continues to work, but will make\n * also calling `performUpdate()` to synchronously process updates difficult.\n *\n * @category updates\n */\n protected performUpdate(): void | Promise {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({kind: 'update'});\n // create renderRoot before first update.\n if (!this.hasUpdated) {\n // Produce warning if any class properties are shadowed by class fields\n if (DEV_MODE) {\n const shadowedProperties: string[] = [];\n (\n this.constructor as typeof ReactiveElement\n ).__reactivePropertyKeys?.forEach((p) => {\n if (this.hasOwnProperty(p) && !this.__instanceProperties?.has(p)) {\n shadowedProperties.push(p as string);\n }\n });\n if (shadowedProperties.length) {\n throw new Error(\n `The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`\n );\n }\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.__instanceProperties!.forEach((v, p) => ((this as any)[p] = v));\n this.__instanceProperties = undefined;\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n } else {\n this.__markUpdated();\n }\n } catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n protected willUpdate(_changedProperties: PropertyValues): void {}\n\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties: PropertyValues) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (\n DEV_MODE &&\n this.isUpdatePending &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.indexOf(\n 'change-in-update'\n ) >= 0\n ) {\n issueWarning(\n 'change-in-update',\n `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`\n );\n }\n }\n\n private __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete(): Promise {\n return this.getUpdateComplete();\n }\n\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n protected getUpdateComplete(): Promise {\n return this.__updatePromise;\n }\n\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected shouldUpdate(_changedProperties: PropertyValues): boolean {\n return true;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected update(_changedProperties: PropertyValues) {\n if (this.__reflectingProperties !== undefined) {\n // Use forEach so this works even if for/of loops are compiled to for\n // loops expecting arrays\n this.__reflectingProperties.forEach((v, k) =>\n this.__propertyToAttribute(k, this[k as keyof this], v)\n );\n this.__reflectingProperties = undefined;\n }\n this.__markUpdated();\n }\n\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected updated(_changedProperties: PropertyValues) {}\n\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected firstUpdated(_changedProperties: PropertyValues) {}\n}\n\n// Apply polyfills if available\npolyfillSupport?.({ReactiveElement});\n\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = ['change-in-update'];\n const ensureOwnWarnings = function (ctor: typeof ReactiveElement) {\n if (\n !ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))\n ) {\n ctor.enabledWarnings = ctor.enabledWarnings!.slice();\n }\n };\n ReactiveElement.enableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n if (this.enabledWarnings!.indexOf(warning) < 0) {\n this.enabledWarnings!.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings!.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings!.splice(i, 1);\n }\n };\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('1.6.3');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// IMPORTANT: these imports must be type-only\nimport type {Directive, DirectiveResult, PartInfo} from './directive.js';\n\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n// Use window for browser builds because IE11 doesn't have globalThis.\nconst global = NODE_MODE ? globalThis : window;\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace LitUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry =\n | TemplatePrep\n | TemplateInstantiated\n | TemplateInstantiatedAndUpdated\n | TemplateUpdating\n | BeginRender\n | EndRender\n | CommitPartEntry\n | SetPartValue;\n export interface TemplatePrep {\n kind: 'template prep';\n template: Template;\n strings: TemplateStringsArray;\n clonableTemplate: HTMLTemplateElement;\n parts: TemplatePart[];\n }\n export interface BeginRender {\n kind: 'begin render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart | undefined;\n }\n export interface EndRender {\n kind: 'end render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart;\n }\n export interface TemplateInstantiated {\n kind: 'template instantiated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array;\n values: unknown[];\n }\n export interface TemplateInstantiatedAndUpdated {\n kind: 'template instantiated and updated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array;\n values: unknown[];\n }\n export interface TemplateUpdating {\n kind: 'template updating';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n parts: Array;\n values: unknown[];\n }\n export interface SetPartValue {\n kind: 'set part';\n part: Part;\n value: unknown;\n valueIndex: number;\n values: unknown[];\n templateInstance: TemplateInstance;\n }\n\n export type CommitPartEntry =\n | CommitNothingToChildEntry\n | CommitText\n | CommitNode\n | CommitAttribute\n | CommitProperty\n | CommitBooleanAttribute\n | CommitEventListener\n | CommitToElementBinding;\n\n export interface CommitNothingToChildEntry {\n kind: 'commit nothing to child';\n start: ChildNode;\n end: ChildNode | null;\n parent: Disconnectable | undefined;\n options: RenderOptions | undefined;\n }\n\n export interface CommitText {\n kind: 'commit text';\n node: Text;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitNode {\n kind: 'commit node';\n start: Node;\n parent: Disconnectable | undefined;\n value: Node;\n options: RenderOptions | undefined;\n }\n\n export interface CommitAttribute {\n kind: 'commit attribute';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitProperty {\n kind: 'commit property';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitBooleanAttribute {\n kind: 'commit boolean attribute';\n element: Element;\n name: string;\n value: boolean;\n options: RenderOptions | undefined;\n }\n\n export interface CommitEventListener {\n kind: 'commit event listener';\n element: Element;\n name: string;\n value: unknown;\n oldListener: unknown;\n options: RenderOptions | undefined;\n // True if we're removing the old event listener (e.g. because settings changed, or value is nothing)\n removeListener: boolean;\n // True if we're adding a new event listener (e.g. because first render, or settings changed)\n addListener: boolean;\n }\n\n export interface CommitToElementBinding {\n kind: 'commit to element binding';\n element: Element;\n value: unknown;\n options: RenderOptions | undefined;\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: LitUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent('lit-debug', {\n detail: event,\n })\n );\n }\n : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n global.litIssuedWarnings ??= new Set();\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!global.litIssuedWarnings!.has(warning)) {\n console.warn(warning);\n global.litIssuedWarnings!.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`\n );\n}\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n global.ShadyDOM?.inUse &&\n global.ShadyDOM?.noPatch === true\n ? global.ShadyDOM!.wrap\n : (node: Node) => node;\n\nconst trustedTypes = (global as unknown as Partial).trustedTypes;\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n ? trustedTypes.createPolicy('lit-html', {\n createHTML: (s) => s,\n })\n : undefined;\n\n/**\n * Used to sanitize any value before it is written into the DOM. This can be\n * used to implement a security policy of allowed and disallowed values in\n * order to prevent XSS attacks.\n *\n * One way of using this callback would be to check attributes and properties\n * against a list of high risk fields, and require that values written to such\n * fields be instances of a class which is safe by construction. Closure's Safe\n * HTML Types is one implementation of this technique (\n * https://github.com/google/safe-html-types/blob/master/doc/safehtml-types.md).\n * The TrustedTypes polyfill in API-only mode could also be used as a basis\n * for this technique (https://github.com/WICG/trusted-types).\n *\n * @param node The HTML node (usually either a #text node or an Element) that\n * is being written to. Note that this is just an exemplar node, the write\n * may take place against another instance of the same class of node.\n * @param name The name of an attribute or property (for example, 'href').\n * @param type Indicates whether the write that's about to be performed will\n * be to a property or a node.\n * @return A function that will sanitize this class of writes.\n */\nexport type SanitizerFactory = (\n node: Node,\n name: string,\n type: 'property' | 'attribute'\n) => ValueSanitizer;\n\n/**\n * A function which can sanitize values that will be written to a specific kind\n * of DOM sink.\n *\n * See SanitizerFactory.\n *\n * @param value The value to sanitize. Will be the actual value passed into\n * the lit-html template literal, so this could be of any type.\n * @return The value to write to the DOM. Usually the same as the input value,\n * unless sanitization is needed.\n */\nexport type ValueSanitizer = (value: unknown) => unknown;\n\nconst identityFunction: ValueSanitizer = (value: unknown) => value;\nconst noopSanitizer: SanitizerFactory = (\n _node: Node,\n _name: string,\n _type: 'property' | 'attribute'\n) => identityFunction;\n\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer: SanitizerFactory) => {\n if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n return;\n }\n if (sanitizerFactoryInternal !== noopSanitizer) {\n throw new Error(\n `Attempted to overwrite existing lit-html security policy.` +\n ` setSanitizeDOMValueFactory should be called at most once.`\n );\n }\n sanitizerFactoryInternal = newSanitizer;\n};\n\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n sanitizerFactoryInternal = noopSanitizer;\n};\n\nconst createSanitizer: SanitizerFactory = (node, name, type) => {\n return sanitizerFactoryInternal(node, name, type);\n};\n\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${String(Math.random()).slice(9)}$`;\n\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\n\nconst d =\n NODE_MODE && global.document === undefined\n ? ({\n createTreeWalker() {\n return {};\n },\n } as unknown as Document)\n : document;\n\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = () => d.createComment('');\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\nconst isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value: unknown): value is Iterable =>\n isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof (value as any)?.[Symbol.iterator] === 'function';\n\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n\n/**\n * End of text is: `<` followed by:\n * (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\n\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with `--my-button-color`\n prop = prop.includes('-')\n ? prop\n : prop\n .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, '-$&')\n .toLowerCase();\n return style + `${prop}:${value};`;\n }, '');\n }\n\n override update(part: AttributePart, [styleInfo]: DirectiveParameters) {\n const {style} = part.element as HTMLElement;\n\n if (this._previousStyleProperties === undefined) {\n this._previousStyleProperties = new Set();\n for (const name in styleInfo) {\n this._previousStyleProperties.add(name);\n }\n return this.render(styleInfo);\n }\n\n // Remove old properties that no longer exist in styleInfo\n // We use forEach() instead of for-of so that re don't require down-level\n // iteration.\n this._previousStyleProperties!.forEach((name) => {\n // If the name isn't in styleInfo or it's null/undefined\n if (styleInfo[name] == null) {\n this._previousStyleProperties!.delete(name);\n if (name.includes('-')) {\n style.removeProperty(name);\n } else {\n // Note reset using empty string (vs null) as IE11 does not always\n // reset via null (https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style#setting_styles)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = '';\n }\n }\n });\n\n // Add or update properties\n for (const name in styleInfo) {\n const value = styleInfo[name];\n if (value != null) {\n this._previousStyleProperties.add(name);\n const isImportant =\n typeof value === 'string' && value.endsWith(importantFlag);\n if (name.includes('-') || isImportant) {\n style.setProperty(\n name,\n isImportant\n ? (value as string).slice(0, flagTrim)\n : (value as string),\n isImportant ? important : ''\n );\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = value;\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies CSS properties to an element.\n *\n * `styleMap` can only be used in the `style` attribute and must be the only\n * expression in the attribute. It takes the property names in the\n * {@link StyleInfo styleInfo} object and adds the properties to the inline\n * style of the element.\n *\n * Property names with dashes (`-`) are assumed to be valid CSS\n * property names and set on the element's style object using `setProperty()`.\n * Names without dashes are assumed to be camelCased JavaScript property names\n * and set on the element's style object using property assignment, allowing the\n * style object to translate JavaScript-style names to CSS property names.\n *\n * For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':\n * '0'})` sets the `background-color`, `border-top` and `--size` properties.\n *\n * @param styleInfo\n * @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}\n */\nexport const styleMap = directive(StyleMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {StyleMapDirective};\n", "export*from\"lit-html/directives/style-map.js\";\n//# sourceMappingURL=style-map.js.map\n", "//---------------------------------------------------------------------\n//\n// QR Code Generator for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word 'QR Code' is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n\nvar qrcode = function() {\n\n //---------------------------------------------------------------------\n // qrcode\n //---------------------------------------------------------------------\n\n /**\n * qrcode\n * @param typeNumber 1 to 40\n * @param errorCorrectionLevel 'L','M','Q','H'\n */\n var qrcode = function(typeNumber, errorCorrectionLevel) {\n\n var PAD0 = 0xEC;\n var PAD1 = 0x11;\n\n var _typeNumber = typeNumber;\n var _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel];\n var _modules = null;\n var _moduleCount = 0;\n var _dataCache = null;\n var _dataList = [];\n\n var _this = {};\n\n var makeImpl = function(test, maskPattern) {\n\n _moduleCount = _typeNumber * 4 + 17;\n _modules = function(moduleCount) {\n var modules = new Array(moduleCount);\n for (var row = 0; row < moduleCount; row += 1) {\n modules[row] = new Array(moduleCount);\n for (var col = 0; col < moduleCount; col += 1) {\n modules[row][col] = null;\n }\n }\n return modules;\n }(_moduleCount);\n\n setupPositionProbePattern(0, 0);\n setupPositionProbePattern(_moduleCount - 7, 0);\n setupPositionProbePattern(0, _moduleCount - 7);\n setupPositionAdjustPattern();\n setupTimingPattern();\n setupTypeInfo(test, maskPattern);\n\n if (_typeNumber >= 7) {\n setupTypeNumber(test);\n }\n\n if (_dataCache == null) {\n _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);\n }\n\n mapData(_dataCache, maskPattern);\n };\n\n var setupPositionProbePattern = function(row, col) {\n\n for (var r = -1; r <= 7; r += 1) {\n\n if (row + r <= -1 || _moduleCount <= row + r) continue;\n\n for (var c = -1; c <= 7; c += 1) {\n\n if (col + c <= -1 || _moduleCount <= col + c) continue;\n\n if ( (0 <= r && r <= 6 && (c == 0 || c == 6) )\n || (0 <= c && c <= 6 && (r == 0 || r == 6) )\n || (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {\n _modules[row + r][col + c] = true;\n } else {\n _modules[row + r][col + c] = false;\n }\n }\n }\n };\n\n var getBestMaskPattern = function() {\n\n var minLostPoint = 0;\n var pattern = 0;\n\n for (var i = 0; i < 8; i += 1) {\n\n makeImpl(true, i);\n\n var lostPoint = QRUtil.getLostPoint(_this);\n\n if (i == 0 || minLostPoint > lostPoint) {\n minLostPoint = lostPoint;\n pattern = i;\n }\n }\n\n return pattern;\n };\n\n var setupTimingPattern = function() {\n\n for (var r = 8; r < _moduleCount - 8; r += 1) {\n if (_modules[r][6] != null) {\n continue;\n }\n _modules[r][6] = (r % 2 == 0);\n }\n\n for (var c = 8; c < _moduleCount - 8; c += 1) {\n if (_modules[6][c] != null) {\n continue;\n }\n _modules[6][c] = (c % 2 == 0);\n }\n };\n\n var setupPositionAdjustPattern = function() {\n\n var pos = QRUtil.getPatternPosition(_typeNumber);\n\n for (var i = 0; i < pos.length; i += 1) {\n\n for (var j = 0; j < pos.length; j += 1) {\n\n var row = pos[i];\n var col = pos[j];\n\n if (_modules[row][col] != null) {\n continue;\n }\n\n for (var r = -2; r <= 2; r += 1) {\n\n for (var c = -2; c <= 2; c += 1) {\n\n if (r == -2 || r == 2 || c == -2 || c == 2\n || (r == 0 && c == 0) ) {\n _modules[row + r][col + c] = true;\n } else {\n _modules[row + r][col + c] = false;\n }\n }\n }\n }\n }\n };\n\n var setupTypeNumber = function(test) {\n\n var bits = QRUtil.getBCHTypeNumber(_typeNumber);\n\n for (var i = 0; i < 18; i += 1) {\n var mod = (!test && ( (bits >> i) & 1) == 1);\n _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod;\n }\n\n for (var i = 0; i < 18; i += 1) {\n var mod = (!test && ( (bits >> i) & 1) == 1);\n _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod;\n }\n };\n\n var setupTypeInfo = function(test, maskPattern) {\n\n var data = (_errorCorrectionLevel << 3) | maskPattern;\n var bits = QRUtil.getBCHTypeInfo(data);\n\n // vertical\n for (var i = 0; i < 15; i += 1) {\n\n var mod = (!test && ( (bits >> i) & 1) == 1);\n\n if (i < 6) {\n _modules[i][8] = mod;\n } else if (i < 8) {\n _modules[i + 1][8] = mod;\n } else {\n _modules[_moduleCount - 15 + i][8] = mod;\n }\n }\n\n // horizontal\n for (var i = 0; i < 15; i += 1) {\n\n var mod = (!test && ( (bits >> i) & 1) == 1);\n\n if (i < 8) {\n _modules[8][_moduleCount - i - 1] = mod;\n } else if (i < 9) {\n _modules[8][15 - i - 1 + 1] = mod;\n } else {\n _modules[8][15 - i - 1] = mod;\n }\n }\n\n // fixed module\n _modules[_moduleCount - 8][8] = (!test);\n };\n\n var mapData = function(data, maskPattern) {\n\n var inc = -1;\n var row = _moduleCount - 1;\n var bitIndex = 7;\n var byteIndex = 0;\n var maskFunc = QRUtil.getMaskFunction(maskPattern);\n\n for (var col = _moduleCount - 1; col > 0; col -= 2) {\n\n if (col == 6) col -= 1;\n\n while (true) {\n\n for (var c = 0; c < 2; c += 1) {\n\n if (_modules[row][col - c] == null) {\n\n var dark = false;\n\n if (byteIndex < data.length) {\n dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1);\n }\n\n var mask = maskFunc(row, col - c);\n\n if (mask) {\n dark = !dark;\n }\n\n _modules[row][col - c] = dark;\n bitIndex -= 1;\n\n if (bitIndex == -1) {\n byteIndex += 1;\n bitIndex = 7;\n }\n }\n }\n\n row += inc;\n\n if (row < 0 || _moduleCount <= row) {\n row -= inc;\n inc = -inc;\n break;\n }\n }\n }\n };\n\n var createBytes = function(buffer, rsBlocks) {\n\n var offset = 0;\n\n var maxDcCount = 0;\n var maxEcCount = 0;\n\n var dcdata = new Array(rsBlocks.length);\n var ecdata = new Array(rsBlocks.length);\n\n for (var r = 0; r < rsBlocks.length; r += 1) {\n\n var dcCount = rsBlocks[r].dataCount;\n var ecCount = rsBlocks[r].totalCount - dcCount;\n\n maxDcCount = Math.max(maxDcCount, dcCount);\n maxEcCount = Math.max(maxEcCount, ecCount);\n\n dcdata[r] = new Array(dcCount);\n\n for (var i = 0; i < dcdata[r].length; i += 1) {\n dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset];\n }\n offset += dcCount;\n\n var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);\n var rawPoly = qrPolynomial(dcdata[r], rsPoly.getLength() - 1);\n\n var modPoly = rawPoly.mod(rsPoly);\n ecdata[r] = new Array(rsPoly.getLength() - 1);\n for (var i = 0; i < ecdata[r].length; i += 1) {\n var modIndex = i + modPoly.getLength() - ecdata[r].length;\n ecdata[r][i] = (modIndex >= 0)? modPoly.getAt(modIndex) : 0;\n }\n }\n\n var totalCodeCount = 0;\n for (var i = 0; i < rsBlocks.length; i += 1) {\n totalCodeCount += rsBlocks[i].totalCount;\n }\n\n var data = new Array(totalCodeCount);\n var index = 0;\n\n for (var i = 0; i < maxDcCount; i += 1) {\n for (var r = 0; r < rsBlocks.length; r += 1) {\n if (i < dcdata[r].length) {\n data[index] = dcdata[r][i];\n index += 1;\n }\n }\n }\n\n for (var i = 0; i < maxEcCount; i += 1) {\n for (var r = 0; r < rsBlocks.length; r += 1) {\n if (i < ecdata[r].length) {\n data[index] = ecdata[r][i];\n index += 1;\n }\n }\n }\n\n return data;\n };\n\n var createData = function(typeNumber, errorCorrectionLevel, dataList) {\n\n var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel);\n\n var buffer = qrBitBuffer();\n\n for (var i = 0; i < dataList.length; i += 1) {\n var data = dataList[i];\n buffer.put(data.getMode(), 4);\n buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );\n data.write(buffer);\n }\n\n // calc num max data.\n var totalDataCount = 0;\n for (var i = 0; i < rsBlocks.length; i += 1) {\n totalDataCount += rsBlocks[i].dataCount;\n }\n\n if (buffer.getLengthInBits() > totalDataCount * 8) {\n throw 'code length overflow. ('\n + buffer.getLengthInBits()\n + '>'\n + totalDataCount * 8\n + ')';\n }\n\n // end code\n if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {\n buffer.put(0, 4);\n }\n\n // padding\n while (buffer.getLengthInBits() % 8 != 0) {\n buffer.putBit(false);\n }\n\n // padding\n while (true) {\n\n if (buffer.getLengthInBits() >= totalDataCount * 8) {\n break;\n }\n buffer.put(PAD0, 8);\n\n if (buffer.getLengthInBits() >= totalDataCount * 8) {\n break;\n }\n buffer.put(PAD1, 8);\n }\n\n return createBytes(buffer, rsBlocks);\n };\n\n _this.addData = function(data, mode) {\n\n mode = mode || 'Byte';\n\n var newData = null;\n\n switch(mode) {\n case 'Numeric' :\n newData = qrNumber(data);\n break;\n case 'Alphanumeric' :\n newData = qrAlphaNum(data);\n break;\n case 'Byte' :\n newData = qr8BitByte(data);\n break;\n case 'Kanji' :\n newData = qrKanji(data);\n break;\n default :\n throw 'mode:' + mode;\n }\n\n _dataList.push(newData);\n _dataCache = null;\n };\n\n _this.isDark = function(row, col) {\n if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) {\n throw row + ',' + col;\n }\n return _modules[row][col];\n };\n\n _this.getModuleCount = function() {\n return _moduleCount;\n };\n\n _this.make = function() {\n if (_typeNumber < 1) {\n var typeNumber = 1;\n\n for (; typeNumber < 40; typeNumber++) {\n var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, _errorCorrectionLevel);\n var buffer = qrBitBuffer();\n\n for (var i = 0; i < _dataList.length; i++) {\n var data = _dataList[i];\n buffer.put(data.getMode(), 4);\n buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );\n data.write(buffer);\n }\n\n var totalDataCount = 0;\n for (var i = 0; i < rsBlocks.length; i++) {\n totalDataCount += rsBlocks[i].dataCount;\n }\n\n if (buffer.getLengthInBits() <= totalDataCount * 8) {\n break;\n }\n }\n\n _typeNumber = typeNumber;\n }\n\n makeImpl(false, getBestMaskPattern() );\n };\n\n _this.createTableTag = function(cellSize, margin) {\n\n cellSize = cellSize || 2;\n margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n var qrHtml = '';\n\n qrHtml += '' +\n escapeXml(title.text) + '' : '';\n qrSvg += (alt.text) ? '' +\n escapeXml(alt.text) + '' : '';\n qrSvg += '';\n qrSvg += '': escaped += '>'; break;\n case '&': escaped += '&'; break;\n case '\"': escaped += '"'; break;\n default : escaped += c; break;\n }\n }\n return escaped;\n };\n\n var _createHalfASCII = function(margin) {\n var cellSize = 1;\n margin = (typeof margin == 'undefined')? cellSize * 2 : margin;\n\n var size = _this.getModuleCount() * cellSize + margin * 2;\n var min = margin;\n var max = size - margin;\n\n var y, x, r1, r2, p;\n\n var blocks = {\n '\u2588\u2588': '\u2588',\n '\u2588 ': '\u2580',\n ' \u2588': '\u2584',\n ' ': ' '\n };\n\n var blocksLastLineNoMargin = {\n '\u2588\u2588': '\u2580',\n '\u2588 ': '\u2580',\n ' \u2588': ' ',\n ' ': ' '\n };\n\n var ascii = '';\n for (y = 0; y < size; y += 2) {\n r1 = Math.floor((y - min) / cellSize);\n r2 = Math.floor((y + 1 - min) / cellSize);\n for (x = 0; x < size; x += 1) {\n p = '\u2588';\n\n if (min <= x && x < max && min <= y && y < max && _this.isDark(r1, Math.floor((x - min) / cellSize))) {\n p = ' ';\n }\n\n if (min <= x && x < max && min <= y+1 && y+1 < max && _this.isDark(r2, Math.floor((x - min) / cellSize))) {\n p += ' ';\n }\n else {\n p += '\u2588';\n }\n\n // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.\n ascii += (margin < 1 && y+1 >= max) ? blocksLastLineNoMargin[p] : blocks[p];\n }\n\n ascii += '\\n';\n }\n\n if (size % 2 && margin > 0) {\n return ascii.substring(0, ascii.length - size - 1) + Array(size+1).join('\u2580');\n }\n\n return ascii.substring(0, ascii.length-1);\n };\n\n _this.createASCII = function(cellSize, margin) {\n cellSize = cellSize || 1;\n\n if (cellSize < 2) {\n return _createHalfASCII(margin);\n }\n\n cellSize -= 1;\n margin = (typeof margin == 'undefined')? cellSize * 2 : margin;\n\n var size = _this.getModuleCount() * cellSize + margin * 2;\n var min = margin;\n var max = size - margin;\n\n var y, x, r, p;\n\n var white = Array(cellSize+1).join('\u2588\u2588');\n var black = Array(cellSize+1).join(' ');\n\n var ascii = '';\n var line = '';\n for (y = 0; y < size; y += 1) {\n r = Math.floor( (y - min) / cellSize);\n line = '';\n for (x = 0; x < size; x += 1) {\n p = 1;\n\n if (min <= x && x < max && min <= y && y < max && _this.isDark(r, Math.floor((x - min) / cellSize))) {\n p = 0;\n }\n\n // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.\n line += p ? white : black;\n }\n\n for (r = 0; r < cellSize; r += 1) {\n ascii += line + '\\n';\n }\n }\n\n return ascii.substring(0, ascii.length-1);\n };\n\n _this.renderTo2dContext = function(context, cellSize) {\n cellSize = cellSize || 2;\n var length = _this.getModuleCount();\n for (var row = 0; row < length; row++) {\n for (var col = 0; col < length; col++) {\n context.fillStyle = _this.isDark(row, col) ? 'black' : 'white';\n context.fillRect(row * cellSize, col * cellSize, cellSize, cellSize);\n }\n }\n }\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // qrcode.stringToBytes\n //---------------------------------------------------------------------\n\n qrcode.stringToBytesFuncs = {\n 'default' : function(s) {\n var bytes = [];\n for (var i = 0; i < s.length; i += 1) {\n var c = s.charCodeAt(i);\n bytes.push(c & 0xff);\n }\n return bytes;\n }\n };\n\n qrcode.stringToBytes = qrcode.stringToBytesFuncs['default'];\n\n //---------------------------------------------------------------------\n // qrcode.createStringToBytes\n //---------------------------------------------------------------------\n\n /**\n * @param unicodeData base64 string of byte array.\n * [16bit Unicode],[16bit Bytes], ...\n * @param numChars\n */\n qrcode.createStringToBytes = function(unicodeData, numChars) {\n\n // create conversion map.\n\n var unicodeMap = function() {\n\n var bin = base64DecodeInputStream(unicodeData);\n var read = function() {\n var b = bin.read();\n if (b == -1) throw 'eof';\n return b;\n };\n\n var count = 0;\n var unicodeMap = {};\n while (true) {\n var b0 = bin.read();\n if (b0 == -1) break;\n var b1 = read();\n var b2 = read();\n var b3 = read();\n var k = String.fromCharCode( (b0 << 8) | b1);\n var v = (b2 << 8) | b3;\n unicodeMap[k] = v;\n count += 1;\n }\n if (count != numChars) {\n throw count + ' != ' + numChars;\n }\n\n return unicodeMap;\n }();\n\n var unknownChar = '?'.charCodeAt(0);\n\n return function(s) {\n var bytes = [];\n for (var i = 0; i < s.length; i += 1) {\n var c = s.charCodeAt(i);\n if (c < 128) {\n bytes.push(c);\n } else {\n var b = unicodeMap[s.charAt(i)];\n if (typeof b == 'number') {\n if ( (b & 0xff) == b) {\n // 1byte\n bytes.push(b);\n } else {\n // 2bytes\n bytes.push(b >>> 8);\n bytes.push(b & 0xff);\n }\n } else {\n bytes.push(unknownChar);\n }\n }\n }\n return bytes;\n };\n };\n\n //---------------------------------------------------------------------\n // QRMode\n //---------------------------------------------------------------------\n\n var QRMode = {\n MODE_NUMBER : 1 << 0,\n MODE_ALPHA_NUM : 1 << 1,\n MODE_8BIT_BYTE : 1 << 2,\n MODE_KANJI : 1 << 3\n };\n\n //---------------------------------------------------------------------\n // QRErrorCorrectionLevel\n //---------------------------------------------------------------------\n\n var QRErrorCorrectionLevel = {\n L : 1,\n M : 0,\n Q : 3,\n H : 2\n };\n\n //---------------------------------------------------------------------\n // QRMaskPattern\n //---------------------------------------------------------------------\n\n var QRMaskPattern = {\n PATTERN000 : 0,\n PATTERN001 : 1,\n PATTERN010 : 2,\n PATTERN011 : 3,\n PATTERN100 : 4,\n PATTERN101 : 5,\n PATTERN110 : 6,\n PATTERN111 : 7\n };\n\n //---------------------------------------------------------------------\n // QRUtil\n //---------------------------------------------------------------------\n\n var QRUtil = function() {\n\n var PATTERN_POSITION_TABLE = [\n [],\n [6, 18],\n [6, 22],\n [6, 26],\n [6, 30],\n [6, 34],\n [6, 22, 38],\n [6, 24, 42],\n [6, 26, 46],\n [6, 28, 50],\n [6, 30, 54],\n [6, 32, 58],\n [6, 34, 62],\n [6, 26, 46, 66],\n [6, 26, 48, 70],\n [6, 26, 50, 74],\n [6, 30, 54, 78],\n [6, 30, 56, 82],\n [6, 30, 58, 86],\n [6, 34, 62, 90],\n [6, 28, 50, 72, 94],\n [6, 26, 50, 74, 98],\n [6, 30, 54, 78, 102],\n [6, 28, 54, 80, 106],\n [6, 32, 58, 84, 110],\n [6, 30, 58, 86, 114],\n [6, 34, 62, 90, 118],\n [6, 26, 50, 74, 98, 122],\n [6, 30, 54, 78, 102, 126],\n [6, 26, 52, 78, 104, 130],\n [6, 30, 56, 82, 108, 134],\n [6, 34, 60, 86, 112, 138],\n [6, 30, 58, 86, 114, 142],\n [6, 34, 62, 90, 118, 146],\n [6, 30, 54, 78, 102, 126, 150],\n [6, 24, 50, 76, 102, 128, 154],\n [6, 28, 54, 80, 106, 132, 158],\n [6, 32, 58, 84, 110, 136, 162],\n [6, 26, 54, 82, 110, 138, 166],\n [6, 30, 58, 86, 114, 142, 170]\n ];\n var G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);\n var G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);\n var G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);\n\n var _this = {};\n\n var getBCHDigit = function(data) {\n var digit = 0;\n while (data != 0) {\n digit += 1;\n data >>>= 1;\n }\n return digit;\n };\n\n _this.getBCHTypeInfo = function(data) {\n var d = data << 10;\n while (getBCHDigit(d) - getBCHDigit(G15) >= 0) {\n d ^= (G15 << (getBCHDigit(d) - getBCHDigit(G15) ) );\n }\n return ( (data << 10) | d) ^ G15_MASK;\n };\n\n _this.getBCHTypeNumber = function(data) {\n var d = data << 12;\n while (getBCHDigit(d) - getBCHDigit(G18) >= 0) {\n d ^= (G18 << (getBCHDigit(d) - getBCHDigit(G18) ) );\n }\n return (data << 12) | d;\n };\n\n _this.getPatternPosition = function(typeNumber) {\n return PATTERN_POSITION_TABLE[typeNumber - 1];\n };\n\n _this.getMaskFunction = function(maskPattern) {\n\n switch (maskPattern) {\n\n case QRMaskPattern.PATTERN000 :\n return function(i, j) { return (i + j) % 2 == 0; };\n case QRMaskPattern.PATTERN001 :\n return function(i, j) { return i % 2 == 0; };\n case QRMaskPattern.PATTERN010 :\n return function(i, j) { return j % 3 == 0; };\n case QRMaskPattern.PATTERN011 :\n return function(i, j) { return (i + j) % 3 == 0; };\n case QRMaskPattern.PATTERN100 :\n return function(i, j) { return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0; };\n case QRMaskPattern.PATTERN101 :\n return function(i, j) { return (i * j) % 2 + (i * j) % 3 == 0; };\n case QRMaskPattern.PATTERN110 :\n return function(i, j) { return ( (i * j) % 2 + (i * j) % 3) % 2 == 0; };\n case QRMaskPattern.PATTERN111 :\n return function(i, j) { return ( (i * j) % 3 + (i + j) % 2) % 2 == 0; };\n\n default :\n throw 'bad maskPattern:' + maskPattern;\n }\n };\n\n _this.getErrorCorrectPolynomial = function(errorCorrectLength) {\n var a = qrPolynomial([1], 0);\n for (var i = 0; i < errorCorrectLength; i += 1) {\n a = a.multiply(qrPolynomial([1, QRMath.gexp(i)], 0) );\n }\n return a;\n };\n\n _this.getLengthInBits = function(mode, type) {\n\n if (1 <= type && type < 10) {\n\n // 1 - 9\n\n switch(mode) {\n case QRMode.MODE_NUMBER : return 10;\n case QRMode.MODE_ALPHA_NUM : return 9;\n case QRMode.MODE_8BIT_BYTE : return 8;\n case QRMode.MODE_KANJI : return 8;\n default :\n throw 'mode:' + mode;\n }\n\n } else if (type < 27) {\n\n // 10 - 26\n\n switch(mode) {\n case QRMode.MODE_NUMBER : return 12;\n case QRMode.MODE_ALPHA_NUM : return 11;\n case QRMode.MODE_8BIT_BYTE : return 16;\n case QRMode.MODE_KANJI : return 10;\n default :\n throw 'mode:' + mode;\n }\n\n } else if (type < 41) {\n\n // 27 - 40\n\n switch(mode) {\n case QRMode.MODE_NUMBER : return 14;\n case QRMode.MODE_ALPHA_NUM : return 13;\n case QRMode.MODE_8BIT_BYTE : return 16;\n case QRMode.MODE_KANJI : return 12;\n default :\n throw 'mode:' + mode;\n }\n\n } else {\n throw 'type:' + type;\n }\n };\n\n _this.getLostPoint = function(qrcode) {\n\n var moduleCount = qrcode.getModuleCount();\n\n var lostPoint = 0;\n\n // LEVEL1\n\n for (var row = 0; row < moduleCount; row += 1) {\n for (var col = 0; col < moduleCount; col += 1) {\n\n var sameCount = 0;\n var dark = qrcode.isDark(row, col);\n\n for (var r = -1; r <= 1; r += 1) {\n\n if (row + r < 0 || moduleCount <= row + r) {\n continue;\n }\n\n for (var c = -1; c <= 1; c += 1) {\n\n if (col + c < 0 || moduleCount <= col + c) {\n continue;\n }\n\n if (r == 0 && c == 0) {\n continue;\n }\n\n if (dark == qrcode.isDark(row + r, col + c) ) {\n sameCount += 1;\n }\n }\n }\n\n if (sameCount > 5) {\n lostPoint += (3 + sameCount - 5);\n }\n }\n };\n\n // LEVEL2\n\n for (var row = 0; row < moduleCount - 1; row += 1) {\n for (var col = 0; col < moduleCount - 1; col += 1) {\n var count = 0;\n if (qrcode.isDark(row, col) ) count += 1;\n if (qrcode.isDark(row + 1, col) ) count += 1;\n if (qrcode.isDark(row, col + 1) ) count += 1;\n if (qrcode.isDark(row + 1, col + 1) ) count += 1;\n if (count == 0 || count == 4) {\n lostPoint += 3;\n }\n }\n }\n\n // LEVEL3\n\n for (var row = 0; row < moduleCount; row += 1) {\n for (var col = 0; col < moduleCount - 6; col += 1) {\n if (qrcode.isDark(row, col)\n && !qrcode.isDark(row, col + 1)\n && qrcode.isDark(row, col + 2)\n && qrcode.isDark(row, col + 3)\n && qrcode.isDark(row, col + 4)\n && !qrcode.isDark(row, col + 5)\n && qrcode.isDark(row, col + 6) ) {\n lostPoint += 40;\n }\n }\n }\n\n for (var col = 0; col < moduleCount; col += 1) {\n for (var row = 0; row < moduleCount - 6; row += 1) {\n if (qrcode.isDark(row, col)\n && !qrcode.isDark(row + 1, col)\n && qrcode.isDark(row + 2, col)\n && qrcode.isDark(row + 3, col)\n && qrcode.isDark(row + 4, col)\n && !qrcode.isDark(row + 5, col)\n && qrcode.isDark(row + 6, col) ) {\n lostPoint += 40;\n }\n }\n }\n\n // LEVEL4\n\n var darkCount = 0;\n\n for (var col = 0; col < moduleCount; col += 1) {\n for (var row = 0; row < moduleCount; row += 1) {\n if (qrcode.isDark(row, col) ) {\n darkCount += 1;\n }\n }\n }\n\n var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;\n lostPoint += ratio * 10;\n\n return lostPoint;\n };\n\n return _this;\n }();\n\n //---------------------------------------------------------------------\n // QRMath\n //---------------------------------------------------------------------\n\n var QRMath = function() {\n\n var EXP_TABLE = new Array(256);\n var LOG_TABLE = new Array(256);\n\n // initialize tables\n for (var i = 0; i < 8; i += 1) {\n EXP_TABLE[i] = 1 << i;\n }\n for (var i = 8; i < 256; i += 1) {\n EXP_TABLE[i] = EXP_TABLE[i - 4]\n ^ EXP_TABLE[i - 5]\n ^ EXP_TABLE[i - 6]\n ^ EXP_TABLE[i - 8];\n }\n for (var i = 0; i < 255; i += 1) {\n LOG_TABLE[EXP_TABLE[i] ] = i;\n }\n\n var _this = {};\n\n _this.glog = function(n) {\n\n if (n < 1) {\n throw 'glog(' + n + ')';\n }\n\n return LOG_TABLE[n];\n };\n\n _this.gexp = function(n) {\n\n while (n < 0) {\n n += 255;\n }\n\n while (n >= 256) {\n n -= 255;\n }\n\n return EXP_TABLE[n];\n };\n\n return _this;\n }();\n\n //---------------------------------------------------------------------\n // qrPolynomial\n //---------------------------------------------------------------------\n\n function qrPolynomial(num, shift) {\n\n if (typeof num.length == 'undefined') {\n throw num.length + '/' + shift;\n }\n\n var _num = function() {\n var offset = 0;\n while (offset < num.length && num[offset] == 0) {\n offset += 1;\n }\n var _num = new Array(num.length - offset + shift);\n for (var i = 0; i < num.length - offset; i += 1) {\n _num[i] = num[i + offset];\n }\n return _num;\n }();\n\n var _this = {};\n\n _this.getAt = function(index) {\n return _num[index];\n };\n\n _this.getLength = function() {\n return _num.length;\n };\n\n _this.multiply = function(e) {\n\n var num = new Array(_this.getLength() + e.getLength() - 1);\n\n for (var i = 0; i < _this.getLength(); i += 1) {\n for (var j = 0; j < e.getLength(); j += 1) {\n num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i) ) + QRMath.glog(e.getAt(j) ) );\n }\n }\n\n return qrPolynomial(num, 0);\n };\n\n _this.mod = function(e) {\n\n if (_this.getLength() - e.getLength() < 0) {\n return _this;\n }\n\n var ratio = QRMath.glog(_this.getAt(0) ) - QRMath.glog(e.getAt(0) );\n\n var num = new Array(_this.getLength() );\n for (var i = 0; i < _this.getLength(); i += 1) {\n num[i] = _this.getAt(i);\n }\n\n for (var i = 0; i < e.getLength(); i += 1) {\n num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i) ) + ratio);\n }\n\n // recursive call\n return qrPolynomial(num, 0).mod(e);\n };\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // QRRSBlock\n //---------------------------------------------------------------------\n\n var QRRSBlock = function() {\n\n var RS_BLOCK_TABLE = [\n\n // L\n // M\n // Q\n // H\n\n // 1\n [1, 26, 19],\n [1, 26, 16],\n [1, 26, 13],\n [1, 26, 9],\n\n // 2\n [1, 44, 34],\n [1, 44, 28],\n [1, 44, 22],\n [1, 44, 16],\n\n // 3\n [1, 70, 55],\n [1, 70, 44],\n [2, 35, 17],\n [2, 35, 13],\n\n // 4\n [1, 100, 80],\n [2, 50, 32],\n [2, 50, 24],\n [4, 25, 9],\n\n // 5\n [1, 134, 108],\n [2, 67, 43],\n [2, 33, 15, 2, 34, 16],\n [2, 33, 11, 2, 34, 12],\n\n // 6\n [2, 86, 68],\n [4, 43, 27],\n [4, 43, 19],\n [4, 43, 15],\n\n // 7\n [2, 98, 78],\n [4, 49, 31],\n [2, 32, 14, 4, 33, 15],\n [4, 39, 13, 1, 40, 14],\n\n // 8\n [2, 121, 97],\n [2, 60, 38, 2, 61, 39],\n [4, 40, 18, 2, 41, 19],\n [4, 40, 14, 2, 41, 15],\n\n // 9\n [2, 146, 116],\n [3, 58, 36, 2, 59, 37],\n [4, 36, 16, 4, 37, 17],\n [4, 36, 12, 4, 37, 13],\n\n // 10\n [2, 86, 68, 2, 87, 69],\n [4, 69, 43, 1, 70, 44],\n [6, 43, 19, 2, 44, 20],\n [6, 43, 15, 2, 44, 16],\n\n // 11\n [4, 101, 81],\n [1, 80, 50, 4, 81, 51],\n [4, 50, 22, 4, 51, 23],\n [3, 36, 12, 8, 37, 13],\n\n // 12\n [2, 116, 92, 2, 117, 93],\n [6, 58, 36, 2, 59, 37],\n [4, 46, 20, 6, 47, 21],\n [7, 42, 14, 4, 43, 15],\n\n // 13\n [4, 133, 107],\n [8, 59, 37, 1, 60, 38],\n [8, 44, 20, 4, 45, 21],\n [12, 33, 11, 4, 34, 12],\n\n // 14\n [3, 145, 115, 1, 146, 116],\n [4, 64, 40, 5, 65, 41],\n [11, 36, 16, 5, 37, 17],\n [11, 36, 12, 5, 37, 13],\n\n // 15\n [5, 109, 87, 1, 110, 88],\n [5, 65, 41, 5, 66, 42],\n [5, 54, 24, 7, 55, 25],\n [11, 36, 12, 7, 37, 13],\n\n // 16\n [5, 122, 98, 1, 123, 99],\n [7, 73, 45, 3, 74, 46],\n [15, 43, 19, 2, 44, 20],\n [3, 45, 15, 13, 46, 16],\n\n // 17\n [1, 135, 107, 5, 136, 108],\n [10, 74, 46, 1, 75, 47],\n [1, 50, 22, 15, 51, 23],\n [2, 42, 14, 17, 43, 15],\n\n // 18\n [5, 150, 120, 1, 151, 121],\n [9, 69, 43, 4, 70, 44],\n [17, 50, 22, 1, 51, 23],\n [2, 42, 14, 19, 43, 15],\n\n // 19\n [3, 141, 113, 4, 142, 114],\n [3, 70, 44, 11, 71, 45],\n [17, 47, 21, 4, 48, 22],\n [9, 39, 13, 16, 40, 14],\n\n // 20\n [3, 135, 107, 5, 136, 108],\n [3, 67, 41, 13, 68, 42],\n [15, 54, 24, 5, 55, 25],\n [15, 43, 15, 10, 44, 16],\n\n // 21\n [4, 144, 116, 4, 145, 117],\n [17, 68, 42],\n [17, 50, 22, 6, 51, 23],\n [19, 46, 16, 6, 47, 17],\n\n // 22\n [2, 139, 111, 7, 140, 112],\n [17, 74, 46],\n [7, 54, 24, 16, 55, 25],\n [34, 37, 13],\n\n // 23\n [4, 151, 121, 5, 152, 122],\n [4, 75, 47, 14, 76, 48],\n [11, 54, 24, 14, 55, 25],\n [16, 45, 15, 14, 46, 16],\n\n // 24\n [6, 147, 117, 4, 148, 118],\n [6, 73, 45, 14, 74, 46],\n [11, 54, 24, 16, 55, 25],\n [30, 46, 16, 2, 47, 17],\n\n // 25\n [8, 132, 106, 4, 133, 107],\n [8, 75, 47, 13, 76, 48],\n [7, 54, 24, 22, 55, 25],\n [22, 45, 15, 13, 46, 16],\n\n // 26\n [10, 142, 114, 2, 143, 115],\n [19, 74, 46, 4, 75, 47],\n [28, 50, 22, 6, 51, 23],\n [33, 46, 16, 4, 47, 17],\n\n // 27\n [8, 152, 122, 4, 153, 123],\n [22, 73, 45, 3, 74, 46],\n [8, 53, 23, 26, 54, 24],\n [12, 45, 15, 28, 46, 16],\n\n // 28\n [3, 147, 117, 10, 148, 118],\n [3, 73, 45, 23, 74, 46],\n [4, 54, 24, 31, 55, 25],\n [11, 45, 15, 31, 46, 16],\n\n // 29\n [7, 146, 116, 7, 147, 117],\n [21, 73, 45, 7, 74, 46],\n [1, 53, 23, 37, 54, 24],\n [19, 45, 15, 26, 46, 16],\n\n // 30\n [5, 145, 115, 10, 146, 116],\n [19, 75, 47, 10, 76, 48],\n [15, 54, 24, 25, 55, 25],\n [23, 45, 15, 25, 46, 16],\n\n // 31\n [13, 145, 115, 3, 146, 116],\n [2, 74, 46, 29, 75, 47],\n [42, 54, 24, 1, 55, 25],\n [23, 45, 15, 28, 46, 16],\n\n // 32\n [17, 145, 115],\n [10, 74, 46, 23, 75, 47],\n [10, 54, 24, 35, 55, 25],\n [19, 45, 15, 35, 46, 16],\n\n // 33\n [17, 145, 115, 1, 146, 116],\n [14, 74, 46, 21, 75, 47],\n [29, 54, 24, 19, 55, 25],\n [11, 45, 15, 46, 46, 16],\n\n // 34\n [13, 145, 115, 6, 146, 116],\n [14, 74, 46, 23, 75, 47],\n [44, 54, 24, 7, 55, 25],\n [59, 46, 16, 1, 47, 17],\n\n // 35\n [12, 151, 121, 7, 152, 122],\n [12, 75, 47, 26, 76, 48],\n [39, 54, 24, 14, 55, 25],\n [22, 45, 15, 41, 46, 16],\n\n // 36\n [6, 151, 121, 14, 152, 122],\n [6, 75, 47, 34, 76, 48],\n [46, 54, 24, 10, 55, 25],\n [2, 45, 15, 64, 46, 16],\n\n // 37\n [17, 152, 122, 4, 153, 123],\n [29, 74, 46, 14, 75, 47],\n [49, 54, 24, 10, 55, 25],\n [24, 45, 15, 46, 46, 16],\n\n // 38\n [4, 152, 122, 18, 153, 123],\n [13, 74, 46, 32, 75, 47],\n [48, 54, 24, 14, 55, 25],\n [42, 45, 15, 32, 46, 16],\n\n // 39\n [20, 147, 117, 4, 148, 118],\n [40, 75, 47, 7, 76, 48],\n [43, 54, 24, 22, 55, 25],\n [10, 45, 15, 67, 46, 16],\n\n // 40\n [19, 148, 118, 6, 149, 119],\n [18, 75, 47, 31, 76, 48],\n [34, 54, 24, 34, 55, 25],\n [20, 45, 15, 61, 46, 16]\n ];\n\n var qrRSBlock = function(totalCount, dataCount) {\n var _this = {};\n _this.totalCount = totalCount;\n _this.dataCount = dataCount;\n return _this;\n };\n\n var _this = {};\n\n var getRsBlockTable = function(typeNumber, errorCorrectionLevel) {\n\n switch(errorCorrectionLevel) {\n case QRErrorCorrectionLevel.L :\n return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n case QRErrorCorrectionLevel.M :\n return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n case QRErrorCorrectionLevel.Q :\n return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n case QRErrorCorrectionLevel.H :\n return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n default :\n return undefined;\n }\n };\n\n _this.getRSBlocks = function(typeNumber, errorCorrectionLevel) {\n\n var rsBlock = getRsBlockTable(typeNumber, errorCorrectionLevel);\n\n if (typeof rsBlock == 'undefined') {\n throw 'bad rs block @ typeNumber:' + typeNumber +\n '/errorCorrectionLevel:' + errorCorrectionLevel;\n }\n\n var length = rsBlock.length / 3;\n\n var list = [];\n\n for (var i = 0; i < length; i += 1) {\n\n var count = rsBlock[i * 3 + 0];\n var totalCount = rsBlock[i * 3 + 1];\n var dataCount = rsBlock[i * 3 + 2];\n\n for (var j = 0; j < count; j += 1) {\n list.push(qrRSBlock(totalCount, dataCount) );\n }\n }\n\n return list;\n };\n\n return _this;\n }();\n\n //---------------------------------------------------------------------\n // qrBitBuffer\n //---------------------------------------------------------------------\n\n var qrBitBuffer = function() {\n\n var _buffer = [];\n var _length = 0;\n\n var _this = {};\n\n _this.getBuffer = function() {\n return _buffer;\n };\n\n _this.getAt = function(index) {\n var bufIndex = Math.floor(index / 8);\n return ( (_buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;\n };\n\n _this.put = function(num, length) {\n for (var i = 0; i < length; i += 1) {\n _this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);\n }\n };\n\n _this.getLengthInBits = function() {\n return _length;\n };\n\n _this.putBit = function(bit) {\n\n var bufIndex = Math.floor(_length / 8);\n if (_buffer.length <= bufIndex) {\n _buffer.push(0);\n }\n\n if (bit) {\n _buffer[bufIndex] |= (0x80 >>> (_length % 8) );\n }\n\n _length += 1;\n };\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // qrNumber\n //---------------------------------------------------------------------\n\n var qrNumber = function(data) {\n\n var _mode = QRMode.MODE_NUMBER;\n var _data = data;\n\n var _this = {};\n\n _this.getMode = function() {\n return _mode;\n };\n\n _this.getLength = function(buffer) {\n return _data.length;\n };\n\n _this.write = function(buffer) {\n\n var data = _data;\n\n var i = 0;\n\n while (i + 2 < data.length) {\n buffer.put(strToNum(data.substring(i, i + 3) ), 10);\n i += 3;\n }\n\n if (i < data.length) {\n if (data.length - i == 1) {\n buffer.put(strToNum(data.substring(i, i + 1) ), 4);\n } else if (data.length - i == 2) {\n buffer.put(strToNum(data.substring(i, i + 2) ), 7);\n }\n }\n };\n\n var strToNum = function(s) {\n var num = 0;\n for (var i = 0; i < s.length; i += 1) {\n num = num * 10 + chatToNum(s.charAt(i) );\n }\n return num;\n };\n\n var chatToNum = function(c) {\n if ('0' <= c && c <= '9') {\n return c.charCodeAt(0) - '0'.charCodeAt(0);\n }\n throw 'illegal char :' + c;\n };\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // qrAlphaNum\n //---------------------------------------------------------------------\n\n var qrAlphaNum = function(data) {\n\n var _mode = QRMode.MODE_ALPHA_NUM;\n var _data = data;\n\n var _this = {};\n\n _this.getMode = function() {\n return _mode;\n };\n\n _this.getLength = function(buffer) {\n return _data.length;\n };\n\n _this.write = function(buffer) {\n\n var s = _data;\n\n var i = 0;\n\n while (i + 1 < s.length) {\n buffer.put(\n getCode(s.charAt(i) ) * 45 +\n getCode(s.charAt(i + 1) ), 11);\n i += 2;\n }\n\n if (i < s.length) {\n buffer.put(getCode(s.charAt(i) ), 6);\n }\n };\n\n var getCode = function(c) {\n\n if ('0' <= c && c <= '9') {\n return c.charCodeAt(0) - '0'.charCodeAt(0);\n } else if ('A' <= c && c <= 'Z') {\n return c.charCodeAt(0) - 'A'.charCodeAt(0) + 10;\n } else {\n switch (c) {\n case ' ' : return 36;\n case '$' : return 37;\n case '%' : return 38;\n case '*' : return 39;\n case '+' : return 40;\n case '-' : return 41;\n case '.' : return 42;\n case '/' : return 43;\n case ':' : return 44;\n default :\n throw 'illegal char :' + c;\n }\n }\n };\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // qr8BitByte\n //---------------------------------------------------------------------\n\n var qr8BitByte = function(data) {\n\n var _mode = QRMode.MODE_8BIT_BYTE;\n var _data = data;\n var _bytes = qrcode.stringToBytes(data);\n\n var _this = {};\n\n _this.getMode = function() {\n return _mode;\n };\n\n _this.getLength = function(buffer) {\n return _bytes.length;\n };\n\n _this.write = function(buffer) {\n for (var i = 0; i < _bytes.length; i += 1) {\n buffer.put(_bytes[i], 8);\n }\n };\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // qrKanji\n //---------------------------------------------------------------------\n\n var qrKanji = function(data) {\n\n var _mode = QRMode.MODE_KANJI;\n var _data = data;\n\n var stringToBytes = qrcode.stringToBytesFuncs['SJIS'];\n if (!stringToBytes) {\n throw 'sjis not supported.';\n }\n !function(c, code) {\n // self test for sjis support.\n var test = stringToBytes(c);\n if (test.length != 2 || ( (test[0] << 8) | test[1]) != code) {\n throw 'sjis not supported.';\n }\n }('\\u53cb', 0x9746);\n\n var _bytes = stringToBytes(data);\n\n var _this = {};\n\n _this.getMode = function() {\n return _mode;\n };\n\n _this.getLength = function(buffer) {\n return ~~(_bytes.length / 2);\n };\n\n _this.write = function(buffer) {\n\n var data = _bytes;\n\n var i = 0;\n\n while (i + 1 < data.length) {\n\n var c = ( (0xff & data[i]) << 8) | (0xff & data[i + 1]);\n\n if (0x8140 <= c && c <= 0x9FFC) {\n c -= 0x8140;\n } else if (0xE040 <= c && c <= 0xEBBF) {\n c -= 0xC140;\n } else {\n throw 'illegal char at ' + (i + 1) + '/' + c;\n }\n\n c = ( (c >>> 8) & 0xff) * 0xC0 + (c & 0xff);\n\n buffer.put(c, 13);\n\n i += 2;\n }\n\n if (i < data.length) {\n throw 'illegal char at ' + (i + 1);\n }\n };\n\n return _this;\n };\n\n //=====================================================================\n // GIF Support etc.\n //\n\n //---------------------------------------------------------------------\n // byteArrayOutputStream\n //---------------------------------------------------------------------\n\n var byteArrayOutputStream = function() {\n\n var _bytes = [];\n\n var _this = {};\n\n _this.writeByte = function(b) {\n _bytes.push(b & 0xff);\n };\n\n _this.writeShort = function(i) {\n _this.writeByte(i);\n _this.writeByte(i >>> 8);\n };\n\n _this.writeBytes = function(b, off, len) {\n off = off || 0;\n len = len || b.length;\n for (var i = 0; i < len; i += 1) {\n _this.writeByte(b[i + off]);\n }\n };\n\n _this.writeString = function(s) {\n for (var i = 0; i < s.length; i += 1) {\n _this.writeByte(s.charCodeAt(i) );\n }\n };\n\n _this.toByteArray = function() {\n return _bytes;\n };\n\n _this.toString = function() {\n var s = '';\n s += '[';\n for (var i = 0; i < _bytes.length; i += 1) {\n if (i > 0) {\n s += ',';\n }\n s += _bytes[i];\n }\n s += ']';\n return s;\n };\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // base64EncodeOutputStream\n //---------------------------------------------------------------------\n\n var base64EncodeOutputStream = function() {\n\n var _buffer = 0;\n var _buflen = 0;\n var _length = 0;\n var _base64 = '';\n\n var _this = {};\n\n var writeEncoded = function(b) {\n _base64 += String.fromCharCode(encode(b & 0x3f) );\n };\n\n var encode = function(n) {\n if (n < 0) {\n // error.\n } else if (n < 26) {\n return 0x41 + n;\n } else if (n < 52) {\n return 0x61 + (n - 26);\n } else if (n < 62) {\n return 0x30 + (n - 52);\n } else if (n == 62) {\n return 0x2b;\n } else if (n == 63) {\n return 0x2f;\n }\n throw 'n:' + n;\n };\n\n _this.writeByte = function(n) {\n\n _buffer = (_buffer << 8) | (n & 0xff);\n _buflen += 8;\n _length += 1;\n\n while (_buflen >= 6) {\n writeEncoded(_buffer >>> (_buflen - 6) );\n _buflen -= 6;\n }\n };\n\n _this.flush = function() {\n\n if (_buflen > 0) {\n writeEncoded(_buffer << (6 - _buflen) );\n _buffer = 0;\n _buflen = 0;\n }\n\n if (_length % 3 != 0) {\n // padding\n var padlen = 3 - _length % 3;\n for (var i = 0; i < padlen; i += 1) {\n _base64 += '=';\n }\n }\n };\n\n _this.toString = function() {\n return _base64;\n };\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // base64DecodeInputStream\n //---------------------------------------------------------------------\n\n var base64DecodeInputStream = function(str) {\n\n var _str = str;\n var _pos = 0;\n var _buffer = 0;\n var _buflen = 0;\n\n var _this = {};\n\n _this.read = function() {\n\n while (_buflen < 8) {\n\n if (_pos >= _str.length) {\n if (_buflen == 0) {\n return -1;\n }\n throw 'unexpected end of file./' + _buflen;\n }\n\n var c = _str.charAt(_pos);\n _pos += 1;\n\n if (c == '=') {\n _buflen = 0;\n return -1;\n } else if (c.match(/^\\s$/) ) {\n // ignore if whitespace.\n continue;\n }\n\n _buffer = (_buffer << 6) | decode(c.charCodeAt(0) );\n _buflen += 6;\n }\n\n var n = (_buffer >>> (_buflen - 8) ) & 0xff;\n _buflen -= 8;\n return n;\n };\n\n var decode = function(c) {\n if (0x41 <= c && c <= 0x5a) {\n return c - 0x41;\n } else if (0x61 <= c && c <= 0x7a) {\n return c - 0x61 + 26;\n } else if (0x30 <= c && c <= 0x39) {\n return c - 0x30 + 52;\n } else if (c == 0x2b) {\n return 62;\n } else if (c == 0x2f) {\n return 63;\n } else {\n throw 'c:' + c;\n }\n };\n\n return _this;\n };\n\n //---------------------------------------------------------------------\n // gifImage (B/W)\n //---------------------------------------------------------------------\n\n var gifImage = function(width, height) {\n\n var _width = width;\n var _height = height;\n var _data = new Array(width * height);\n\n var _this = {};\n\n _this.setPixel = function(x, y, pixel) {\n _data[y * _width + x] = pixel;\n };\n\n _this.write = function(out) {\n\n //---------------------------------\n // GIF Signature\n\n out.writeString('GIF87a');\n\n //---------------------------------\n // Screen Descriptor\n\n out.writeShort(_width);\n out.writeShort(_height);\n\n out.writeByte(0x80); // 2bit\n out.writeByte(0);\n out.writeByte(0);\n\n //---------------------------------\n // Global Color Map\n\n // black\n out.writeByte(0x00);\n out.writeByte(0x00);\n out.writeByte(0x00);\n\n // white\n out.writeByte(0xff);\n out.writeByte(0xff);\n out.writeByte(0xff);\n\n //---------------------------------\n // Image Descriptor\n\n out.writeString(',');\n out.writeShort(0);\n out.writeShort(0);\n out.writeShort(_width);\n out.writeShort(_height);\n out.writeByte(0);\n\n //---------------------------------\n // Local Color Map\n\n //---------------------------------\n // Raster Data\n\n var lzwMinCodeSize = 2;\n var raster = getLZWRaster(lzwMinCodeSize);\n\n out.writeByte(lzwMinCodeSize);\n\n var offset = 0;\n\n while (raster.length - offset > 255) {\n out.writeByte(255);\n out.writeBytes(raster, offset, 255);\n offset += 255;\n }\n\n out.writeByte(raster.length - offset);\n out.writeBytes(raster, offset, raster.length - offset);\n out.writeByte(0x00);\n\n //---------------------------------\n // GIF Terminator\n out.writeString(';');\n };\n\n var bitOutputStream = function(out) {\n\n var _out = out;\n var _bitLength = 0;\n var _bitBuffer = 0;\n\n var _this = {};\n\n _this.write = function(data, length) {\n\n if ( (data >>> length) != 0) {\n throw 'length over';\n }\n\n while (_bitLength + length >= 8) {\n _out.writeByte(0xff & ( (data << _bitLength) | _bitBuffer) );\n length -= (8 - _bitLength);\n data >>>= (8 - _bitLength);\n _bitBuffer = 0;\n _bitLength = 0;\n }\n\n _bitBuffer = (data << _bitLength) | _bitBuffer;\n _bitLength = _bitLength + length;\n };\n\n _this.flush = function() {\n if (_bitLength > 0) {\n _out.writeByte(_bitBuffer);\n }\n };\n\n return _this;\n };\n\n var getLZWRaster = function(lzwMinCodeSize) {\n\n var clearCode = 1 << lzwMinCodeSize;\n var endCode = (1 << lzwMinCodeSize) + 1;\n var bitLength = lzwMinCodeSize + 1;\n\n // Setup LZWTable\n var table = lzwTable();\n\n for (var i = 0; i < clearCode; i += 1) {\n table.add(String.fromCharCode(i) );\n }\n table.add(String.fromCharCode(clearCode) );\n table.add(String.fromCharCode(endCode) );\n\n var byteOut = byteArrayOutputStream();\n var bitOut = bitOutputStream(byteOut);\n\n // clear code\n bitOut.write(clearCode, bitLength);\n\n var dataIndex = 0;\n\n var s = String.fromCharCode(_data[dataIndex]);\n dataIndex += 1;\n\n while (dataIndex < _data.length) {\n\n var c = String.fromCharCode(_data[dataIndex]);\n dataIndex += 1;\n\n if (table.contains(s + c) ) {\n\n s = s + c;\n\n } else {\n\n bitOut.write(table.indexOf(s), bitLength);\n\n if (table.size() < 0xfff) {\n\n if (table.size() == (1 << bitLength) ) {\n bitLength += 1;\n }\n\n table.add(s + c);\n }\n\n s = c;\n }\n }\n\n bitOut.write(table.indexOf(s), bitLength);\n\n // end code\n bitOut.write(endCode, bitLength);\n\n bitOut.flush();\n\n return byteOut.toByteArray();\n };\n\n var lzwTable = function() {\n\n var _map = {};\n var _size = 0;\n\n var _this = {};\n\n _this.add = function(key) {\n if (_this.contains(key) ) {\n throw 'dup key:' + key;\n }\n _map[key] = _size;\n _size += 1;\n };\n\n _this.size = function() {\n return _size;\n };\n\n _this.indexOf = function(key) {\n return _map[key];\n };\n\n _this.contains = function(key) {\n return typeof _map[key] != 'undefined';\n };\n\n return _this;\n };\n\n return _this;\n };\n\n var createDataURL = function(width, height, getPixel) {\n var gif = gifImage(width, height);\n for (var y = 0; y < height; y += 1) {\n for (var x = 0; x < width; x += 1) {\n gif.setPixel(x, y, getPixel(x, y) );\n }\n }\n\n var b = byteArrayOutputStream();\n gif.write(b);\n\n var base64 = base64EncodeOutputStream();\n var bytes = b.toByteArray();\n for (var i = 0; i < bytes.length; i += 1) {\n base64.writeByte(bytes[i]);\n }\n base64.flush();\n\n return 'data:image/gif;base64,' + base64;\n };\n\n //---------------------------------------------------------------------\n // returns qrcode function.\n\n return qrcode;\n}();\n\n// multibyte support\n!function() {\n\n qrcode.stringToBytesFuncs['UTF-8'] = function(s) {\n // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\n function toUTF8Array(str) {\n var utf8 = [];\n for (var i=0; i < str.length; i++) {\n var charcode = str.charCodeAt(i);\n if (charcode < 0x80) utf8.push(charcode);\n else if (charcode < 0x800) {\n utf8.push(0xc0 | (charcode >> 6),\n 0x80 | (charcode & 0x3f));\n }\n else if (charcode < 0xd800 || charcode >= 0xe000) {\n utf8.push(0xe0 | (charcode >> 12),\n 0x80 | ((charcode>>6) & 0x3f),\n 0x80 | (charcode & 0x3f));\n }\n // surrogate pair\n else {\n i++;\n // UTF-16 encodes 0x10000-0x10FFFF by\n // subtracting 0x10000 and splitting the\n // 20 bits of 0x0-0xFFFFF into two halves\n charcode = 0x10000 + (((charcode & 0x3ff)<<10)\n | (str.charCodeAt(i) & 0x3ff));\n utf8.push(0xf0 | (charcode >>18),\n 0x80 | ((charcode>>12) & 0x3f),\n 0x80 | ((charcode>>6) & 0x3f),\n 0x80 | (charcode & 0x3f));\n }\n }\n return utf8;\n }\n return toUTF8Array(s);\n };\n\n}();\n\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n }\n}(function () {\n return qrcode;\n}));\n", null, null, null, null, null, "/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport default {\r\n __extends,\r\n __assign,\r\n __rest,\r\n __decorate,\r\n __param,\r\n __metadata,\r\n __awaiter,\r\n __generator,\r\n __createBinding,\r\n __exportStar,\r\n __values,\r\n __read,\r\n __spread,\r\n __spreadArrays,\r\n __spreadArray,\r\n __await,\r\n __asyncGenerator,\r\n __asyncDelegator,\r\n __asyncValues,\r\n __makeTemplateObject,\r\n __importStar,\r\n __importDefault,\r\n __classPrivateFieldGet,\r\n __classPrivateFieldSet,\r\n __classPrivateFieldIn,\r\n};\r\n", "import { unsafeCSS } from 'lit'\nimport vector from '../static/svg/backButton.svg'\nimport search from '../static/svg/searchIcon.svg'\nimport copy from '../static/svg/copy.svg'\nimport scan from '../static/png/scan.png'\nimport Logo from '../static/svg/Logo.svg'\nimport Close from '../static/svg/Close.svg'\nimport Clouds from '../static/svg/Clouds.svg'\nimport Stars from '../static/svg/Stars.svg'\nimport style from './tailwind.global.css'\n\nconst _overrides = new CSSStyleSheet()\n\nexport const setVariablesOverride = (override: object) => {\n let overrideString = '* {'\n Object.entries(override).forEach(([key, value]) => {\n if (/^--/.test(key)) {\n overrideString += `${key}: ${value};`\n }\n })\n overrideString += '}'\n _overrides.insertRule(overrideString)\n}\n\nexport const setStylesOverride = (override: string) => {\n override.split('}').forEach((rule) => {\n try {\n if (!rule.trim().length) {\n return\n }\n \n _overrides.insertRule(rule + '}')\n } catch (error) {\n console.log('[custom rule error]:', error)\n }\n })\n}\n\nconst imagesSrcCssVars = `\n* {\n --nc-img-back: url(\"${vector}\");\n --nc-img-search: url('${search}');\n --nc-img-scan: url(\"${scan}\");\n --nc-img-copy: url(\"${copy}\");\n --nc-img-logo: url(\"${Logo}\");\n --nc-img-close: url(\"${Close}\");\n --nc-img-header-bg: url(\"${Stars}\");\n --nc-img-header-fg: url(\"${Clouds}\");\n}\n`\n\nexport const tailwindElement = (customStyle: string) => [\n unsafeCSS(style),\n unsafeCSS(imagesSrcCssVars),\n unsafeCSS(customStyle),\n _overrides\n]\n", "export enum QueryNetwork {\n SOLANA = 'SOLANA',\n SUI = 'SUI',\n POLKADOT = 'POLKADOT'\n}\n\nexport interface WalletSelectorItem {\n name: string\n icon: string\n link: string\n detected?: boolean\n recent?: boolean\n}\n\nexport enum SelectorView {\n DESKTOP_MAIN,\n MOBILE_MAIN,\n MOBILE_QR,\n MOBILE_ALL,\n CONNECTING\n}\n", "export const svgToBase64 = (svg: string) => {\n const base64 = btoa(svg)\n\n return 'data:image/svg+xml;base64,' + base64\n}", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=window,s=i.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,o=\"$lit$\",n=`lit$${(Math.random()+\"\").slice(9)}$`,l=\"?\"+n,h=`<${l}>`,r=document,d=()=>r.createComment(\"\"),u=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,c=Array.isArray,v=t=>c(t)||\"function\"==typeof(null==t?void 0:t[Symbol.iterator]),a=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\\\s\"'>=/]+)(${a}*=${a}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1),P=(t,i)=>{const s=t.length-1,l=[];let r,d=2===i?\"\":\"\",u=f;for(let i=0;i\"===c[0]?(u=null!=r?r:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,e=c[1],u=void 0===c[3]?p:'\"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,r=void 0);const w=u===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";d+=u===f?s+h:v>=0?(l.push(e),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(l.push(void 0),i):w)}const c=d+(t[s]||\"\")+(2===i?\"\":\"\");if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return[void 0!==e?e.createHTML(c):c,l]};class V{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,u=0;const c=t.length-1,v=this.parts,[a,f]=P(t,i);if(this.el=V.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length0){h.textContent=s?s.emptyScript:\"\";for(let s=0;s2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=N(this,t,i,0),n=!u(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new M(i.insertBefore(d(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{Z as _$LH,x as html,T as noChange,A as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n", "import{html as t,svg as r}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=Symbol.for(\"\"),l=t=>{if((null==t?void 0:t.r)===e)return null==t?void 0:t._$litStatic$},o=t=>({_$litStatic$:t,r:e}),i=(t,...r)=>({_$litStatic$:r.reduce(((r,e,l)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\\n take care to ensure page security.`)})(e)+t[l+1]),t[0]),r:e}),s=new Map,a=t=>(r,...e)=>{const o=e.length;let i,a;const n=[],u=[];let c,$=0,f=!1;for(;$ void = () => {}\n\n render() {\n return html`\n \n \n ${this.name}\n ${this.status}\n \n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-wallet-selector-item': NightlyWalletSelectorItem\n }\n}\n", "import { WalletSelectorItem } from './types'\n\nexport const walletsSort = (a: WalletSelectorItem, b: WalletSelectorItem) => {\n if (a.recent && b.recent) {\n return 0;\n }\n\n if (a.recent) {\n return -1\n }\n\n if (b.recent) {\n return 1\n }\n\n if (a.detected && b.detected) {\n return 0;\n }\n\n if (a.detected) {\n return -1\n }\n\n if (b.detected) {\n return 1\n }\n\n return 0\n}\n", "import { customElement, property, state } from 'lit/decorators.js'\nimport { html } from 'lit/static-html.js'\nimport { tailwindElement } from '../../shared/tailwind.element'\nimport style from './nightly-wallet-selector-page.css'\nimport '../nightly-wallet-selector-item/nightly-wallet-selector-item'\nimport { LitElement } from 'lit'\nimport { WalletSelectorItem } from '../../utils/types'\nimport { walletsSort } from '../../utils/utils'\n\n@customElement('nightly-wallet-selector-page')\nexport class NightlyWalletSelectorPage extends LitElement {\n static styles = tailwindElement(style)\n\n @property({ type: String })\n chainIcon = ''\n\n @property({ type: String })\n chainName = ''\n\n @property({ type: Function })\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onWalletClick: (name: string) => void = () => {}\n\n @property({ type: Array })\n get selectorItems(): WalletSelectorItem[] {\n return this._selectorItems\n }\n\n set selectorItems(value: WalletSelectorItem[]) {\n this._selectorItems = [...value].sort(walletsSort)\n this.filteredItems = this._selectorItems.filter((item) => {\n return item.name.toLowerCase().includes(this.searchText)\n })\n }\n\n private _selectorItems: WalletSelectorItem[] = []\n\n @state()\n filteredItems: WalletSelectorItem[] = []\n\n @state()\n searchText = ''\n\n handleSearchInput(event: InputEvent) {\n const searchInput = event.target as HTMLInputElement\n const searchText = searchInput.value.toLowerCase()\n this.searchText = searchText\n\n this.filteredItems = this.selectorItems.filter((item) => {\n return item.name.toLowerCase().includes(searchText)\n }).sort(walletsSort)\n }\n\n renderSelectorItems() {\n const recentDetectedItems = this.filteredItems.filter((item) => item.recent || item.detected)\n const otherItems = this.filteredItems.filter((item) => !item.recent && !item.detected)\n\n return html`\n
\n ${recentDetectedItems.length\n ? html`
\n ${recentDetectedItems.map((item) => {\n return html`\n this.onWalletClick(item.name)}\n >\n `\n })}\n
`\n : null}\n
\n ${otherItems.map((item) => {\n return html`\n this.onWalletClick(item.name)}\n >\n `\n })}\n
\n
\n `\n }\n\n renderNotFoundIcon() {\n return html`\n
\n \n Nothing found...\n Make sure you’ve typed the name correctly.\n
\n `\n }\n\n render() {\n return html`\n
\n
\n Wallets\n
\n \n ${this.chainName}\n
\n
\n
\n
\n \n
\n
\n
\n ${this.filteredItems.length === 0 ? this.renderNotFoundIcon() : this.renderSelectorItems()}\n
\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-wallet-selector-page': NightlyWalletSelectorPage\n }\n}\n", "import { customElement, property, state } from 'lit/decorators.js'\nimport { tailwindElement } from '../../shared/tailwind.element'\nimport style from './nightly-desktop-main.css'\nimport { LitElement, PropertyValueMap, html } from 'lit'\nimport { svgToBase64 } from '../../utils/images'\nimport { XMLOptions, generateQrCodeXml } from '@nightlylabs/qr-code'\nimport '../nightly-wallet-selector-page/nightly-wallet-selector-page'\n\n@customElement('nightly-desktop-main')\nexport class NightlyDesktopMain extends LitElement {\n static styles = tailwindElement(style)\n\n @property({ type: Array })\n selectorItems = []\n\n @property({ type: Function })\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onWalletClick: (name: string) => void = () => {}\n\n @property({ type: String })\n chainIcon = ''\n\n @property({ type: String })\n chainName = ''\n\n @property({ type: String })\n sessionId = ''\n\n @property({ type: String })\n relay = ''\n\n @property({ type: Object })\n qrConfigOverride: Partial = {}\n\n @property({ type: String })\n timeoutError = ''\n\n @state()\n copyMessage = 'Copy'\n\n @state()\n qrSource: string | undefined = undefined\n\n @state()\n isSessionIdImmediatelyDefined: boolean = false\n\n timeoutRef: number | undefined = undefined\n\n onCopy = () => {\n navigator.clipboard.writeText(\n 'nc:' +\n this.sessionId +\n '?network=' +\n this.chainName.replace(/\\s/g, '') +\n '&relay=' +\n this.relay\n )\n this.copyMessage = 'Copied!'\n clearTimeout(this.timeoutRef)\n this.timeoutRef = setTimeout(() => {\n this.copyMessage = 'Copy'\n }, 1000) as unknown as number\n }\n\n private updateQrSource = () => {\n if (this.sessionId)\n this.qrSource = svgToBase64(\n generateQrCodeXml(\n 'nc:' +\n this.sessionId +\n '?network=' +\n this.chainName.replace(/\\s/g, '') +\n '&relay=' +\n this.relay,\n {\n width: 500,\n height: 500,\n margin: 10,\n ...this.qrConfigOverride\n }\n )\n )\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n\n this.updateQrSource()\n if (this.sessionId) this.isSessionIdImmediatelyDefined = true\n }\n\n protected updated(_changedProperties: PropertyValueMap | Map): void {\n super.updated(_changedProperties)\n\n this.updateQrSource()\n }\n\n // TODO: change loading animation\n\n render() {\n return html`\n
\n
\n
\n
\n
\n Scan QR code\n
\n \n
\n \n\n ${!this.isSessionIdImmediatelyDefined\n ? html`\n \n

Generating QR code...

\n
`\n : html``}\n\n \n \n

QR code couldn’t be generated...

\n

\n Make sure you have stable internet connection.\n

\n
\n \n \n \n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-desktop-main': NightlyDesktopMain\n }\n}\n", "import { LitElement, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { tailwindElement } from '../../shared/tailwind.element'\nimport style from './nightly-connect-wallet.css'\n\n@customElement('nightly-connect-wallet')\nexport class NightlyConnectWallet extends LitElement {\n static styles = tailwindElement(style)\n\n @property({ type: Boolean })\n connecting = false\n\n @property({ type: String })\n walletIcon = ''\n\n @property({ type: String })\n nameLink = ''\n\n @property({ type: String })\n coinName = ''\n\n @property({ type: Function })\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n downloadApp: () => void = () => {}\n\n @property()\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n tryAgainClick = () => {}\n\n @property()\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n goBack = () => {}\n\n render() {\n return html`\n
\n
\n \n Connect wallet\n
\n
\n
\n \n ${this.coinName}\n ${this.connecting\n ? html`
\n Connecting...\n
\n
`\n : html` Connecting failed `}\n
\n
\n

\n Connecting takes too long? Make sure ${this.nameLink} app is downloaded on your device.\n

\n
\n \n \n
\n
\n
\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-connect-wallet': NightlyConnectWallet\n }\n}\n", "import { customElement, property } from 'lit/decorators.js'\nimport { tailwindElement } from '../../shared/tailwind.element'\nimport style from './nightly-header.css'\nimport { LitElement, html } from 'lit'\n\n@customElement('nightly-header')\nexport class NightlyHeader extends LitElement {\n static styles = tailwindElement(style)\n\n @property()\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onClose = () => {}\n\n render() {\n return html`\n
\n
\n \n
\n
\n
\n
\n
\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-header': NightlyHeader\n }\n}\n", "import { customElement, property, state } from 'lit/decorators.js'\nimport { tailwindElement } from '../../shared/tailwind.element'\nimport { LitElement, html } from 'lit'\nimport style from './nightly-mobile-all-wallets.css'\nimport { WalletSelectorItem } from '../../utils/types'\nimport { walletsSort } from '../../utils/utils'\n\n@customElement('nightly-mobile-all-wallets')\nexport class NightlyMobileAllWallets extends LitElement {\n static styles = tailwindElement(style)\n\n @property({ type: Function })\n goBack!: () => void\n\n @property({ type: Function })\n onWalletClick!: (name: string) => void\n\n @property({ type: Array })\n get selectorItems(): WalletSelectorItem[] {\n return this._selectorItems\n }\n\n set selectorItems(value: WalletSelectorItem[]) {\n this._selectorItems = [...value].sort(walletsSort)\n this.filteredItems = this._selectorItems.filter((item) => {\n return item.name.toLowerCase().includes(this.searchText)\n })\n }\n\n private _selectorItems: WalletSelectorItem[] = []\n\n @state()\n filteredItems: WalletSelectorItem[] = []\n\n @state()\n searchText = ''\n\n handleSearchInput(event: InputEvent) {\n const searchInput = event.target as HTMLInputElement\n const searchText = searchInput.value.toLowerCase()\n this.searchText = searchText\n\n this.filteredItems = this.selectorItems.filter((item) => {\n return item.name.toLowerCase().includes(searchText)\n })\n }\n\n renderNotFoundIcon() {\n return html`\n
\n \n Nothing found...\n Make sure you've typed the name correctly.\n
\n `\n }\n\n renderItems() {\n return html`\n
\n ${this.filteredItems.map((item) => {\n return html`\n this.onWalletClick(item.name)}\n >\n `\n })}\n
\n `\n }\n\n render() {\n return html`\n
\n
\n \n All wallets\n
\n
\n
\n
\n \n
\n
\n
\n ${this.filteredItems.length ? this.renderItems() : this.renderNotFoundIcon()}\n
\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-mobile-all-wallets': NightlyMobileAllWallets\n }\n}\n", "import { LitElement, PropertyValueMap, html } from 'lit'\nimport { tailwindElement } from '../../shared/tailwind.element'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { svgToBase64 } from '../../utils/images'\nimport { XMLOptions, generateQrCodeXml } from '@nightlylabs/qr-code'\nimport style from './nightly-mobile-qr.css'\n\n@customElement('nightly-mobile-qr')\nexport class NightlyMobileQr extends LitElement {\n static styles = tailwindElement(style)\n\n @property({ type: String })\n sessionId = ''\n\n @property({ type: String })\n relay = ''\n\n @property({ type: String })\n chainName = ''\n\n @property({ type: Function })\n showAllWallets!: () => void\n\n @property({ type: Object })\n qrConfigOverride: Partial = {}\n\n @property({ type: String })\n timeoutError = ''\n\n @state()\n qrSource: string | undefined = undefined\n\n @state()\n isSessionIdImmediatelyDefined: boolean = false\n\n private updateQrSource = () => {\n if (this.sessionId)\n this.qrSource = svgToBase64(\n generateQrCodeXml(\n 'nc:' +\n this.sessionId +\n '?network=' +\n this.chainName.replace(/\\s/g, '') +\n '&relay=' +\n this.relay,\n {\n width: 500,\n height: 500,\n margin: 10,\n ...this.qrConfigOverride\n }\n )\n )\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n\n this.updateQrSource()\n if (this.sessionId) this.isSessionIdImmediatelyDefined = true\n }\n\n protected updated(_changedProperties: PropertyValueMap | Map): void {\n super.updated(_changedProperties)\n\n this.updateQrSource()\n }\n\n render() {\n return html`\n
\n
\n \n QR Code \n
\n
\n \n\n ${!this.isSessionIdImmediatelyDefined\n ? html`\n \n \n

Generating QR code...

\n
`\n : html``}\n\n \n \n \n

QR code couldn’t be generated...

\n

\n Make sure you have stable internet connection.\n

\n \n \n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-mobile-qr': NightlyMobileQr\n }\n}\n", "import { customElement, property, state } from 'lit/decorators.js'\nimport { tailwindElement } from '../../shared/tailwind.element'\nimport { LitElement, html } from 'lit'\nimport { walletsSort } from '../../utils/utils'\nimport style from './nightly-mobile-main.css'\nimport { WalletSelectorItem } from '../../utils/types'\nimport '../nightly-wallet-selector-item/nightly-wallet-selector-item'\n\n@customElement('nightly-mobile-main')\nexport class NightlyMobileMain extends LitElement {\n static styles = tailwindElement(style)\n\n @property({ type: Function })\n showAllWallets!: () => void\n\n @property({ type: Function })\n onWalletClick!: (name: string) => void\n\n @property({ type: Function })\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n openQrPage: () => void = () => {}\n\n private _selectorItems: WalletSelectorItem[] = []\n\n @property({ type: Array })\n get selectorItems(): WalletSelectorItem[] {\n return this._selectorItems\n }\n\n set selectorItems(value: WalletSelectorItem[]) {\n this._selectorItems = [...value].sort(walletsSort)\n\n this.setItemsCount()\n this.requestUpdate()\n }\n\n @state()\n numberOfItems = 2\n\n mobileQuery = window.matchMedia('(max-width: 640px)')\n smallerMobileQuery = window.matchMedia('(max-width: 482px)')\n smallestMobileQuery = window.matchMedia('(max-width: 374px)')\n\n setItemsCount = () => {\n if (this.smallestMobileQuery.matches) {\n this.numberOfItems = this.selectorItems.length > 3 ? 2 : 3\n } else if (this.smallerMobileQuery.matches) {\n this.numberOfItems = this.selectorItems.length > 4 ? 3 : 4\n } else if (this.mobileQuery.matches) {\n this.numberOfItems = this.selectorItems.length > 5 ? 4 : 5\n }\n }\n\n constructor() {\n super()\n\n this.mobileQuery.addEventListener('change', this.setItemsCount)\n\n this.smallerMobileQuery.addEventListener('change', this.setItemsCount)\n\n this.smallestMobileQuery.addEventListener('change', this.setItemsCount)\n }\n\n render() {\n return html`\n
\n
\n Connect wallet\n \n
\n
\n ${this.selectorItems\n .slice(0, this.numberOfItems)\n .map(\n (wallet) =>\n html`\n this.onWalletClick(wallet.name)}\n >\n `\n )}\n ${this.selectorItems.length > this.numberOfItems\n ? html`\n
\n
\n ${this.selectorItems\n .slice(this.numberOfItems, this.numberOfItems + 4)\n .map(\n (item) =>\n html``\n )}\n
\n Other wallet\n
\n `\n : ''}\n
\n
\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-mobile-main': NightlyMobileMain\n }\n}\n", "import { LitElement, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { tailwindElement } from '../../shared/tailwind.element'\nimport style from './nightly-selector.css'\nimport { SelectorView, WalletSelectorItem } from '../../utils/types'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport '../nightly-desktop-main/nightly-desktop-main'\nimport '../nightly-connect-wallet/nightly-connect-wallet'\nimport '../nightly-header/nightly-header'\nimport '../nightly-mobile-all-wallets/nightly-mobile-all-wallets'\nimport '../nightly-mobile-qr/nightly-mobile-qr'\nimport '../nightly-mobile-main/nightly-mobile-main'\nimport { XMLOptions } from '@nightlylabs/qr-code'\n\n@customElement('nightly-selector')\nexport class NightlySelector extends LitElement {\n static styles = tailwindElement(style)\n\n // props\n\n @property()\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onClose = () => {}\n\n @property({ type: Array })\n selectorItems: WalletSelectorItem[] = []\n\n @property({ type: Function })\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onWalletClick: (name: string) => void = () => {}\n\n @property({ type: String })\n chainIcon = ''\n\n @property({ type: String })\n chainName = ''\n\n @property({ type: String })\n sessionId = ''\n\n @property({ type: String })\n relay = ''\n\n @property({ type: Boolean })\n connecting = false\n\n @property({ type: Object })\n qrConfigOverride: Partial = {}\n\n @property({ type: String })\n timeoutError = ''\n\n // state\n\n @state()\n fireClosingAnimation = false\n\n @state()\n mobileContentHeight = 182\n\n @state()\n link = ''\n\n @state()\n walletIcon = ''\n\n @state()\n currentWalletName = ''\n\n @state()\n canAnimateInitialView = false\n\n @state()\n currentView = SelectorView.DESKTOP_MAIN\n\n @state()\n isMobile = false\n\n get qrCode() {\n return (\n 'nc:' +\n this.sessionId +\n '?network=' +\n this.chainName.replace(/\\s/g, '') +\n '&relay=' +\n this.relay\n )\n }\n\n // media queries\n\n mobileQuery = window.matchMedia('(max-width: 640px)')\n smallerMobileQuery = window.matchMedia('(max-width: 482px)')\n smallestMobileQuery = window.matchMedia('(max-width: 374px)')\n\n // callbacks\n\n calcMobileContentHeight = () => {\n switch (this.currentView) {\n case SelectorView.MOBILE_QR:\n return this.smallestMobileQuery.matches ? 332 : this.smallerMobileQuery.matches ? 420 : 510\n case SelectorView.MOBILE_ALL:\n return 526\n case SelectorView.CONNECTING:\n return this.smallestMobileQuery.matches ? 440 : this.smallerMobileQuery.matches ? 430 : 420\n default:\n return 182\n }\n }\n\n setCurrentView = (val: SelectorView) => {\n this.currentView = val\n this.mobileContentHeight = this.calcMobileContentHeight()\n }\n\n handleClose = () => {\n this.fireClosingAnimation = true\n setTimeout(\n () => {\n this.onClose()\n },\n this.mobileQuery.matches ? 240 : 80\n )\n }\n\n onSelectWallet = (name: string) => {\n const wallet = this.selectorItems.find((w) => w.name === name)\n\n this.walletIcon = wallet?.icon ?? ''\n this.currentWalletName = wallet?.name ?? ''\n this.link = wallet?.link ?? ''\n\n this.setCurrentView(SelectorView.CONNECTING)\n\n this.canAnimateInitialView = true\n\n this.onWalletClick(name)\n }\n\n tryAgainClick = () => {\n this.onSelectWallet(this.currentWalletName)\n }\n\n downloadApp = () => {\n window.open(this.link, '_blank')\n }\n\n backToPage = () => {\n if (this.mobileQuery.matches) {\n this.setCurrentView(SelectorView.MOBILE_MAIN)\n } else {\n this.setCurrentView(SelectorView.DESKTOP_MAIN)\n }\n }\n\n returnToMobileInit = () => {\n this.setCurrentView(SelectorView.MOBILE_MAIN)\n }\n\n goToMobileQr = () => {\n this.setCurrentView(SelectorView.MOBILE_QR)\n this.canAnimateInitialView = true\n }\n\n goToMobileAll = () => {\n this.setCurrentView(SelectorView.MOBILE_ALL)\n this.canAnimateInitialView = true\n }\n\n // lifecycle callbacks\n\n constructor() {\n super()\n\n this.handleClose = this.handleClose.bind(this)\n this.onSelectWallet = this.onSelectWallet.bind(this)\n this.tryAgainClick = this.tryAgainClick.bind(this)\n this.downloadApp = this.downloadApp.bind(this)\n this.backToPage = this.backToPage.bind(this)\n this.returnToMobileInit = this.returnToMobileInit.bind(this)\n this.goToMobileAll = this.goToMobileAll.bind(this)\n this.goToMobileQr = this.goToMobileQr.bind(this)\n\n if (this.mobileQuery.matches) {\n this.isMobile = true\n this.setCurrentView(SelectorView.MOBILE_MAIN)\n }\n\n this.mobileQuery.addEventListener('change', () => {\n this.isMobile = this.mobileQuery.matches\n if (this.currentView !== SelectorView.CONNECTING) {\n this.setCurrentView(\n this.mobileQuery.matches ? SelectorView.MOBILE_MAIN : SelectorView.DESKTOP_MAIN\n )\n }\n\n this.mobileContentHeight = this.calcMobileContentHeight()\n })\n\n this.smallerMobileQuery.addEventListener('change', () => {\n this.mobileContentHeight = this.calcMobileContentHeight()\n })\n\n this.smallestMobileQuery.addEventListener('change', () => {\n this.mobileContentHeight = this.calcMobileContentHeight()\n })\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n this.fireClosingAnimation = false\n this.canAnimateInitialView = false\n if (this.mobileQuery.matches) {\n this.setCurrentView(SelectorView.MOBILE_MAIN)\n } else {\n this.setCurrentView(SelectorView.DESKTOP_MAIN)\n }\n this.mobileContentHeight = 182\n }\n\n renderConnect() {\n return html`\n \n `\n }\n\n renderDesktop() {\n return html`\n \n `\n }\n\n renderMobileAll() {\n return html`\n \n `\n }\n\n renderMobileInit() {\n return html`\n \n `\n }\n\n renderMobileQr() {\n return html`\n \n `\n }\n\n renderCurrent() {\n switch (this.currentView) {\n case SelectorView.DESKTOP_MAIN:\n return this.renderDesktop()\n case SelectorView.CONNECTING:\n return this.renderConnect()\n case SelectorView.MOBILE_MAIN:\n return this.renderMobileInit()\n case SelectorView.MOBILE_QR:\n return this.renderMobileQr()\n case SelectorView.MOBILE_ALL:\n return this.renderMobileAll()\n }\n }\n\n render() {\n return html`\n \n {\n e.stopPropagation()\n }}\n class=\"nc_modalWrapper ${this.fireClosingAnimation\n ? 'nc_modalMobileSlideOutAnimation'\n : ''}\"\n >\n \n \n ${this.renderCurrent()}\n \n \n \n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nightly-selector': NightlySelector\n }\n}\n", "import { XMLOptions } from '@nightlylabs/qr-code'\nimport './components/nightly-selector/nightly-selector'\nimport { setStylesOverride, setVariablesOverride } from './shared/tailwind.element'\nimport './shared/tailwind.global.css'\nexport { type NightlySelector } from './components/nightly-selector/nightly-selector'\nexport { type WalletSelectorItem } from './utils/types'\n\nexport const getNightlySelectorElement = (\n variablesOverride?: object, // simple changes like changing global colors\n stylesOverride?: string, // more advanced changes\n qrConfigOverride?: Partial // customization of qr codes\n) => {\n const style = document.createElement('style')\n style.textContent = `@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;600&display=swap');` // workaround because import in bundled styles in ignored for some reason\n document.head.appendChild(style)\n\n setVariablesOverride(variablesOverride ?? {})\n setStylesOverride(stylesOverride ?? '')\n\n const selectorElement = document.createElement('nightly-selector')\n selectorElement.qrConfigOverride = qrConfigOverride ?? {}\n\n return selectorElement\n}\n\nexport { type XMLOptions }\n", "(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n", "// Copyright 2019-2022 @polkadot/wasm-crypto-wasm authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// Generated as part of the build, do not edit\n\nconst lenIn = 171005;\nconst lenOut = 339466;\nconst bytes = 'eNqkvQmYXVd153vuuVPVvTXcmqTSfOpKtmVbskaXJMvYugU2Tuj3mi8vL1++9/X3ZNmSwSXjoSxseJ9iF1gy4oUEhZhEBPIiGhLUEAUxBTkhIIiTVhN3EMMDAaYRgQR3QkDBdMeAg/v3X2ufc4caNCDZOvuss/faa6299tprrz3caNeDr8lFUZT7x9yK2+NHH41uzz+qf3P8z2vuUXvnkdM/BdJ8KOrBs2RPEhHfwgupsqeyjGlBx/LI7ZFV8ohX8Aj/kuwOZVSqkqVVpKv5IUUsqh4JxD1ihD5iGR/xP8IQknop2oszRnW5R6L4Q3FX/uE7XrVw586H77j73t2v2nPvzrsf3Pnae3fvuevue/fsjor6urjl6313TO65c9/O3VP33b9zas9dUawMS5ThVTsf3HPPXTs33LFl16Ztezbt2rbxzm2bt90ZdSvHMs9x59Tr7993385t41vv2rBly8aNW7fs2bj7rvVezZ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ndxNQxo+IrD0mt0RyEVf9vy6Ey8f/PrmzVoZv3VZW4FnF162bHNY6rXy+7Ckbopf/aR7W8kIuRWqBAVMvV2wBUODd3/Ju7fyherUjVkxnz6/x5Q6eDBypsGldt3cc7iz7x7fBTraZFtZy2HYR3Lil74ep7pheMWrX4wS/yt18RdXF5wWKXz74yqk+Vor0P7r48Kv+PKYNfnMAUbDF/zT9SLOrA0pbd0+YWjtpZ9u8NxUteGbV/310nureNjnqy8rgTjSHHSXJN6JaGATwoOT15TNzgMMrHx+FX9sjhI0eNGym5kTTh33//+ffff6NabtyB72IiF6zgZ3njRI0vfnvtlmLgR3zsD7tfrzVmzRVRBVtfzL58cYGomzq3QVVzduJvSS1b1j8yr1/BqL9fKDT3/LAro/K37gbLq6LAFv+F/2OxidAdbfHDtIp7l2W+UPW7S39A2e+STzmV/dKd4zYtjfo58dJlL65HLRfsUtvmEYh55fS+yzZO7TYqPufKAh9MufV0VMvjxK8vUP3ubc02vJX64YjErGIHL4ufy5r5f7VzP26zLO6RM1PfODM6du6mZmW+m7Hw9IL0M28NP/ZUhaOzEkZPPTB3687RZV4t+uvKLcVLVTzw3woas/em6yY/WvCz8YOnx31bsWap3imlcgqWr7zuZEKf/R2fHtT1hwKLR8enl4gq3Wdpz1qdi0V1OLfim8TE6KhvJ7T+quhobJ2p1YZ9MxH1eY71KRvVckMEKBfVcg+B0pHnSNUzhM8sKgVVLGPMqJTsQaljMgtEAxyUmomVCEtUoejuA7NHZmXHDUpPHjnkqtqJNRNqJtSonR1B1i46Ljkdc6FoQs3ajWomRI9LzhxRY+DQkSmYKaUSatap2aBRXHyjgQkpiQmDGiRXiap4VVbymCGpWZgqkQUjs0C1q0ZkZyUPTE+tMSR91MDk9Mz/A61QBP8=';\n\nmodule.exports = { bytes, lenIn, lenOut };\n", "// Copyright 2019-2023 @polkadot/wasm-crypto-wasm authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// Generated as part of the build, do not edit\n\nexports.lenIn = 171008;\n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hw9IL0M28NP/ZUhaOzEkZPPTB3687RZV4t+uvKLcVLVTzw3woas/em6yY/WvCz8YOnx31bsWap3imlcgqWr7zuZEKf/R2fHtT1hwKLR8enl4gq3Wdpz1qdi0V1OLfim8TE6KhvJ7T+quhobJ2p1YZ9MxH1eY71KRvVckMEKBfVcg+B0pHnSNUzhM8sKhU1uETGmFEp2YNSx2QWiAY4KDUTKxGWqELR3Qdmj8zKjhuUnjxySMnaiTUTaibUqJ0dQdauWbvouOR0zIaiCTVrN6qZED0uOXNEjYFDR6ZgrpRKqFmnZoNGcfGNBiakJCYMapBcJariVVnJY4akZmGyRJaMzALVrhqRnZU8MD21xpD0UQOT0zP/D6UhBWI=';\n", "/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.3.1';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // `act` calls can be nested, so we track the depth. This represents the\n // number of `act` scopes on the stack.\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n\n if (ReactCurrentActQueue.current === null) {\n // This is the outermost `act` scope. Initialize the queue. The reconciler\n // will detect the queue and use it instead of Scheduler.\n ReactCurrentActQueue.current = [];\n }\n\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var result;\n\n try {\n // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n ReactCurrentActQueue.isBatchingLegacy = true;\n result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n flushActQueue(queue);\n }\n }\n } catch (error) {\n popActScope(prevActScopeDepth);\n throw error;\n } finally {\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n }\n\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n // for it to resolve before exiting the current scope.\n\n var wasAwaited = false;\n var thenable = {\n then: function (resolve, reject) {\n wasAwaited = true;\n thenableResult.then(function (returnValue) {\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // We've exited the outermost act scope. Recursively flush the\n // queue until there's no remaining work.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n // The callback threw an error.\n popActScope(prevActScopeDepth);\n reject(error);\n });\n }\n };\n\n {\n if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n // eslint-disable-next-line no-undef\n Promise.resolve().then(function () {}).then(function () {\n if (!wasAwaited) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n }\n }\n\n return thenable;\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current scope\n // immediately, without awaiting.\n\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // Exiting the outermost act scope. Flush the queue.\n var _queue = ReactCurrentActQueue.current;\n\n if (_queue !== null) {\n flushActQueue(_queue);\n ReactCurrentActQueue.current = null;\n } // Return a thenable. If the user awaits it, we'll flush again in\n // case additional work was scheduled by a microtask.\n\n\n var _thenable = {\n then: function (resolve, reject) {\n // Confirm we haven't re-entered another `act` scope, in case\n // the user does something weird like await the thenable\n // multiple times.\n if (ReactCurrentActQueue.current === null) {\n // Recursively flush the queue until there's no remaining work.\n ReactCurrentActQueue.current = [];\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }\n };\n return _thenable;\n } else {\n // Since we're inside a nested `act` scope, the returned thenable\n // immediately resolves. The outer scope will flush the queue.\n var _thenable2 = {\n then: function (resolve, reject) {\n resolve(returnValue);\n }\n };\n return _thenable2;\n }\n }\n }\n}\n\nfunction popActScope(prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n if (queue.length === 0) {\n // No additional work was scheduled. Finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n } else {\n // Keep flushing work until there's none left.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n }\n });\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(true);\n } while (callback !== null);\n }\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue = queue.slice(i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.act = act;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n", "/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"secretjs\"] = factory();\n\telse\n\t\troot[\"secretjs\"] = factory();\n})(this, () => {\nreturn ", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromAscii = exports.toAscii = void 0;\nfunction toAscii(input) {\n const toNums = (str) => str.split(\"\").map((x) => {\n const charCode = x.charCodeAt(0);\n // 0x00–0x1F control characters\n // 0x20–0x7E printable characters\n // 0x7F delete character\n // 0x80–0xFF out of 7 bit ascii range\n if (charCode < 0x20 || charCode > 0x7e) {\n throw new Error(\"Cannot encode character that is out of printable ASCII range: \" + charCode);\n }\n return charCode;\n });\n return Uint8Array.from(toNums(input));\n}\nexports.toAscii = toAscii;\nfunction fromAscii(data) {\n const fromNums = (listOfNumbers) => listOfNumbers.map((x) => {\n // 0x00–0x1F control characters\n // 0x20–0x7E printable characters\n // 0x7F delete character\n // 0x80–0xFF out of 7 bit ascii range\n if (x < 0x20 || x > 0x7e) {\n throw new Error(\"Cannot decode character that is out of printable ASCII range: \" + x);\n }\n return String.fromCharCode(x);\n });\n return fromNums(Array.from(data)).join(\"\");\n}\nexports.fromAscii = fromAscii;\n//# sourceMappingURL=ascii.js.map", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromBase64 = exports.toBase64 = void 0;\nconst base64js = __importStar(require(\"base64-js\"));\nfunction toBase64(data) {\n return base64js.fromByteArray(data);\n}\nexports.toBase64 = toBase64;\nfunction fromBase64(base64String) {\n if (!base64String.match(/^[a-zA-Z0-9+/]*={0,2}$/)) {\n throw new Error(\"Invalid base64 string format\");\n }\n return base64js.toByteArray(base64String);\n}\nexports.fromBase64 = fromBase64;\n//# sourceMappingURL=base64.js.map", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Bech32 = void 0;\nconst bech32 = __importStar(require(\"bech32\"));\nclass Bech32 {\n static encode(prefix, data, limit) {\n const address = bech32.encode(prefix, bech32.toWords(data), limit);\n return address;\n }\n static decode(address, limit = Infinity) {\n const decodedAddress = bech32.decode(address, limit);\n return {\n prefix: decodedAddress.prefix,\n data: new Uint8Array(bech32.fromWords(decodedAddress.words)),\n };\n }\n}\nexports.Bech32 = Bech32;\n//# sourceMappingURL=bech32.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHex = exports.toHex = void 0;\nfunction toHex(data) {\n let out = \"\";\n for (const byte of data) {\n out += (\"0\" + byte.toString(16)).slice(-2);\n }\n return out;\n}\nexports.toHex = toHex;\nfunction fromHex(hexstring) {\n if (hexstring.length % 2 !== 0) {\n throw new Error(\"hex string length must be a multiple of 2\");\n }\n const listOfInts = [];\n for (let i = 0; i < hexstring.length; i += 2) {\n const hexByteAsString = hexstring.substr(i, 2);\n if (!hexByteAsString.match(/[0-9a-f]{2}/i)) {\n throw new Error(\"hex string contains invalid characters\");\n }\n listOfInts.push(parseInt(hexByteAsString, 16));\n }\n return new Uint8Array(listOfInts);\n}\nexports.fromHex = fromHex;\n//# sourceMappingURL=hex.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toUtf8 = exports.fromUtf8 = exports.toRfc3339 = exports.fromRfc3339 = exports.toHex = exports.fromHex = exports.Bech32 = exports.toBase64 = exports.fromBase64 = exports.toAscii = exports.fromAscii = void 0;\nvar ascii_1 = require(\"./ascii\");\nObject.defineProperty(exports, \"fromAscii\", { enumerable: true, get: function () { return ascii_1.fromAscii; } });\nObject.defineProperty(exports, \"toAscii\", { enumerable: true, get: function () { return ascii_1.toAscii; } });\nvar base64_1 = require(\"./base64\");\nObject.defineProperty(exports, \"fromBase64\", { enumerable: true, get: function () { return base64_1.fromBase64; } });\nObject.defineProperty(exports, \"toBase64\", { enumerable: true, get: function () { return base64_1.toBase64; } });\nvar bech32_1 = require(\"./bech32\");\nObject.defineProperty(exports, \"Bech32\", { enumerable: true, get: function () { return bech32_1.Bech32; } });\nvar hex_1 = require(\"./hex\");\nObject.defineProperty(exports, \"fromHex\", { enumerable: true, get: function () { return hex_1.fromHex; } });\nObject.defineProperty(exports, \"toHex\", { enumerable: true, get: function () { return hex_1.toHex; } });\nvar rfc3339_1 = require(\"./rfc3339\");\nObject.defineProperty(exports, \"fromRfc3339\", { enumerable: true, get: function () { return rfc3339_1.fromRfc3339; } });\nObject.defineProperty(exports, \"toRfc3339\", { enumerable: true, get: function () { return rfc3339_1.toRfc3339; } });\nvar utf8_1 = require(\"./utf8\");\nObject.defineProperty(exports, \"fromUtf8\", { enumerable: true, get: function () { return utf8_1.fromUtf8; } });\nObject.defineProperty(exports, \"toUtf8\", { enumerable: true, get: function () { return utf8_1.toUtf8; } });\n//# sourceMappingURL=index.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toRfc3339 = exports.fromRfc3339 = void 0;\nconst rfc3339Matcher = /^(\\d{4})-(\\d{2})-(\\d{2})[T ](\\d{2}):(\\d{2}):(\\d{2})(\\.\\d{1,9})?((?:[+-]\\d{2}:\\d{2})|Z)$/;\nfunction padded(integer, length = 2) {\n const filled = \"00000\" + integer.toString();\n return filled.substring(filled.length - length);\n}\nfunction fromRfc3339(str) {\n const matches = rfc3339Matcher.exec(str);\n if (!matches) {\n throw new Error(\"Date string is not in RFC3339 format\");\n }\n const year = +matches[1];\n const month = +matches[2];\n const day = +matches[3];\n const hour = +matches[4];\n const minute = +matches[5];\n const second = +matches[6];\n // fractional seconds match either undefined or a string like \".1\", \".123456789\"\n const milliSeconds = matches[7] ? Math.floor(+matches[7] * 1000) : 0;\n let tzOffsetSign;\n let tzOffsetHours;\n let tzOffsetMinutes;\n // if timezone is undefined, it must be Z or nothing (otherwise the group would have captured).\n if (matches[8] === \"Z\") {\n tzOffsetSign = 1;\n tzOffsetHours = 0;\n tzOffsetMinutes = 0;\n }\n else {\n tzOffsetSign = matches[8].substring(0, 1) === \"-\" ? -1 : 1;\n tzOffsetHours = +matches[8].substring(1, 3);\n tzOffsetMinutes = +matches[8].substring(4, 6);\n }\n const tzOffset = tzOffsetSign * (tzOffsetHours * 60 + tzOffsetMinutes) * 60; // seconds\n const timestamp = Date.UTC(year, month - 1, day, hour, minute, second, milliSeconds) - tzOffset * 1000;\n return new Date(timestamp);\n}\nexports.fromRfc3339 = fromRfc3339;\nfunction toRfc3339(date) {\n const year = date.getUTCFullYear();\n const month = padded(date.getUTCMonth() + 1);\n const day = padded(date.getUTCDate());\n const hour = padded(date.getUTCHours());\n const minute = padded(date.getUTCMinutes());\n const second = padded(date.getUTCSeconds());\n const ms = padded(date.getUTCMilliseconds(), 3);\n return `${year}-${month}-${day}T${hour}:${minute}:${second}.${ms}Z`;\n}\nexports.toRfc3339 = toRfc3339;\n//# sourceMappingURL=rfc3339.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromUtf8 = exports.toUtf8 = void 0;\nfunction toUtf8(str) {\n return new TextEncoder().encode(str);\n}\nexports.toUtf8 = toUtf8;\nfunction fromUtf8(data) {\n return new TextDecoder(\"utf-8\", { fatal: true }).decode(data);\n}\nexports.fromUtf8 = fromUtf8;\n//# sourceMappingURL=utf8.js.map", "'use strict'\nvar ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'\n\n// pre-compute lookup table\nvar ALPHABET_MAP = {}\nfor (var z = 0; z < ALPHABET.length; z++) {\n var x = ALPHABET.charAt(z)\n\n if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous')\n ALPHABET_MAP[x] = z\n}\n\nfunction polymodStep (pre) {\n var b = pre >> 25\n return ((pre & 0x1FFFFFF) << 5) ^\n (-((b >> 0) & 1) & 0x3b6a57b2) ^\n (-((b >> 1) & 1) & 0x26508e6d) ^\n (-((b >> 2) & 1) & 0x1ea119fa) ^\n (-((b >> 3) & 1) & 0x3d4233dd) ^\n (-((b >> 4) & 1) & 0x2a1462b3)\n}\n\nfunction prefixChk (prefix) {\n var chk = 1\n for (var i = 0; i < prefix.length; ++i) {\n var c = prefix.charCodeAt(i)\n if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')'\n\n chk = polymodStep(chk) ^ (c >> 5)\n }\n chk = polymodStep(chk)\n\n for (i = 0; i < prefix.length; ++i) {\n var v = prefix.charCodeAt(i)\n chk = polymodStep(chk) ^ (v & 0x1f)\n }\n return chk\n}\n\nfunction encode (prefix, words, LIMIT) {\n LIMIT = LIMIT || 90\n if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit')\n\n prefix = prefix.toLowerCase()\n\n // determine chk mod\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') throw new Error(chk)\n\n var result = prefix + '1'\n for (var i = 0; i < words.length; ++i) {\n var x = words[i]\n if ((x >> 5) !== 0) throw new Error('Non 5-bit word')\n\n chk = polymodStep(chk) ^ x\n result += ALPHABET.charAt(x)\n }\n\n for (i = 0; i < 6; ++i) {\n chk = polymodStep(chk)\n }\n chk ^= 1\n\n for (i = 0; i < 6; ++i) {\n var v = (chk >> ((5 - i) * 5)) & 0x1f\n result += ALPHABET.charAt(v)\n }\n\n return result\n}\n\nfunction __decode (str, LIMIT) {\n LIMIT = LIMIT || 90\n if (str.length < 8) return str + ' too short'\n if (str.length > LIMIT) return 'Exceeds length limit'\n\n // don't allow mixed case\n var lowered = str.toLowerCase()\n var uppered = str.toUpperCase()\n if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str\n str = lowered\n\n var split = str.lastIndexOf('1')\n if (split === -1) return 'No separator character for ' + str\n if (split === 0) return 'Missing prefix for ' + str\n\n var prefix = str.slice(0, split)\n var wordChars = str.slice(split + 1)\n if (wordChars.length < 6) return 'Data too short'\n\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') return chk\n\n var words = []\n for (var i = 0; i < wordChars.length; ++i) {\n var c = wordChars.charAt(i)\n var v = ALPHABET_MAP[c]\n if (v === undefined) return 'Unknown character ' + c\n chk = polymodStep(chk) ^ v\n\n // not in the checksum?\n if (i + 6 >= wordChars.length) continue\n words.push(v)\n }\n\n if (chk !== 1) return 'Invalid checksum for ' + str\n return { prefix: prefix, words: words }\n}\n\nfunction decodeUnsafe () {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n}\n\nfunction decode (str) {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n\n throw new Error(res)\n}\n\nfunction convert (data, inBits, outBits, pad) {\n var value = 0\n var bits = 0\n var maxV = (1 << outBits) - 1\n\n var result = []\n for (var i = 0; i < data.length; ++i) {\n value = (value << inBits) | data[i]\n bits += inBits\n\n while (bits >= outBits) {\n bits -= outBits\n result.push((value >> bits) & maxV)\n }\n }\n\n if (pad) {\n if (bits > 0) {\n result.push((value << (outBits - bits)) & maxV)\n }\n } else {\n if (bits >= inBits) return 'Excess padding'\n if ((value << (outBits - bits)) & maxV) return 'Non-zero padding'\n }\n\n return result\n}\n\nfunction toWordsUnsafe (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n}\n\nfunction toWords (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nfunction fromWordsUnsafe (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n}\n\nfunction fromWords (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nmodule.exports = {\n decodeUnsafe: decodeUnsafe,\n decode: decode,\n encode: encode,\n toWordsUnsafe: toWordsUnsafe,\n toWords: toWords,\n fromWordsUnsafe: fromWordsUnsafe,\n fromWords: fromWords\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SHA2 = void 0;\nconst utils_js_1 = require(\"./utils.js\");\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nclass SHA2 extends utils_js_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_js_1.createView)(this.buffer);\n }\n update(data) {\n if (this.destroyed)\n throw new Error('instance is destroyed');\n const { view, buffer, blockLen, finished } = this;\n if (finished)\n throw new Error('digest() was already called');\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = (0, utils_js_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n if (this.destroyed)\n throw new Error('instance is destroyed');\n if (!(out instanceof Uint8Array) || out.length < this.outputLen)\n throw new Error('_Sha2: Invalid output buffer');\n if (this.finished)\n throw new Error('digest() was already called');\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // NOTE: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64bit of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = (0, utils_js_1.createView)(out);\n this.get().forEach((v, i) => oview.setUint32(4 * i, v, isLE));\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\nexports.SHA2 = SHA2;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.add5H = exports.add5L = exports.add4H = exports.add4L = exports.add3H = exports.add3L = exports.add = exports.rotlBL = exports.rotlBH = exports.rotlSL = exports.rotlSH = exports.rotr32L = exports.rotr32H = exports.rotrBL = exports.rotrBH = exports.rotrSL = exports.rotrSH = exports.shrSL = exports.shrSH = exports.toBig = exports.split = exports.fromBig = void 0;\nconst U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexports.fromBig = fromBig;\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexports.split = split;\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\nexports.toBig = toBig;\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nexports.shrSH = shrSH;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\nexports.shrSL = shrSL;\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nexports.rotrSH = rotrSH;\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\nexports.rotrSL = rotrSL;\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nexports.rotrBH = rotrBH;\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\nexports.rotrBL = rotrBL;\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nexports.rotr32H = rotr32H;\nconst rotr32L = (h, l) => h;\nexports.rotr32L = rotr32L;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nexports.rotlSH = rotlSH;\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\nexports.rotlSL = rotlSL;\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nexports.rotlBH = rotlBH;\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\nexports.rotlBL = rotlBL;\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\nexports.add = add;\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nexports.add3L = add3L;\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nexports.add3H = add3H;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nexports.add4L = add4L;\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nexports.add4H = add4H;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nexports.add5L = add5L;\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\nexports.add5H = add5H;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.crypto = void 0;\nexports.crypto = {\n node: undefined,\n web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined,\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hkdf = exports.expand = exports.extract = void 0;\nconst utils_js_1 = require(\"./utils.js\");\nconst hmac_js_1 = require(\"./hmac.js\");\n// HKDF (RFC 5869)\n// https://soatok.blog/2021/11/17/understanding-hkdf/\n/**\n * HKDF-Extract(IKM, salt) -> PRK\n * Arguments position differs from spec (IKM is first one, since it is not optional)\n * @param hash\n * @param ikm\n * @param salt\n * @returns\n */\nfunction extract(hash, ikm, salt) {\n (0, utils_js_1.assertHash)(hash);\n // NOTE: some libraries treat zero-length array as 'not provided';\n // we don't, since we have undefined as 'not provided'\n // https://github.com/RustCrypto/KDFs/issues/15\n if (salt === undefined)\n salt = new Uint8Array(hash.outputLen); // if not provided, it is set to a string of HashLen zeros\n return (0, hmac_js_1.hmac)(hash, (0, utils_js_1.toBytes)(salt), (0, utils_js_1.toBytes)(ikm));\n}\nexports.extract = extract;\n// HKDF-Expand(PRK, info, L) -> OKM\nconst HKDF_COUNTER = new Uint8Array([0]);\nconst EMPTY_BUFFER = new Uint8Array();\n/**\n * HKDF-expand from the spec.\n * @param prk - a pseudorandom key of at least HashLen octets (usually, the output from the extract step)\n * @param info - optional context and application specific information (can be a zero-length string)\n * @param length - length of output keying material in octets\n */\nfunction expand(hash, prk, info, length = 32) {\n (0, utils_js_1.assertHash)(hash);\n (0, utils_js_1.assertNumber)(length);\n if (length > 255 * hash.outputLen)\n throw new Error('Length should be <= 255*HashLen');\n const blocks = Math.ceil(length / hash.outputLen);\n if (info === undefined)\n info = EMPTY_BUFFER;\n // first L(ength) octets of T\n const okm = new Uint8Array(blocks * hash.outputLen);\n // Re-use HMAC instance between blocks\n const HMAC = hmac_js_1.hmac.create(hash, prk);\n const HMACTmp = HMAC._cloneInto();\n const T = new Uint8Array(HMAC.outputLen);\n for (let counter = 0; counter < blocks; counter++) {\n HKDF_COUNTER[0] = counter + 1;\n // T(0) = empty string (zero length)\n // T(N) = HMAC-Hash(PRK, T(N-1) | info | N)\n HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T)\n .update(info)\n .update(HKDF_COUNTER)\n .digestInto(T);\n okm.set(T, hash.outputLen * counter);\n HMAC._cloneInto(HMACTmp);\n }\n HMAC.destroy();\n HMACTmp.destroy();\n T.fill(0);\n HKDF_COUNTER.fill(0);\n return okm.slice(0, length);\n}\nexports.expand = expand;\n/**\n * HKDF (RFC 5869): extract + expand in one step.\n * @param hash - hash function that would be used (e.g. sha256)\n * @param ikm - input keying material, the initial key\n * @param salt - optional salt value (a non-secret random value)\n * @param info - optional context and application specific information\n * @param length - length of output keying material in octets\n */\nconst hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);\nexports.hkdf = hkdf;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hmac = void 0;\nconst utils_js_1 = require(\"./utils.js\");\n// HMAC (RFC 2104)\nclass HMAC extends utils_js_1.Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0, utils_js_1.assertHash)(hash);\n const key = (0, utils_js_1.toBytes)(_key);\n this.iHash = hash.create();\n if (!(this.iHash instanceof utils_js_1.Hash))\n throw new TypeError('Expected instance of class which extends utils.Hash');\n const blockLen = (this.blockLen = this.iHash.blockLen);\n this.outputLen = this.iHash.outputLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > this.iHash.blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n if (this.destroyed)\n throw new Error('instance is destroyed');\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n if (this.destroyed)\n throw new Error('instance is destroyed');\n if (!(out instanceof Uint8Array) || out.length !== this.outputLen)\n throw new Error('HMAC: Invalid output buffer');\n if (this.finished)\n throw new Error('digest() was already called');\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nconst hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nexports.hmac = hmac;\nexports.hmac.create = (hash, key) => new HMAC(hash, key);\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ripemd160 = exports.RIPEMD160 = void 0;\nconst _sha2_js_1 = require(\"./_sha2.js\");\nconst utils_js_1 = require(\"./utils.js\");\n// https://homes.esat.kuleuven.be/~bosselae/ripemd160.html\n// https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf\nconst Rho = new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);\nconst Id = Uint8Array.from({ length: 16 }, (_, i) => i);\nconst Pi = Id.map((i) => (9 * i + 5) % 16);\nlet idxL = [Id];\nlet idxR = [Pi];\nfor (let i = 0; i < 4; i++)\n for (let j of [idxL, idxR])\n j.push(j[i].map((k) => Rho[k]));\nconst shifts = [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5],\n].map((i) => new Uint8Array(i));\nconst shiftsL = idxL.map((idx, i) => idx.map((j) => shifts[i][j]));\nconst shiftsR = idxR.map((idx, i) => idx.map((j) => shifts[i][j]));\nconst Kl = new Uint32Array([0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]);\nconst Kr = new Uint32Array([0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]);\n// The rotate left (circular left shift) operation for uint32\nconst rotl = (word, shift) => (word << shift) | (word >>> (32 - shift));\n// It's called f() in spec.\nfunction f(group, x, y, z) {\n if (group === 0)\n return x ^ y ^ z;\n else if (group === 1)\n return (x & y) | (~x & z);\n else if (group === 2)\n return (x | ~y) ^ z;\n else if (group === 3)\n return (x & z) | (y & ~z);\n else\n return x ^ (y | ~z);\n}\n// Temporary buffer, not used to store anything between runs\nconst BUF = new Uint32Array(16);\nclass RIPEMD160 extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 0x67452301 | 0;\n this.h1 = 0xefcdab89 | 0;\n this.h2 = 0x98badcfe | 0;\n this.h3 = 0x10325476 | 0;\n this.h4 = 0xc3d2e1f0 | 0;\n }\n get() {\n const { h0, h1, h2, h3, h4 } = this;\n return [h0, h1, h2, h3, h4];\n }\n set(h0, h1, h2, h3, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h2 | 0;\n this.h3 = h3 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i = 0; i < 16; i++, offset += 4)\n BUF[i] = view.getUint32(offset, true);\n // prettier-ignore\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n // Instead of iterating 0 to 80, we split it into 5 groups\n // And use the groups in constants, functions, etc. Much simpler\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl[group], hbr = Kr[group]; // prettier-ignore\n const rl = idxL[group], rr = idxR[group]; // prettier-ignore\n const sl = shiftsL[group], sr = shiftsR[group]; // prettier-ignore\n for (let i = 0; i < 16; i++) {\n const tl = (rotl(al + f(group, bl, cl, dl) + BUF[rl[i]] + hbl, sl[i]) + el) | 0;\n al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl; // prettier-ignore\n }\n // 2 loops are 10% faster\n for (let i = 0; i < 16; i++) {\n const tr = (rotl(ar + f(rGroup, br, cr, dr) + BUF[rr[i]] + hbr, sr[i]) + er) | 0;\n ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr; // prettier-ignore\n }\n }\n // Add the compressed chunk to the current hash value\n this.set((this.h1 + cl + dr) | 0, (this.h2 + dl + er) | 0, (this.h3 + el + ar) | 0, (this.h4 + al + br) | 0, (this.h0 + bl + cr) | 0);\n }\n roundClean() {\n BUF.fill(0);\n }\n destroy() {\n this.destroyed = true;\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0);\n }\n}\nexports.RIPEMD160 = RIPEMD160;\n/**\n * RIPEMD-160 - a hash function from 1990s.\n * @param message - msg that would be hashed\n */\nexports.ripemd160 = (0, utils_js_1.wrapConstructor)(() => new RIPEMD160());\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sha256 = void 0;\nconst _sha2_js_1 = require(\"./_sha2.js\");\nconst utils_js_1 = require(\"./utils.js\");\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ (W15 >>> 3);\n const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = (0, utils_js_1.rotr)(E, 6) ^ (0, utils_js_1.rotr)(E, 11) ^ (0, utils_js_1.rotr)(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = (0, utils_js_1.rotr)(A, 2) ^ (0, utils_js_1.rotr)(A, 13) ^ (0, utils_js_1.rotr)(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexports.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA256());\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shake256 = exports.shake128 = exports.keccak_512 = exports.keccak_384 = exports.keccak_256 = exports.keccak_224 = exports.sha3_512 = exports.sha3_384 = exports.sha3_256 = exports.sha3_224 = exports.Keccak = exports.keccakP = void 0;\nconst u64 = __importStar(require(\"./_u64.js\"));\nconst utils_js_1 = require(\"./utils.js\");\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = u64.split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => s > 32 ? u64.rotlBH(h, l, s) : u64.rotlSH(h, l, s);\nconst rotlL = (h, l, s) => s > 32 ? u64.rotlBL(h, l, s) : u64.rotlSL(h, l, s);\n// Same as keccakf1600, but allows to skip some rounds\nfunction keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexports.keccakP = keccakP;\nclass Keccak extends utils_js_1.Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n (0, utils_js_1.assertNumber)(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = (0, utils_js_1.u32)(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n if (this.destroyed)\n throw new Error('instance is destroyed');\n if (this.finished)\n throw new Error('digest() was already called');\n const { blockLen, state } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n if (this.destroyed)\n throw new Error('instance is destroyed');\n if (!(out instanceof Uint8Array))\n throw new Error('Keccak: invalid output buffer');\n this.finish();\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= this.blockLen)\n this.keccak();\n const take = Math.min(this.blockLen - this.posOut, len - pos);\n out.set(this.state.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n (0, utils_js_1.assertNumber)(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n if (out.length < this.outputLen)\n throw new Error('Keccak: invalid output buffer');\n if (this.finished)\n throw new Error('digest() was already called');\n this.finish();\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nexports.Keccak = Keccak;\nconst gen = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapConstructor)(() => new Keccak(blockLen, suffix, outputLen));\nexports.sha3_224 = gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexports.sha3_256 = gen(0x06, 136, 256 / 8);\nexports.sha3_384 = gen(0x06, 104, 384 / 8);\nexports.sha3_512 = gen(0x06, 72, 512 / 8);\nexports.keccak_224 = gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexports.keccak_256 = gen(0x01, 136, 256 / 8);\nexports.keccak_384 = gen(0x01, 104, 384 / 8);\nexports.keccak_512 = gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapConstructorWithOpts)((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen !== undefined ? opts.dkLen : outputLen, true));\nexports.shake128 = genShake(0x1f, 168, 128 / 8);\nexports.shake256 = genShake(0x1f, 136, 256 / 8);\n", "\"use strict\";\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomBytes = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.checkOpts = exports.Hash = exports.assertHash = exports.assertBytes = exports.assertBool = exports.assertNumber = exports.concatBytes = exports.toBytes = exports.utf8ToBytes = exports.asyncLoop = exports.nextTick = exports.hexToBytes = exports.bytesToHex = exports.isLE = exports.rotr = exports.createView = exports.u32 = exports.u8 = void 0;\n// The import here is via the package name. This is to ensure\n// that exports mapping/resolution does fall into place.\nconst crypto_1 = require(\"@noble/hashes/crypto\");\n// Cast array to different type\nconst u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexports.u8 = u8;\nconst u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\nexports.u32 = u32;\n// Cast array to view\nconst createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\nexports.createView = createView;\n// The rotate right (circular right shift) operation for uint32\nconst rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\nexports.rotr = rotr;\nexports.isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// There is almost no big endian hardware, but js typed arrays uses platform specific endianess.\n// So, just to be sure not to corrupt anything.\nif (!exports.isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xde, 0xad, 0xbe, 0xef]))\n */\nfunction bytesToHex(uint8a) {\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\nexports.bytesToHex = bytesToHex;\n/**\n * @example hexToBytes('deadbeef')\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2)\n throw new Error('hexToBytes: received invalid unpadded hex');\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte))\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\nexports.hexToBytes = hexToBytes;\n// Currently avoid insertion of polyfills with packers (browserify/webpack/etc)\n// But setTimeout is pretty slow, maybe worth to investigate howto do minimal polyfill here\nexports.nextTick = (() => {\n const nodeRequire = typeof module !== 'undefined' &&\n typeof module.require === 'function' &&\n module.require.bind(module);\n try {\n if (nodeRequire) {\n const { setImmediate } = nodeRequire('timers');\n return () => new Promise((resolve) => setImmediate(resolve));\n }\n }\n catch (e) { }\n return () => new Promise((resolve) => setTimeout(resolve, 0));\n})();\n// Returns control to thread each 'tick' ms to avoid blocking\nasync function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports.nextTick)();\n ts += diff;\n }\n}\nexports.asyncLoop = asyncLoop;\nfunction utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\nexports.utf8ToBytes = utf8ToBytes;\nfunction toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!(data instanceof Uint8Array))\n throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);\n return data;\n}\nexports.toBytes = toBytes;\n/**\n * Concats Uint8Array-s into one; like `Buffer.concat([buf1, buf2])`\n * @example concatBytes(buf1, buf2)\n */\nfunction concatBytes(...arrays) {\n if (!arrays.every((a) => a instanceof Uint8Array))\n throw new Error('Uint8Array list expected');\n if (arrays.length === 1)\n return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\nexports.concatBytes = concatBytes;\nfunction assertNumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexports.assertNumber = assertNumber;\nfunction assertBool(b) {\n if (typeof b !== 'boolean') {\n throw new Error(`Expected boolean, not ${b}`);\n }\n}\nexports.assertBool = assertBool;\nfunction assertBytes(bytes, ...lengths) {\n if (bytes instanceof Uint8Array && (!lengths.length || lengths.includes(bytes.length))) {\n return;\n }\n throw new TypeError(`Expected ${lengths} bytes, not ${typeof bytes} with length=${bytes.length}`);\n}\nexports.assertBytes = assertBytes;\nfunction assertHash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n assertNumber(hash.outputLen);\n assertNumber(hash.blockLen);\n}\nexports.assertHash = assertHash;\n// For runtime check if class implements interface\nclass Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nexports.Hash = Hash;\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nfunction checkOpts(def, _opts) {\n if (_opts !== undefined && (typeof _opts !== 'object' || !isPlainObject(_opts)))\n throw new TypeError('Options should be object or undefined');\n const opts = Object.assign(def, _opts);\n return opts;\n}\nexports.checkOpts = checkOpts;\nfunction wrapConstructor(hashConstructor) {\n const hashC = (message) => hashConstructor().update(toBytes(message)).digest();\n const tmp = hashConstructor();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashConstructor();\n return hashC;\n}\nexports.wrapConstructor = wrapConstructor;\nfunction wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexports.wrapConstructorWithOpts = wrapConstructorWithOpts;\n/**\n * Secure PRNG\n */\nfunction randomBytes(bytesLength = 32) {\n if (crypto_1.crypto.web) {\n return crypto_1.crypto.web.getRandomValues(new Uint8Array(bytesLength));\n }\n else if (crypto_1.crypto.node) {\n return new Uint8Array(crypto_1.crypto.node.randomBytes(bytesLength).buffer);\n }\n else {\n throw new Error(\"The environment doesn't have randomBytes function\");\n }\n}\nexports.randomBytes = randomBytes;\n", "\"use strict\";\n/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.utils = exports.schnorr = exports.verify = exports.signSync = exports.sign = exports.getSharedSecret = exports.recoverPublicKey = exports.getPublicKey = exports.Signature = exports.Point = exports.CURVE = void 0;\nconst nodeCrypto = require(\"crypto\");\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _3n = BigInt(3);\nconst _8n = BigInt(8);\nconst CURVE = Object.freeze({\n a: _0n,\n b: BigInt(7),\n P: BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f'),\n n: BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141'),\n h: _1n,\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n});\nexports.CURVE = CURVE;\nfunction weistrass(x) {\n const { a, b } = CURVE;\n const x2 = mod(x * x);\n const x3 = mod(x2 * x);\n return mod(x3 + a * x + b);\n}\nconst USE_ENDOMORPHISM = CURVE.a === _0n;\nclass ShaError extends Error {\n constructor(message) {\n super(message);\n }\n}\nclass JacobianPoint {\n constructor(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n static fromAffine(p) {\n if (!(p instanceof Point)) {\n throw new TypeError('JacobianPoint#fromAffine: expected Point');\n }\n return new JacobianPoint(p.x, p.y, _1n);\n }\n static toAffineBatch(points) {\n const toInv = invertBatch(points.map((p) => p.z));\n return points.map((p, i) => p.toAffine(toInv[i]));\n }\n static normalizeZ(points) {\n return JacobianPoint.toAffineBatch(points).map(JacobianPoint.fromAffine);\n }\n equals(other) {\n if (!(other instanceof JacobianPoint))\n throw new TypeError('JacobianPoint expected');\n const { x: X1, y: Y1, z: Z1 } = this;\n const { x: X2, y: Y2, z: Z2 } = other;\n const Z1Z1 = mod(Z1 * Z1);\n const Z2Z2 = mod(Z2 * Z2);\n const U1 = mod(X1 * Z2Z2);\n const U2 = mod(X2 * Z1Z1);\n const S1 = mod(mod(Y1 * Z2) * Z2Z2);\n const S2 = mod(mod(Y2 * Z1) * Z1Z1);\n return U1 === U2 && S1 === S2;\n }\n negate() {\n return new JacobianPoint(this.x, mod(-this.y), this.z);\n }\n double() {\n const { x: X1, y: Y1, z: Z1 } = this;\n const A = mod(X1 * X1);\n const B = mod(Y1 * Y1);\n const C = mod(B * B);\n const x1b = X1 + B;\n const D = mod(_2n * (mod(x1b * x1b) - A - C));\n const E = mod(_3n * A);\n const F = mod(E * E);\n const X3 = mod(F - _2n * D);\n const Y3 = mod(E * (D - X3) - _8n * C);\n const Z3 = mod(_2n * Y1 * Z1);\n return new JacobianPoint(X3, Y3, Z3);\n }\n add(other) {\n if (!(other instanceof JacobianPoint))\n throw new TypeError('JacobianPoint expected');\n const { x: X1, y: Y1, z: Z1 } = this;\n const { x: X2, y: Y2, z: Z2 } = other;\n if (X2 === _0n || Y2 === _0n)\n return this;\n if (X1 === _0n || Y1 === _0n)\n return other;\n const Z1Z1 = mod(Z1 * Z1);\n const Z2Z2 = mod(Z2 * Z2);\n const U1 = mod(X1 * Z2Z2);\n const U2 = mod(X2 * Z1Z1);\n const S1 = mod(mod(Y1 * Z2) * Z2Z2);\n const S2 = mod(mod(Y2 * Z1) * Z1Z1);\n const H = mod(U2 - U1);\n const r = mod(S2 - S1);\n if (H === _0n) {\n if (r === _0n) {\n return this.double();\n }\n else {\n return JacobianPoint.ZERO;\n }\n }\n const HH = mod(H * H);\n const HHH = mod(H * HH);\n const V = mod(U1 * HH);\n const X3 = mod(r * r - HHH - _2n * V);\n const Y3 = mod(r * (V - X3) - S1 * HHH);\n const Z3 = mod(Z1 * Z2 * H);\n return new JacobianPoint(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n multiplyUnsafe(scalar) {\n const P0 = JacobianPoint.ZERO;\n if (typeof scalar === 'bigint' && scalar === _0n)\n return P0;\n let n = normalizeScalar(scalar);\n if (n === _1n)\n return this;\n if (!USE_ENDOMORPHISM) {\n let p = P0;\n let d = this;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n }\n let { k1neg, k1, k2neg, k2 } = splitScalarEndo(n);\n let k1p = P0;\n let k2p = P0;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new JacobianPoint(mod(k2p.x * CURVE.beta), k2p.y, k2p.z);\n return k1p.add(k2p);\n }\n precomputeWindow(W) {\n const windows = USE_ENDOMORPHISM ? 128 / W + 1 : 256 / W + 1;\n const points = [];\n let p = this;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n for (let i = 1; i < 2 ** (W - 1); i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n }\n wNAF(n, affinePoint) {\n if (!affinePoint && this.equals(JacobianPoint.BASE))\n affinePoint = Point.BASE;\n const W = (affinePoint && affinePoint._WINDOW_SIZE) || 1;\n if (256 % W) {\n throw new Error('Point#wNAF: Invalid precomputation window, must be power of 2');\n }\n let precomputes = affinePoint && pointPrecomputes.get(affinePoint);\n if (!precomputes) {\n precomputes = this.precomputeWindow(W);\n if (affinePoint && W !== 1) {\n precomputes = JacobianPoint.normalizeZ(precomputes);\n pointPrecomputes.set(affinePoint, precomputes);\n }\n }\n let p = JacobianPoint.ZERO;\n let f = JacobianPoint.ZERO;\n const windows = 1 + (USE_ENDOMORPHISM ? 128 / W : 256 / W);\n const windowSize = 2 ** (W - 1);\n const mask = BigInt(2 ** W - 1);\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n let wbits = Number(n & mask);\n n >>= shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n if (wbits === 0) {\n let pr = precomputes[offset];\n if (window % 2)\n pr = pr.negate();\n f = f.add(pr);\n }\n else {\n let cached = precomputes[offset + Math.abs(wbits) - 1];\n if (wbits < 0)\n cached = cached.negate();\n p = p.add(cached);\n }\n }\n return { p, f };\n }\n multiply(scalar, affinePoint) {\n let n = normalizeScalar(scalar);\n let point;\n let fake;\n if (USE_ENDOMORPHISM) {\n const { k1neg, k1, k2neg, k2 } = splitScalarEndo(n);\n let { p: k1p, f: f1p } = this.wNAF(k1, affinePoint);\n let { p: k2p, f: f2p } = this.wNAF(k2, affinePoint);\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new JacobianPoint(mod(k2p.x * CURVE.beta), k2p.y, k2p.z);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n, affinePoint);\n point = p;\n fake = f;\n }\n return JacobianPoint.normalizeZ([point, fake])[0];\n }\n toAffine(invZ = invert(this.z)) {\n const { x, y, z } = this;\n const iz1 = invZ;\n const iz2 = mod(iz1 * iz1);\n const iz3 = mod(iz2 * iz1);\n const ax = mod(x * iz2);\n const ay = mod(y * iz3);\n const zz = mod(z * iz1);\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return new Point(ax, ay);\n }\n}\nJacobianPoint.BASE = new JacobianPoint(CURVE.Gx, CURVE.Gy, _1n);\nJacobianPoint.ZERO = new JacobianPoint(_0n, _1n, _0n);\nconst pointPrecomputes = new WeakMap();\nclass Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n hasEvenY() {\n return this.y % _2n === _0n;\n }\n static fromCompressedHex(bytes) {\n const isShort = bytes.length === 32;\n const x = bytesToNumber(isShort ? bytes : bytes.subarray(1));\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weistrass(x);\n let y = sqrtMod(y2);\n const isYOdd = (y & _1n) === _1n;\n if (isShort) {\n if (isYOdd)\n y = mod(-y);\n }\n else {\n const isFirstByteOdd = (bytes[0] & 1) === 1;\n if (isFirstByteOdd !== isYOdd)\n y = mod(-y);\n }\n const point = new Point(x, y);\n point.assertValidity();\n return point;\n }\n static fromUncompressedHex(bytes) {\n const x = bytesToNumber(bytes.subarray(1, 33));\n const y = bytesToNumber(bytes.subarray(33, 65));\n const point = new Point(x, y);\n point.assertValidity();\n return point;\n }\n static fromHex(hex) {\n const bytes = ensureBytes(hex);\n const len = bytes.length;\n const header = bytes[0];\n if (len === 32 || (len === 33 && (header === 0x02 || header === 0x03))) {\n return this.fromCompressedHex(bytes);\n }\n if (len === 65 && header === 0x04)\n return this.fromUncompressedHex(bytes);\n throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${len}`);\n }\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normalizePrivateKey(privateKey));\n }\n static fromSignature(msgHash, signature, recovery) {\n msgHash = ensureBytes(msgHash);\n const h = truncateHash(msgHash);\n const { r, s } = normalizeSignature(signature);\n if (recovery !== 0 && recovery !== 1) {\n throw new Error('Cannot recover signature: invalid recovery bit');\n }\n const prefix = recovery & 1 ? '03' : '02';\n const R = Point.fromHex(prefix + numTo32bStr(r));\n const { n } = CURVE;\n const rinv = invert(r, n);\n const u1 = mod(-h * rinv, n);\n const u2 = mod(s * rinv, n);\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2);\n if (!Q)\n throw new Error('Cannot recover signature: point at infinify');\n Q.assertValidity();\n return Q;\n }\n toRawBytes(isCompressed = false) {\n return hexToBytes(this.toHex(isCompressed));\n }\n toHex(isCompressed = false) {\n const x = numTo32bStr(this.x);\n if (isCompressed) {\n const prefix = this.hasEvenY() ? '02' : '03';\n return `${prefix}${x}`;\n }\n else {\n return `04${x}${numTo32bStr(this.y)}`;\n }\n }\n toHexX() {\n return this.toHex(true).slice(2);\n }\n toRawX() {\n return this.toRawBytes(true).slice(1);\n }\n assertValidity() {\n const msg = 'Point is not on elliptic curve';\n const { x, y } = this;\n if (!isValidFieldElement(x) || !isValidFieldElement(y))\n throw new Error(msg);\n const left = mod(y * y);\n const right = weistrass(x);\n if (mod(left - right) !== _0n)\n throw new Error(msg);\n }\n equals(other) {\n return this.x === other.x && this.y === other.y;\n }\n negate() {\n return new Point(this.x, mod(-this.y));\n }\n double() {\n return JacobianPoint.fromAffine(this).double().toAffine();\n }\n add(other) {\n return JacobianPoint.fromAffine(this).add(JacobianPoint.fromAffine(other)).toAffine();\n }\n subtract(other) {\n return this.add(other.negate());\n }\n multiply(scalar) {\n return JacobianPoint.fromAffine(this).multiply(scalar, this).toAffine();\n }\n multiplyAndAddUnsafe(Q, a, b) {\n const P = JacobianPoint.fromAffine(this);\n const aP = a === _0n || a === _1n || this !== Point.BASE ? P.multiplyUnsafe(a) : P.multiply(a);\n const bQ = JacobianPoint.fromAffine(Q).multiplyUnsafe(b);\n const sum = aP.add(bQ);\n return sum.equals(JacobianPoint.ZERO) ? undefined : sum.toAffine();\n }\n}\nexports.Point = Point;\nPoint.BASE = new Point(CURVE.Gx, CURVE.Gy);\nPoint.ZERO = new Point(_0n, _0n);\nfunction sliceDER(s) {\n return Number.parseInt(s[0], 16) >= 8 ? '00' + s : s;\n}\nfunction parseDERInt(data) {\n if (data.length < 2 || data[0] !== 0x02) {\n throw new Error(`Invalid signature integer tag: ${bytesToHex(data)}`);\n }\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len) {\n throw new Error(`Invalid signature integer: wrong length`);\n }\n if (res[0] === 0x00 && res[1] <= 0x7f) {\n throw new Error('Invalid signature integer: trailing length');\n }\n return { data: bytesToNumber(res), left: data.subarray(len + 2) };\n}\nfunction parseDERSignature(data) {\n if (data.length < 2 || data[0] != 0x30) {\n throw new Error(`Invalid signature tag: ${bytesToHex(data)}`);\n }\n if (data[1] !== data.length - 2) {\n throw new Error('Invalid signature: incorrect length');\n }\n const { data: r, left: sBytes } = parseDERInt(data.subarray(2));\n const { data: s, left: rBytesLeft } = parseDERInt(sBytes);\n if (rBytesLeft.length) {\n throw new Error(`Invalid signature: left bytes after parsing: ${bytesToHex(rBytesLeft)}`);\n }\n return { r, s };\n}\nclass Signature {\n constructor(r, s) {\n this.r = r;\n this.s = s;\n this.assertValidity();\n }\n static fromCompact(hex) {\n const arr = hex instanceof Uint8Array;\n const name = 'Signature.fromCompact';\n if (typeof hex !== 'string' && !arr)\n throw new TypeError(`${name}: Expected string or Uint8Array`);\n const str = arr ? bytesToHex(hex) : hex;\n if (str.length !== 128)\n throw new Error(`${name}: Expected 64-byte hex`);\n return new Signature(hexToNumber(str.slice(0, 64)), hexToNumber(str.slice(64, 128)));\n }\n static fromDER(hex) {\n const arr = hex instanceof Uint8Array;\n if (typeof hex !== 'string' && !arr)\n throw new TypeError(`Signature.fromDER: Expected string or Uint8Array`);\n const { r, s } = parseDERSignature(arr ? hex : hexToBytes(hex));\n return new Signature(r, s);\n }\n static fromHex(hex) {\n return this.fromDER(hex);\n }\n assertValidity() {\n const { r, s } = this;\n if (!isWithinCurveOrder(r))\n throw new Error('Invalid Signature: r must be 0 < r < n');\n if (!isWithinCurveOrder(s))\n throw new Error('Invalid Signature: s must be 0 < s < n');\n }\n hasHighS() {\n const HALF = CURVE.n >> _1n;\n return this.s > HALF;\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, CURVE.n - this.s) : this;\n }\n toDERRawBytes(isCompressed = false) {\n return hexToBytes(this.toDERHex(isCompressed));\n }\n toDERHex(isCompressed = false) {\n const sHex = sliceDER(numberToHexUnpadded(this.s));\n if (isCompressed)\n return sHex;\n const rHex = sliceDER(numberToHexUnpadded(this.r));\n const rLen = numberToHexUnpadded(rHex.length / 2);\n const sLen = numberToHexUnpadded(sHex.length / 2);\n const length = numberToHexUnpadded(rHex.length / 2 + sHex.length / 2 + 4);\n return `30${length}02${rLen}${rHex}02${sLen}${sHex}`;\n }\n toRawBytes() {\n return this.toDERRawBytes();\n }\n toHex() {\n return this.toDERHex();\n }\n toCompactRawBytes() {\n return hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numTo32bStr(this.r) + numTo32bStr(this.s);\n }\n}\nexports.Signature = Signature;\nfunction concatBytes(...arrays) {\n if (!arrays.every((b) => b instanceof Uint8Array))\n throw new Error('Uint8Array list expected');\n if (arrays.length === 1)\n return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\nfunction bytesToHex(uint8a) {\n if (!(uint8a instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\nconst POW_2_256 = BigInt('0x10000000000000000000000000000000000000000000000000000000000000000');\nfunction numTo32bStr(num) {\n if (typeof num !== 'bigint')\n throw new Error('Expected bigint');\n if (!(_0n <= num && num < POW_2_256))\n throw new Error('Expected number < 2^256');\n return num.toString(16).padStart(64, '0');\n}\nfunction numTo32b(num) {\n const b = hexToBytes(numTo32bStr(num));\n if (b.length !== 32)\n throw new Error('Error: expected 32 bytes');\n return b;\n}\nfunction numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nfunction hexToNumber(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToNumber: expected string, got ' + typeof hex);\n }\n return BigInt(`0x${hex}`);\n}\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2)\n throw new Error('hexToBytes: received invalid unpadded hex' + hex.length);\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\nfunction bytesToNumber(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nfunction ensureBytes(hex) {\n return hex instanceof Uint8Array ? Uint8Array.from(hex) : hexToBytes(hex);\n}\nfunction normalizeScalar(num) {\n if (typeof num === 'number' && Number.isSafeInteger(num) && num > 0)\n return BigInt(num);\n if (typeof num === 'bigint' && isWithinCurveOrder(num))\n return num;\n throw new TypeError('Expected valid private scalar: 0 < scalar < curve.n');\n}\nfunction mod(a, b = CURVE.P) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\nfunction pow2(x, power) {\n const { P } = CURVE;\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= P;\n }\n return res;\n}\nfunction sqrtMod(x) {\n const { P } = CURVE;\n const _6n = BigInt(6);\n const _11n = BigInt(11);\n const _22n = BigInt(22);\n const _23n = BigInt(23);\n const _44n = BigInt(44);\n const _88n = BigInt(88);\n const b2 = (x * x * x) % P;\n const b3 = (b2 * b2 * x) % P;\n const b6 = (pow2(b3, _3n) * b3) % P;\n const b9 = (pow2(b6, _3n) * b3) % P;\n const b11 = (pow2(b9, _2n) * b2) % P;\n const b22 = (pow2(b11, _11n) * b11) % P;\n const b44 = (pow2(b22, _22n) * b22) % P;\n const b88 = (pow2(b44, _44n) * b44) % P;\n const b176 = (pow2(b88, _88n) * b88) % P;\n const b220 = (pow2(b176, _44n) * b44) % P;\n const b223 = (pow2(b220, _3n) * b3) % P;\n const t1 = (pow2(b223, _23n) * b22) % P;\n const t2 = (pow2(t1, _6n) * b2) % P;\n return pow2(t2, _2n);\n}\nfunction invert(number, modulo = CURVE.P) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n let a = mod(number, modulo);\n let b = modulo;\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\nfunction invertBatch(nums, p = CURVE.P) {\n const scratch = new Array(nums.length);\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (num === _0n)\n return acc;\n scratch[i] = acc;\n return mod(acc * num, p);\n }, _1n);\n const inverted = invert(lastMultiplied, p);\n nums.reduceRight((acc, num, i) => {\n if (num === _0n)\n return acc;\n scratch[i] = mod(acc * scratch[i], p);\n return mod(acc * num, p);\n }, inverted);\n return scratch;\n}\nconst divNearest = (a, b) => (a + b / _2n) / b;\nconst ENDO = {\n a1: BigInt('0x3086d221a7d46bcde86c90e49284eb15'),\n b1: -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3'),\n a2: BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8'),\n b2: BigInt('0x3086d221a7d46bcde86c90e49284eb15'),\n POW_2_128: BigInt('0x100000000000000000000000000000000'),\n};\nfunction splitScalarEndo(k) {\n const { n } = CURVE;\n const { a1, b1, a2, b2, POW_2_128 } = ENDO;\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalarEndo: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n}\nfunction truncateHash(hash) {\n const { n } = CURVE;\n const byteLength = hash.length;\n const delta = byteLength * 8 - 256;\n let h = bytesToNumber(hash);\n if (delta > 0)\n h = h >> BigInt(delta);\n if (h >= n)\n h -= n;\n return h;\n}\nlet _sha256Sync;\nlet _hmacSha256Sync;\nclass HmacDrbg {\n constructor() {\n this.v = new Uint8Array(32).fill(1);\n this.k = new Uint8Array(32).fill(0);\n this.counter = 0;\n }\n hmac(...values) {\n return exports.utils.hmacSha256(this.k, ...values);\n }\n hmacSync(...values) {\n return _hmacSha256Sync(this.k, ...values);\n }\n checkSync() {\n if (typeof _hmacSha256Sync !== 'function')\n throw new ShaError('hmacSha256Sync needs to be set');\n }\n incr() {\n if (this.counter >= 1000)\n throw new Error('Tried 1,000 k values for sign(), all were invalid');\n this.counter += 1;\n }\n async reseed(seed = new Uint8Array()) {\n this.k = await this.hmac(this.v, Uint8Array.from([0x00]), seed);\n this.v = await this.hmac(this.v);\n if (seed.length === 0)\n return;\n this.k = await this.hmac(this.v, Uint8Array.from([0x01]), seed);\n this.v = await this.hmac(this.v);\n }\n reseedSync(seed = new Uint8Array()) {\n this.checkSync();\n this.k = this.hmacSync(this.v, Uint8Array.from([0x00]), seed);\n this.v = this.hmacSync(this.v);\n if (seed.length === 0)\n return;\n this.k = this.hmacSync(this.v, Uint8Array.from([0x01]), seed);\n this.v = this.hmacSync(this.v);\n }\n async generate() {\n this.incr();\n this.v = await this.hmac(this.v);\n return this.v;\n }\n generateSync() {\n this.checkSync();\n this.incr();\n this.v = this.hmacSync(this.v);\n return this.v;\n }\n}\nfunction isWithinCurveOrder(num) {\n return _0n < num && num < CURVE.n;\n}\nfunction isValidFieldElement(num) {\n return _0n < num && num < CURVE.P;\n}\nfunction kmdToSig(kBytes, m, d) {\n const k = bytesToNumber(kBytes);\n if (!isWithinCurveOrder(k))\n return;\n const { n } = CURVE;\n const q = Point.BASE.multiply(k);\n const r = mod(q.x, n);\n if (r === _0n)\n return;\n const s = mod(invert(k, n) * mod(m + d * r, n), n);\n if (s === _0n)\n return;\n const sig = new Signature(r, s);\n const recovery = (q.x === sig.r ? 0 : 2) | Number(q.y & _1n);\n return { sig, recovery };\n}\nfunction normalizePrivateKey(key) {\n let num;\n if (typeof key === 'bigint') {\n num = key;\n }\n else if (typeof key === 'number' && Number.isSafeInteger(key) && key > 0) {\n num = BigInt(key);\n }\n else if (typeof key === 'string') {\n if (key.length !== 64)\n throw new Error('Expected 32 bytes of private key');\n num = hexToNumber(key);\n }\n else if (key instanceof Uint8Array) {\n if (key.length !== 32)\n throw new Error('Expected 32 bytes of private key');\n num = bytesToNumber(key);\n }\n else {\n throw new TypeError('Expected valid private key');\n }\n if (!isWithinCurveOrder(num))\n throw new Error('Expected private key: 0 < key < n');\n return num;\n}\nfunction normalizePublicKey(publicKey) {\n if (publicKey instanceof Point) {\n publicKey.assertValidity();\n return publicKey;\n }\n else {\n return Point.fromHex(publicKey);\n }\n}\nfunction normalizeSignature(signature) {\n if (signature instanceof Signature) {\n signature.assertValidity();\n return signature;\n }\n try {\n return Signature.fromDER(signature);\n }\n catch (error) {\n return Signature.fromCompact(signature);\n }\n}\nfunction getPublicKey(privateKey, isCompressed = false) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n}\nexports.getPublicKey = getPublicKey;\nfunction recoverPublicKey(msgHash, signature, recovery, isCompressed = false) {\n return Point.fromSignature(msgHash, signature, recovery).toRawBytes(isCompressed);\n}\nexports.recoverPublicKey = recoverPublicKey;\nfunction isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === 33 || len === 65;\n if (str)\n return len === 66 || len === 130;\n if (item instanceof Point)\n return true;\n return false;\n}\nfunction getSharedSecret(privateA, publicB, isCompressed = false) {\n if (isProbPub(privateA))\n throw new TypeError('getSharedSecret: first arg must be private key');\n if (!isProbPub(publicB))\n throw new TypeError('getSharedSecret: second arg must be public key');\n const b = normalizePublicKey(publicB);\n b.assertValidity();\n return b.multiply(normalizePrivateKey(privateA)).toRawBytes(isCompressed);\n}\nexports.getSharedSecret = getSharedSecret;\nfunction bits2int(bytes) {\n const slice = bytes.length > 32 ? bytes.slice(0, 32) : bytes;\n return bytesToNumber(slice);\n}\nfunction bits2octets(bytes) {\n const z1 = bits2int(bytes);\n const z2 = mod(z1, CURVE.n);\n return int2octets(z2 < _0n ? z1 : z2);\n}\nfunction int2octets(num) {\n return numTo32b(num);\n}\nfunction initSigArgs(msgHash, privateKey, extraEntropy) {\n if (msgHash == null)\n throw new Error(`sign: expected valid message hash, not \"${msgHash}\"`);\n const h1 = ensureBytes(msgHash);\n const d = normalizePrivateKey(privateKey);\n const seedArgs = [int2octets(d), bits2octets(h1)];\n if (extraEntropy != null) {\n if (extraEntropy === true)\n extraEntropy = exports.utils.randomBytes(32);\n const e = ensureBytes(extraEntropy);\n if (e.length !== 32)\n throw new Error('sign: Expected 32 bytes of extra data');\n seedArgs.push(e);\n }\n const seed = concatBytes(...seedArgs);\n const m = bits2int(h1);\n return { seed, m, d };\n}\nfunction finalizeSig(recSig, opts) {\n let { sig, recovery } = recSig;\n const { canonical, der, recovered } = Object.assign({ canonical: true, der: true }, opts);\n if (canonical && sig.hasHighS()) {\n sig = sig.normalizeS();\n recovery ^= 1;\n }\n const hashed = der ? sig.toDERRawBytes() : sig.toCompactRawBytes();\n return recovered ? [hashed, recovery] : hashed;\n}\nasync function sign(msgHash, privKey, opts = {}) {\n const { seed, m, d } = initSigArgs(msgHash, privKey, opts.extraEntropy);\n let sig;\n const drbg = new HmacDrbg();\n await drbg.reseed(seed);\n while (!(sig = kmdToSig(await drbg.generate(), m, d)))\n await drbg.reseed();\n return finalizeSig(sig, opts);\n}\nexports.sign = sign;\nfunction signSync(msgHash, privKey, opts = {}) {\n const { seed, m, d } = initSigArgs(msgHash, privKey, opts.extraEntropy);\n let sig;\n const drbg = new HmacDrbg();\n drbg.reseedSync(seed);\n while (!(sig = kmdToSig(drbg.generateSync(), m, d)))\n drbg.reseedSync();\n return finalizeSig(sig, opts);\n}\nexports.signSync = signSync;\nconst vopts = { strict: true };\nfunction verify(signature, msgHash, publicKey, opts = vopts) {\n let sig;\n try {\n sig = normalizeSignature(signature);\n msgHash = ensureBytes(msgHash);\n }\n catch (error) {\n return false;\n }\n const { r, s } = sig;\n if (opts.strict && sig.hasHighS())\n return false;\n const h = truncateHash(msgHash);\n let P;\n try {\n P = normalizePublicKey(publicKey);\n }\n catch (error) {\n return false;\n }\n const { n } = CURVE;\n const sinv = invert(s, n);\n const u1 = mod(h * sinv, n);\n const u2 = mod(r * sinv, n);\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2);\n if (!R)\n return false;\n const v = mod(R.x, n);\n return v === r;\n}\nexports.verify = verify;\nfunction schnorrChallengeFinalize(ch) {\n return mod(bytesToNumber(ch), CURVE.n);\n}\nclass SchnorrSignature {\n constructor(r, s) {\n this.r = r;\n this.s = s;\n this.assertValidity();\n }\n static fromHex(hex) {\n const bytes = ensureBytes(hex);\n if (bytes.length !== 64)\n throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${bytes.length}`);\n const r = bytesToNumber(bytes.subarray(0, 32));\n const s = bytesToNumber(bytes.subarray(32, 64));\n return new SchnorrSignature(r, s);\n }\n assertValidity() {\n const { r, s } = this;\n if (!isValidFieldElement(r) || !isWithinCurveOrder(s))\n throw new Error('Invalid signature');\n }\n toHex() {\n return numTo32bStr(this.r) + numTo32bStr(this.s);\n }\n toRawBytes() {\n return hexToBytes(this.toHex());\n }\n}\nfunction schnorrGetPublicKey(privateKey) {\n return Point.fromPrivateKey(privateKey).toRawX();\n}\nclass InternalSchnorrSignature {\n constructor(message, privateKey, auxRand = exports.utils.randomBytes()) {\n if (message == null)\n throw new TypeError(`sign: Expected valid message, not \"${message}\"`);\n this.m = ensureBytes(message);\n const { x, scalar } = this.getScalar(normalizePrivateKey(privateKey));\n this.px = x;\n this.d = scalar;\n this.rand = ensureBytes(auxRand);\n if (this.rand.length !== 32)\n throw new TypeError('sign: Expected 32 bytes of aux randomness');\n }\n getScalar(priv) {\n const point = Point.fromPrivateKey(priv);\n const scalar = point.hasEvenY() ? priv : CURVE.n - priv;\n return { point, scalar, x: point.toRawX() };\n }\n initNonce(d, t0h) {\n return numTo32b(d ^ bytesToNumber(t0h));\n }\n finalizeNonce(k0h) {\n const k0 = mod(bytesToNumber(k0h), CURVE.n);\n if (k0 === _0n)\n throw new Error('sign: Creation of signature failed. k is zero');\n const { point: R, x: rx, scalar: k } = this.getScalar(k0);\n return { R, rx, k };\n }\n finalizeSig(R, k, e, d) {\n return new SchnorrSignature(R.x, mod(k + e * d, CURVE.n)).toRawBytes();\n }\n error() {\n throw new Error('sign: Invalid signature produced');\n }\n async calc() {\n const { m, d, px, rand } = this;\n const tag = exports.utils.taggedHash;\n const t = this.initNonce(d, await tag(TAGS.aux, rand));\n const { R, rx, k } = this.finalizeNonce(await tag(TAGS.nonce, t, px, m));\n const e = schnorrChallengeFinalize(await tag(TAGS.challenge, rx, px, m));\n const sig = this.finalizeSig(R, k, e, d);\n if (!(await schnorrVerify(sig, m, px)))\n this.error();\n return sig;\n }\n calcSync() {\n const { m, d, px, rand } = this;\n const tag = exports.utils.taggedHashSync;\n const t = this.initNonce(d, tag(TAGS.aux, rand));\n const { R, rx, k } = this.finalizeNonce(tag(TAGS.nonce, t, px, m));\n const e = schnorrChallengeFinalize(tag(TAGS.challenge, rx, px, m));\n const sig = this.finalizeSig(R, k, e, d);\n if (!schnorrVerifySync(sig, m, px))\n this.error();\n return sig;\n }\n}\nasync function schnorrSign(msg, privKey, auxRand) {\n return new InternalSchnorrSignature(msg, privKey, auxRand).calc();\n}\nfunction schnorrSignSync(msg, privKey, auxRand) {\n return new InternalSchnorrSignature(msg, privKey, auxRand).calcSync();\n}\nfunction initSchnorrVerify(signature, message, publicKey) {\n const raw = signature instanceof SchnorrSignature;\n const sig = raw ? signature : SchnorrSignature.fromHex(signature);\n if (raw)\n sig.assertValidity();\n return {\n ...sig,\n m: ensureBytes(message),\n P: normalizePublicKey(publicKey),\n };\n}\nfunction finalizeSchnorrVerify(r, P, s, e) {\n const R = Point.BASE.multiplyAndAddUnsafe(P, normalizePrivateKey(s), mod(-e, CURVE.n));\n if (!R || !R.hasEvenY() || R.x !== r)\n return false;\n return true;\n}\nasync function schnorrVerify(signature, message, publicKey) {\n try {\n const { r, s, m, P } = initSchnorrVerify(signature, message, publicKey);\n const e = schnorrChallengeFinalize(await exports.utils.taggedHash(TAGS.challenge, numTo32b(r), P.toRawX(), m));\n return finalizeSchnorrVerify(r, P, s, e);\n }\n catch (error) {\n return false;\n }\n}\nfunction schnorrVerifySync(signature, message, publicKey) {\n try {\n const { r, s, m, P } = initSchnorrVerify(signature, message, publicKey);\n const e = schnorrChallengeFinalize(exports.utils.taggedHashSync(TAGS.challenge, numTo32b(r), P.toRawX(), m));\n return finalizeSchnorrVerify(r, P, s, e);\n }\n catch (error) {\n if (error instanceof ShaError)\n throw error;\n return false;\n }\n}\nexports.schnorr = {\n Signature: SchnorrSignature,\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n signSync: schnorrSignSync,\n verifySync: schnorrVerifySync,\n};\nPoint.BASE._setWindowSize(8);\nconst crypto = {\n node: nodeCrypto,\n web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined,\n};\nconst TAGS = {\n challenge: 'BIP0340/challenge',\n aux: 'BIP0340/aux',\n nonce: 'BIP0340/nonce',\n};\nconst TAGGED_HASH_PREFIXES = {};\nexports.utils = {\n bytesToHex,\n hexToBytes,\n concatBytes,\n mod,\n invert,\n isValidPrivateKey(privateKey) {\n try {\n normalizePrivateKey(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n _bigintTo32Bytes: numTo32b,\n _normalizePrivateKey: normalizePrivateKey,\n hashToPrivateKey: (hash) => {\n hash = ensureBytes(hash);\n if (hash.length < 40 || hash.length > 1024)\n throw new Error('Expected 40-1024 bytes of private key as per FIPS 186');\n const num = mod(bytesToNumber(hash), CURVE.n - _1n) + _1n;\n return numTo32b(num);\n },\n randomBytes: (bytesLength = 32) => {\n if (crypto.web) {\n return crypto.web.getRandomValues(new Uint8Array(bytesLength));\n }\n else if (crypto.node) {\n const { randomBytes } = crypto.node;\n return Uint8Array.from(randomBytes(bytesLength));\n }\n else {\n throw new Error(\"The environment doesn't have randomBytes function\");\n }\n },\n randomPrivateKey: () => {\n return exports.utils.hashToPrivateKey(exports.utils.randomBytes(40));\n },\n sha256: async (...messages) => {\n if (crypto.web) {\n const buffer = await crypto.web.subtle.digest('SHA-256', concatBytes(...messages));\n return new Uint8Array(buffer);\n }\n else if (crypto.node) {\n const { createHash } = crypto.node;\n const hash = createHash('sha256');\n messages.forEach((m) => hash.update(m));\n return Uint8Array.from(hash.digest());\n }\n else {\n throw new Error(\"The environment doesn't have sha256 function\");\n }\n },\n hmacSha256: async (key, ...messages) => {\n if (crypto.web) {\n const ckey = await crypto.web.subtle.importKey('raw', key, { name: 'HMAC', hash: { name: 'SHA-256' } }, false, ['sign']);\n const message = concatBytes(...messages);\n const buffer = await crypto.web.subtle.sign('HMAC', ckey, message);\n return new Uint8Array(buffer);\n }\n else if (crypto.node) {\n const { createHmac } = crypto.node;\n const hash = createHmac('sha256', key);\n messages.forEach((m) => hash.update(m));\n return Uint8Array.from(hash.digest());\n }\n else {\n throw new Error(\"The environment doesn't have hmac-sha256 function\");\n }\n },\n sha256Sync: undefined,\n hmacSha256Sync: undefined,\n taggedHash: async (tag, ...messages) => {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = await exports.utils.sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return exports.utils.sha256(tagP, ...messages);\n },\n taggedHashSync: (tag, ...messages) => {\n if (typeof _sha256Sync !== 'function')\n throw new ShaError('sha256Sync is undefined, you need to set it');\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = _sha256Sync(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return _sha256Sync(tagP, ...messages);\n },\n precompute(windowSize = 8, point = Point.BASE) {\n const cached = point === Point.BASE ? point : new Point(point.x, point.y);\n cached._setWindowSize(windowSize);\n cached.multiply(_3n);\n return cached;\n },\n};\nObject.defineProperties(exports.utils, {\n sha256Sync: {\n configurable: false,\n get() {\n return _sha256Sync;\n },\n set(val) {\n if (!_sha256Sync)\n _sha256Sync = val;\n },\n },\n hmacSha256Sync: {\n configurable: false,\n get() {\n return _hmacSha256Sync;\n },\n set(val) {\n if (!_hmacSha256Sync)\n _hmacSha256Sync = val;\n },\n },\n});\n", "\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n", "\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n", "\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n", "\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n", "\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n", "// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b\n\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nvar _require = require('./internal/errors'),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\nvar AssertionError = require('./internal/assert/assertion_error');\nvar _require2 = require('util/'),\n inspect = _require2.inspect;\nvar _require$types = require('util/').types,\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\nvar objectAssign = require('object.assign/polyfill')();\nvar objectIs = require('object-is/polyfill')();\nvar RegExpPrototypeTest = require('call-bind/callBound')('RegExp.prototype.test');\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\nfunction lazyLoadComparison() {\n var comparison = require('./internal/util/comparisons');\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n}\n\n// Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = [\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"];\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\nvar warned = false;\n\n// The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {};\n\n// All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n if (argsLen === 2) operator = '!=';\n }\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n if (message !== undefined) {\n errArgs.message = message;\n }\n var err = new AssertionError(errArgs);\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n throw err;\n}\nassert.fail = fail;\n\n// The AssertionError is defined in internal/error.\nassert.AssertionError = AssertionError;\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n}\n\n// Pure assertion tests whether a value is truthy, as determined\n// by !!value.\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\nassert.ok = ok;\n\n// The equality assertion tests shallow, coercive equality with ==.\n/* eslint-disable no-restricted-properties */\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n // eslint-disable-next-line eqeqeq\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n};\n\n// The non-equality assertion tests for whether two objects are not\n// equal with !=.\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n // eslint-disable-next-line eqeqeq\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n};\n\n// The equivalence assertion tests a deep equality relation.\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n};\n\n// The non-equivalence assertion tests for any deep inequality.\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\nassert.notDeepStrictEqual = notDeepStrictEqual;\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\nvar Comparison = /*#__PURE__*/_createClass(function Comparison(obj, keys, actual) {\n var _this = this;\n _classCallCheck(this, Comparison);\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && RegExpPrototypeTest(obj[key], actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n});\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return RegExpPrototypeTest(expected, actual);\n // assert.doesNotThrow does not accept objects.\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n }\n\n // Handle primitives properly.\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n var keys = Object.keys(expected);\n // Special handle errors to make sure the name and the message are compared\n // as well.\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && RegExpPrototypeTest(expected[key], actual[key])) {\n return;\n }\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n }\n // Guard instanceof against arrow functions as they don't have a prototype.\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n return expected.call({}, actual) === true;\n}\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n try {\n fn();\n } catch (e) {\n return e;\n }\n return NO_EXCEPTION_SENTINEL;\n}\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn();\n // Fail in case no promise is returned.\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n throw actual;\n}\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n });\n\n // Make sure we actually have a stack trace!\n var origStack = err.stack;\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift();\n // Filter all frames existing in err.stack.\n var tmp1 = newErr.stack.split('\\n');\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n throw newErr;\n }\n};\n\n// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a871df3dfb8ea663ef5e1f8f62701ec51384ecb\nfunction internalMatch(string, regexp, message, fn, fnName) {\n if (!isRegExp(regexp)) {\n throw new ERR_INVALID_ARG_TYPE('regexp', 'RegExp', regexp);\n }\n var match = fnName === 'match';\n if (typeof string !== 'string' || RegExpPrototypeTest(regexp, string) !== match) {\n if (message instanceof Error) {\n throw message;\n }\n var generatedMessage = !message;\n\n // 'The input was expected to not match the regular expression ' +\n message = message || (typeof string !== 'string' ? 'The \"string\" argument must be of type string. Received type ' + \"\".concat(_typeof(string), \" (\").concat(inspect(string), \")\") : (match ? 'The input did not match the regular expression ' : 'The input was expected to not match the regular expression ') + \"\".concat(inspect(regexp), \". Input:\\n\\n\").concat(inspect(string), \"\\n\"));\n var err = new AssertionError({\n actual: string,\n expected: regexp,\n message: message,\n operator: fnName,\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n}\nassert.match = function match(string, regexp, message) {\n internalMatch(string, regexp, message, match, 'match');\n};\nassert.doesNotMatch = function doesNotMatch(string, regexp, message) {\n internalMatch(string, regexp, message, doesNotMatch, 'doesNotMatch');\n};\n\n// Expose a strict only variant of assert\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;", "// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n\n'use strict';\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _require = require('util/'),\n inspect = _require.inspect;\nvar _require2 = require('../errors'),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE;\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n while (count) {\n str += str;\n count--;\n }\n str += str.substring(0, maxCount - str.length);\n return str;\n}\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n};\n\n// Comparing short primitives should just show === / !== instead of using the\n// diff.\nvar kMaxShortLength = 10;\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = '';\n\n // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n }\n\n // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length;\n // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n }\n // Ignore the first characters.\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n }\n\n // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n var maxLines = Math.max(actualLines.length, expectedLines.length);\n // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n');\n\n // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the expected line to the cache.\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++;\n // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the actual line to the result.\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++;\n // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i];\n // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine);\n // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2;\n // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = '';\n // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n }\n // Inspected object to big (Show ~20 rows max)\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\nvar AssertionError = /*#__PURE__*/function (_Error, _inspect$custom) {\n _inherits(AssertionError, _Error);\n var _super = _createSuper(AssertionError);\n function AssertionError(options) {\n var _this;\n _classCallCheck(this, AssertionError);\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n if (message != null) {\n _this = _super.call(this, String(message));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n }\n // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _super.call(this, createErrDiff(actual, expected, operator));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n');\n\n // In case \"actual\" is an object, it should not be reference equal.\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n }\n\n // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n while (res.length > 27) {\n res.pop();\n }\n }\n\n // Only print a single input.\n if (res.length === 1) {\n _this = _super.call(this, \"\".concat(base, \" \").concat(res[0]));\n } else {\n _this = _super.call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\"));\n }\n } else {\n var _res = inspectValue(actual);\n var other = '';\n var knownOperators = kReadableOperator[operator];\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n _this = _super.call(this, \"\".concat(_res).concat(other));\n }\n }\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n }\n // Create error message including the error code in the name.\n _this.stack;\n // Reset the name.\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: _inspect$custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread(_objectSpread({}, ctx), {}, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n return AssertionError;\n}( /*#__PURE__*/_wrapNativeSuper(Error), inspect.custom);\nmodule.exports = AssertionError;", "// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n/* eslint node-core/alphabetize-errors: \"error\" */\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n\n'use strict';\n\n// The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar codes = {};\n\n// Lazy loaded\nvar assert;\nvar util;\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n var NodeError = /*#__PURE__*/function (_Base) {\n _inherits(NodeError, _Base);\n var _super = _createSuper(NodeError);\n function NodeError(arg1, arg2, arg3) {\n var _this;\n _classCallCheck(this, NodeError);\n _this = _super.call(this, getMessage(arg1, arg2, arg3));\n _this.code = code;\n return _this;\n }\n return _createClass(NodeError);\n }(Base);\n codes[code] = NodeError;\n}\n\n// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = require('../assert');\n assert(typeof name === 'string', \"'name' must be a string\");\n\n // determiner: 'must be' or 'must not be'\n var determiner;\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n var msg;\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n // TODO(BridgeAR): Improve the output by showing `null` and similar.\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = require('util/');\n var inspected = util.inspect(value);\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (assert === undefined) assert = require('../assert');\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;", "// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar regexFlagsSupported = /a/g.flags !== undefined;\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : require('is-nan');\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\nvar _require$types = require('util/').types,\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n }\n // The maximum size for an array is 2 ** 32 -1.\n return key.length === 10 && key >= Math.pow(2, 32);\n}\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n}\n\n// Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n var x = a.length;\n var y = b.length;\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3;\n\n// Check if they have the same source and flags\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n return true;\n}\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n}\n\n// Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n }\n\n // Check more closely if val1 and val2 are equal.\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n return false;\n }\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n if (val1Tag !== val2Tag) {\n return false;\n }\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n if (keys1.length !== keys2.length) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n }\n // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // wan't to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n }\n // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n if (_keys.length !== _keys2.length) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2);\n\n // The pair must have the same number of owned properties.\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n }\n\n // Cheap key test\n var i = 0;\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n if (symbolKeysA.length !== 0) {\n var count = 0;\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n }\n\n // Use memos to handle cycles.\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n memos.position++;\n }\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n return false;\n}\n\n// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n case 'object':\n // Only pass in null as object!\n return undefined;\n case 'symbol':\n return false;\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n }\n return true;\n}\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) {\n return altValue;\n }\n var curB = b.get(altValue);\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i];\n // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n }\n // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false;\n\n // Fast path to detect missing string, symbol, undefined and null values.\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n if (set === null) {\n set = new Set();\n }\n set.add(val);\n }\n }\n if (set !== null) {\n var bValues = arrayFromSet(b);\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i];\n // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n return set.size === 0;\n }\n return true;\n}\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n return false;\n}\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false;\n // Fast path to detect missing string, symbol, undefined and null\n // keys.\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n if (set === null) {\n set = new Set();\n }\n set.add(key);\n }\n }\n }\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n _key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n if (_typeof(_key) === 'object' && _key !== null) {\n if (!mapHasEqualEntry(set, a, _key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(_key) || !innerDeepEqual(a.get(_key), item, false, memo)) && !mapHasEqualEntry(set, a, _key, item, false, memo)) {\n return false;\n }\n }\n return set.size === 0;\n }\n return true;\n}\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n return true;\n }\n }\n }\n\n // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n for (i = 0; i < keys.length; i++) {\n var _key2 = keys[i];\n if (!innerDeepEqual(a[_key2], b[_key2], strict, memos)) {\n return false;\n }\n }\n return true;\n}\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};", "'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = require('safe-buffer').Buffer\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n", "'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n", "'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bech32m = exports.bech32 = void 0;\nconst ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l';\nconst ALPHABET_MAP = {};\nfor (let z = 0; z < ALPHABET.length; z++) {\n const x = ALPHABET.charAt(z);\n ALPHABET_MAP[x] = z;\n}\nfunction polymodStep(pre) {\n const b = pre >> 25;\n return (((pre & 0x1ffffff) << 5) ^\n (-((b >> 0) & 1) & 0x3b6a57b2) ^\n (-((b >> 1) & 1) & 0x26508e6d) ^\n (-((b >> 2) & 1) & 0x1ea119fa) ^\n (-((b >> 3) & 1) & 0x3d4233dd) ^\n (-((b >> 4) & 1) & 0x2a1462b3));\n}\nfunction prefixChk(prefix) {\n let chk = 1;\n for (let i = 0; i < prefix.length; ++i) {\n const c = prefix.charCodeAt(i);\n if (c < 33 || c > 126)\n return 'Invalid prefix (' + prefix + ')';\n chk = polymodStep(chk) ^ (c >> 5);\n }\n chk = polymodStep(chk);\n for (let i = 0; i < prefix.length; ++i) {\n const v = prefix.charCodeAt(i);\n chk = polymodStep(chk) ^ (v & 0x1f);\n }\n return chk;\n}\nfunction convert(data, inBits, outBits, pad) {\n let value = 0;\n let bits = 0;\n const maxV = (1 << outBits) - 1;\n const result = [];\n for (let i = 0; i < data.length; ++i) {\n value = (value << inBits) | data[i];\n bits += inBits;\n while (bits >= outBits) {\n bits -= outBits;\n result.push((value >> bits) & maxV);\n }\n }\n if (pad) {\n if (bits > 0) {\n result.push((value << (outBits - bits)) & maxV);\n }\n }\n else {\n if (bits >= inBits)\n return 'Excess padding';\n if ((value << (outBits - bits)) & maxV)\n return 'Non-zero padding';\n }\n return result;\n}\nfunction toWords(bytes) {\n return convert(bytes, 8, 5, true);\n}\nfunction fromWordsUnsafe(words) {\n const res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n}\nfunction fromWords(words) {\n const res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n}\nfunction getLibraryFromEncoding(encoding) {\n let ENCODING_CONST;\n if (encoding === 'bech32') {\n ENCODING_CONST = 1;\n }\n else {\n ENCODING_CONST = 0x2bc830a3;\n }\n function encode(prefix, words, LIMIT) {\n LIMIT = LIMIT || 90;\n if (prefix.length + 7 + words.length > LIMIT)\n throw new TypeError('Exceeds length limit');\n prefix = prefix.toLowerCase();\n // determine chk mod\n let chk = prefixChk(prefix);\n if (typeof chk === 'string')\n throw new Error(chk);\n let result = prefix + '1';\n for (let i = 0; i < words.length; ++i) {\n const x = words[i];\n if (x >> 5 !== 0)\n throw new Error('Non 5-bit word');\n chk = polymodStep(chk) ^ x;\n result += ALPHABET.charAt(x);\n }\n for (let i = 0; i < 6; ++i) {\n chk = polymodStep(chk);\n }\n chk ^= ENCODING_CONST;\n for (let i = 0; i < 6; ++i) {\n const v = (chk >> ((5 - i) * 5)) & 0x1f;\n result += ALPHABET.charAt(v);\n }\n return result;\n }\n function __decode(str, LIMIT) {\n LIMIT = LIMIT || 90;\n if (str.length < 8)\n return str + ' too short';\n if (str.length > LIMIT)\n return 'Exceeds length limit';\n // don't allow mixed case\n const lowered = str.toLowerCase();\n const uppered = str.toUpperCase();\n if (str !== lowered && str !== uppered)\n return 'Mixed-case string ' + str;\n str = lowered;\n const split = str.lastIndexOf('1');\n if (split === -1)\n return 'No separator character for ' + str;\n if (split === 0)\n return 'Missing prefix for ' + str;\n const prefix = str.slice(0, split);\n const wordChars = str.slice(split + 1);\n if (wordChars.length < 6)\n return 'Data too short';\n let chk = prefixChk(prefix);\n if (typeof chk === 'string')\n return chk;\n const words = [];\n for (let i = 0; i < wordChars.length; ++i) {\n const c = wordChars.charAt(i);\n const v = ALPHABET_MAP[c];\n if (v === undefined)\n return 'Unknown character ' + c;\n chk = polymodStep(chk) ^ v;\n // not in the checksum?\n if (i + 6 >= wordChars.length)\n continue;\n words.push(v);\n }\n if (chk !== ENCODING_CONST)\n return 'Invalid checksum for ' + str;\n return { prefix, words };\n }\n function decodeUnsafe(str, LIMIT) {\n const res = __decode(str, LIMIT);\n if (typeof res === 'object')\n return res;\n }\n function decode(str, LIMIT) {\n const res = __decode(str, LIMIT);\n if (typeof res === 'object')\n return res;\n throw new Error(res);\n }\n return {\n decodeUnsafe,\n decode,\n encode,\n toWords,\n fromWordsUnsafe,\n fromWords,\n };\n}\nexports.bech32 = getLibraryFromEncoding('bech32');\nexports.bech32m = getLibraryFromEncoding('bech32m');\n", "var bigInt = (function (undefined) {\r\n \"use strict\";\r\n\r\n var BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_INT = 9007199254740992,\r\n MAX_INT_ARR = smallToArray(MAX_INT),\r\n DEFAULT_ALPHABET = \"0123456789abcdefghijklmnopqrstuvwxyz\";\r\n\r\n var supportsNativeBigInt = typeof BigInt === \"function\";\r\n\r\n function Integer(v, radix, alphabet, caseSensitive) {\r\n if (typeof v === \"undefined\") return Integer[0];\r\n if (typeof radix !== \"undefined\") return +radix === 10 && !alphabet ? parseValue(v) : parseBase(v, radix, alphabet, caseSensitive);\r\n return parseValue(v);\r\n }\r\n\r\n function BigInteger(value, sign) {\r\n this.value = value;\r\n this.sign = sign;\r\n this.isSmall = false;\r\n }\r\n BigInteger.prototype = Object.create(Integer.prototype);\r\n\r\n function SmallInteger(value) {\r\n this.value = value;\r\n this.sign = value < 0;\r\n this.isSmall = true;\r\n }\r\n SmallInteger.prototype = Object.create(Integer.prototype);\r\n\r\n function NativeBigInt(value) {\r\n this.value = value;\r\n }\r\n NativeBigInt.prototype = Object.create(Integer.prototype);\r\n\r\n function isPrecise(n) {\r\n return -MAX_INT < n && n < MAX_INT;\r\n }\r\n\r\n function smallToArray(n) { // For performance reasons doesn't reference BASE, need to change this function if BASE changes\r\n if (n < 1e7)\r\n return [n];\r\n if (n < 1e14)\r\n return [n % 1e7, Math.floor(n / 1e7)];\r\n return [n % 1e7, Math.floor(n / 1e7) % 1e7, Math.floor(n / 1e14)];\r\n }\r\n\r\n function arrayToSmall(arr) { // If BASE changes this function may need to change\r\n trim(arr);\r\n var length = arr.length;\r\n if (length < 4 && compareAbs(arr, MAX_INT_ARR) < 0) {\r\n switch (length) {\r\n case 0: return 0;\r\n case 1: return arr[0];\r\n case 2: return arr[0] + arr[1] * BASE;\r\n default: return arr[0] + (arr[1] + arr[2] * BASE) * BASE;\r\n }\r\n }\r\n return arr;\r\n }\r\n\r\n function trim(v) {\r\n var i = v.length;\r\n while (v[--i] === 0);\r\n v.length = i + 1;\r\n }\r\n\r\n function createArray(length) { // function shamelessly stolen from Yaffle's library https://github.com/Yaffle/BigInteger\r\n var x = new Array(length);\r\n var i = -1;\r\n while (++i < length) {\r\n x[i] = 0;\r\n }\r\n return x;\r\n }\r\n\r\n function truncate(n) {\r\n if (n > 0) return Math.floor(n);\r\n return Math.ceil(n);\r\n }\r\n\r\n function add(a, b) { // assumes a and b are arrays with a.length >= b.length\r\n var l_a = a.length,\r\n l_b = b.length,\r\n r = new Array(l_a),\r\n carry = 0,\r\n base = BASE,\r\n sum, i;\r\n for (i = 0; i < l_b; i++) {\r\n sum = a[i] + b[i] + carry;\r\n carry = sum >= base ? 1 : 0;\r\n r[i] = sum - carry * base;\r\n }\r\n while (i < l_a) {\r\n sum = a[i] + carry;\r\n carry = sum === base ? 1 : 0;\r\n r[i++] = sum - carry * base;\r\n }\r\n if (carry > 0) r.push(carry);\r\n return r;\r\n }\r\n\r\n function addAny(a, b) {\r\n if (a.length >= b.length) return add(a, b);\r\n return add(b, a);\r\n }\r\n\r\n function addSmall(a, carry) { // assumes a is array, carry is number with 0 <= carry < MAX_INT\r\n var l = a.length,\r\n r = new Array(l),\r\n base = BASE,\r\n sum, i;\r\n for (i = 0; i < l; i++) {\r\n sum = a[i] - base + carry;\r\n carry = Math.floor(sum / base);\r\n r[i] = sum - carry * base;\r\n carry += 1;\r\n }\r\n while (carry > 0) {\r\n r[i++] = carry % base;\r\n carry = Math.floor(carry / base);\r\n }\r\n return r;\r\n }\r\n\r\n BigInteger.prototype.add = function (v) {\r\n var n = parseValue(v);\r\n if (this.sign !== n.sign) {\r\n return this.subtract(n.negate());\r\n }\r\n var a = this.value, b = n.value;\r\n if (n.isSmall) {\r\n return new BigInteger(addSmall(a, Math.abs(b)), this.sign);\r\n }\r\n return new BigInteger(addAny(a, b), this.sign);\r\n };\r\n BigInteger.prototype.plus = BigInteger.prototype.add;\r\n\r\n SmallInteger.prototype.add = function (v) {\r\n var n = parseValue(v);\r\n var a = this.value;\r\n if (a < 0 !== n.sign) {\r\n return this.subtract(n.negate());\r\n }\r\n var b = n.value;\r\n if (n.isSmall) {\r\n if (isPrecise(a + b)) return new SmallInteger(a + b);\r\n b = smallToArray(Math.abs(b));\r\n }\r\n return new BigInteger(addSmall(b, Math.abs(a)), a < 0);\r\n };\r\n SmallInteger.prototype.plus = SmallInteger.prototype.add;\r\n\r\n NativeBigInt.prototype.add = function (v) {\r\n return new NativeBigInt(this.value + parseValue(v).value);\r\n }\r\n NativeBigInt.prototype.plus = NativeBigInt.prototype.add;\r\n\r\n function subtract(a, b) { // assumes a and b are arrays with a >= b\r\n var a_l = a.length,\r\n b_l = b.length,\r\n r = new Array(a_l),\r\n borrow = 0,\r\n base = BASE,\r\n i, difference;\r\n for (i = 0; i < b_l; i++) {\r\n difference = a[i] - borrow - b[i];\r\n if (difference < 0) {\r\n difference += base;\r\n borrow = 1;\r\n } else borrow = 0;\r\n r[i] = difference;\r\n }\r\n for (i = b_l; i < a_l; i++) {\r\n difference = a[i] - borrow;\r\n if (difference < 0) difference += base;\r\n else {\r\n r[i++] = difference;\r\n break;\r\n }\r\n r[i] = difference;\r\n }\r\n for (; i < a_l; i++) {\r\n r[i] = a[i];\r\n }\r\n trim(r);\r\n return r;\r\n }\r\n\r\n function subtractAny(a, b, sign) {\r\n var value;\r\n if (compareAbs(a, b) >= 0) {\r\n value = subtract(a, b);\r\n } else {\r\n value = subtract(b, a);\r\n sign = !sign;\r\n }\r\n value = arrayToSmall(value);\r\n if (typeof value === \"number\") {\r\n if (sign) value = -value;\r\n return new SmallInteger(value);\r\n }\r\n return new BigInteger(value, sign);\r\n }\r\n\r\n function subtractSmall(a, b, sign) { // assumes a is array, b is number with 0 <= b < MAX_INT\r\n var l = a.length,\r\n r = new Array(l),\r\n carry = -b,\r\n base = BASE,\r\n i, difference;\r\n for (i = 0; i < l; i++) {\r\n difference = a[i] + carry;\r\n carry = Math.floor(difference / base);\r\n difference %= base;\r\n r[i] = difference < 0 ? difference + base : difference;\r\n }\r\n r = arrayToSmall(r);\r\n if (typeof r === \"number\") {\r\n if (sign) r = -r;\r\n return new SmallInteger(r);\r\n } return new BigInteger(r, sign);\r\n }\r\n\r\n BigInteger.prototype.subtract = function (v) {\r\n var n = parseValue(v);\r\n if (this.sign !== n.sign) {\r\n return this.add(n.negate());\r\n }\r\n var a = this.value, b = n.value;\r\n if (n.isSmall)\r\n return subtractSmall(a, Math.abs(b), this.sign);\r\n return subtractAny(a, b, this.sign);\r\n };\r\n BigInteger.prototype.minus = BigInteger.prototype.subtract;\r\n\r\n SmallInteger.prototype.subtract = function (v) {\r\n var n = parseValue(v);\r\n var a = this.value;\r\n if (a < 0 !== n.sign) {\r\n return this.add(n.negate());\r\n }\r\n var b = n.value;\r\n if (n.isSmall) {\r\n return new SmallInteger(a - b);\r\n }\r\n return subtractSmall(b, Math.abs(a), a >= 0);\r\n };\r\n SmallInteger.prototype.minus = SmallInteger.prototype.subtract;\r\n\r\n NativeBigInt.prototype.subtract = function (v) {\r\n return new NativeBigInt(this.value - parseValue(v).value);\r\n }\r\n NativeBigInt.prototype.minus = NativeBigInt.prototype.subtract;\r\n\r\n BigInteger.prototype.negate = function () {\r\n return new BigInteger(this.value, !this.sign);\r\n };\r\n SmallInteger.prototype.negate = function () {\r\n var sign = this.sign;\r\n var small = new SmallInteger(-this.value);\r\n small.sign = !sign;\r\n return small;\r\n };\r\n NativeBigInt.prototype.negate = function () {\r\n return new NativeBigInt(-this.value);\r\n }\r\n\r\n BigInteger.prototype.abs = function () {\r\n return new BigInteger(this.value, false);\r\n };\r\n SmallInteger.prototype.abs = function () {\r\n return new SmallInteger(Math.abs(this.value));\r\n };\r\n NativeBigInt.prototype.abs = function () {\r\n return new NativeBigInt(this.value >= 0 ? this.value : -this.value);\r\n }\r\n\r\n\r\n function multiplyLong(a, b) {\r\n var a_l = a.length,\r\n b_l = b.length,\r\n l = a_l + b_l,\r\n r = createArray(l),\r\n base = BASE,\r\n product, carry, i, a_i, b_j;\r\n for (i = 0; i < a_l; ++i) {\r\n a_i = a[i];\r\n for (var j = 0; j < b_l; ++j) {\r\n b_j = b[j];\r\n product = a_i * b_j + r[i + j];\r\n carry = Math.floor(product / base);\r\n r[i + j] = product - carry * base;\r\n r[i + j + 1] += carry;\r\n }\r\n }\r\n trim(r);\r\n return r;\r\n }\r\n\r\n function multiplySmall(a, b) { // assumes a is array, b is number with |b| < BASE\r\n var l = a.length,\r\n r = new Array(l),\r\n base = BASE,\r\n carry = 0,\r\n product, i;\r\n for (i = 0; i < l; i++) {\r\n product = a[i] * b + carry;\r\n carry = Math.floor(product / base);\r\n r[i] = product - carry * base;\r\n }\r\n while (carry > 0) {\r\n r[i++] = carry % base;\r\n carry = Math.floor(carry / base);\r\n }\r\n return r;\r\n }\r\n\r\n function shiftLeft(x, n) {\r\n var r = [];\r\n while (n-- > 0) r.push(0);\r\n return r.concat(x);\r\n }\r\n\r\n function multiplyKaratsuba(x, y) {\r\n var n = Math.max(x.length, y.length);\r\n\r\n if (n <= 30) return multiplyLong(x, y);\r\n n = Math.ceil(n / 2);\r\n\r\n var b = x.slice(n),\r\n a = x.slice(0, n),\r\n d = y.slice(n),\r\n c = y.slice(0, n);\r\n\r\n var ac = multiplyKaratsuba(a, c),\r\n bd = multiplyKaratsuba(b, d),\r\n abcd = multiplyKaratsuba(addAny(a, b), addAny(c, d));\r\n\r\n var product = addAny(addAny(ac, shiftLeft(subtract(subtract(abcd, ac), bd), n)), shiftLeft(bd, 2 * n));\r\n trim(product);\r\n return product;\r\n }\r\n\r\n // The following function is derived from a surface fit of a graph plotting the performance difference\r\n // between long multiplication and karatsuba multiplication versus the lengths of the two arrays.\r\n function useKaratsuba(l1, l2) {\r\n return -0.012 * l1 - 0.012 * l2 + 0.000015 * l1 * l2 > 0;\r\n }\r\n\r\n BigInteger.prototype.multiply = function (v) {\r\n var n = parseValue(v),\r\n a = this.value, b = n.value,\r\n sign = this.sign !== n.sign,\r\n abs;\r\n if (n.isSmall) {\r\n if (b === 0) return Integer[0];\r\n if (b === 1) return this;\r\n if (b === -1) return this.negate();\r\n abs = Math.abs(b);\r\n if (abs < BASE) {\r\n return new BigInteger(multiplySmall(a, abs), sign);\r\n }\r\n b = smallToArray(abs);\r\n }\r\n if (useKaratsuba(a.length, b.length)) // Karatsuba is only faster for certain array sizes\r\n return new BigInteger(multiplyKaratsuba(a, b), sign);\r\n return new BigInteger(multiplyLong(a, b), sign);\r\n };\r\n\r\n BigInteger.prototype.times = BigInteger.prototype.multiply;\r\n\r\n function multiplySmallAndArray(a, b, sign) { // a >= 0\r\n if (a < BASE) {\r\n return new BigInteger(multiplySmall(b, a), sign);\r\n }\r\n return new BigInteger(multiplyLong(b, smallToArray(a)), sign);\r\n }\r\n SmallInteger.prototype._multiplyBySmall = function (a) {\r\n if (isPrecise(a.value * this.value)) {\r\n return new SmallInteger(a.value * this.value);\r\n }\r\n return multiplySmallAndArray(Math.abs(a.value), smallToArray(Math.abs(this.value)), this.sign !== a.sign);\r\n };\r\n BigInteger.prototype._multiplyBySmall = function (a) {\r\n if (a.value === 0) return Integer[0];\r\n if (a.value === 1) return this;\r\n if (a.value === -1) return this.negate();\r\n return multiplySmallAndArray(Math.abs(a.value), this.value, this.sign !== a.sign);\r\n };\r\n SmallInteger.prototype.multiply = function (v) {\r\n return parseValue(v)._multiplyBySmall(this);\r\n };\r\n SmallInteger.prototype.times = SmallInteger.prototype.multiply;\r\n\r\n NativeBigInt.prototype.multiply = function (v) {\r\n return new NativeBigInt(this.value * parseValue(v).value);\r\n }\r\n NativeBigInt.prototype.times = NativeBigInt.prototype.multiply;\r\n\r\n function square(a) {\r\n //console.assert(2 * BASE * BASE < MAX_INT);\r\n var l = a.length,\r\n r = createArray(l + l),\r\n base = BASE,\r\n product, carry, i, a_i, a_j;\r\n for (i = 0; i < l; i++) {\r\n a_i = a[i];\r\n carry = 0 - a_i * a_i;\r\n for (var j = i; j < l; j++) {\r\n a_j = a[j];\r\n product = 2 * (a_i * a_j) + r[i + j] + carry;\r\n carry = Math.floor(product / base);\r\n r[i + j] = product - carry * base;\r\n }\r\n r[i + l] = carry;\r\n }\r\n trim(r);\r\n return r;\r\n }\r\n\r\n BigInteger.prototype.square = function () {\r\n return new BigInteger(square(this.value), false);\r\n };\r\n\r\n SmallInteger.prototype.square = function () {\r\n var value = this.value * this.value;\r\n if (isPrecise(value)) return new SmallInteger(value);\r\n return new BigInteger(square(smallToArray(Math.abs(this.value))), false);\r\n };\r\n\r\n NativeBigInt.prototype.square = function (v) {\r\n return new NativeBigInt(this.value * this.value);\r\n }\r\n\r\n function divMod1(a, b) { // Left over from previous version. Performs faster than divMod2 on smaller input sizes.\r\n var a_l = a.length,\r\n b_l = b.length,\r\n base = BASE,\r\n result = createArray(b.length),\r\n divisorMostSignificantDigit = b[b_l - 1],\r\n // normalization\r\n lambda = Math.ceil(base / (2 * divisorMostSignificantDigit)),\r\n remainder = multiplySmall(a, lambda),\r\n divisor = multiplySmall(b, lambda),\r\n quotientDigit, shift, carry, borrow, i, l, q;\r\n if (remainder.length <= a_l) remainder.push(0);\r\n divisor.push(0);\r\n divisorMostSignificantDigit = divisor[b_l - 1];\r\n for (shift = a_l - b_l; shift >= 0; shift--) {\r\n quotientDigit = base - 1;\r\n if (remainder[shift + b_l] !== divisorMostSignificantDigit) {\r\n quotientDigit = Math.floor((remainder[shift + b_l] * base + remainder[shift + b_l - 1]) / divisorMostSignificantDigit);\r\n }\r\n // quotientDigit <= base - 1\r\n carry = 0;\r\n borrow = 0;\r\n l = divisor.length;\r\n for (i = 0; i < l; i++) {\r\n carry += quotientDigit * divisor[i];\r\n q = Math.floor(carry / base);\r\n borrow += remainder[shift + i] - (carry - q * base);\r\n carry = q;\r\n if (borrow < 0) {\r\n remainder[shift + i] = borrow + base;\r\n borrow = -1;\r\n } else {\r\n remainder[shift + i] = borrow;\r\n borrow = 0;\r\n }\r\n }\r\n while (borrow !== 0) {\r\n quotientDigit -= 1;\r\n carry = 0;\r\n for (i = 0; i < l; i++) {\r\n carry += remainder[shift + i] - base + divisor[i];\r\n if (carry < 0) {\r\n remainder[shift + i] = carry + base;\r\n carry = 0;\r\n } else {\r\n remainder[shift + i] = carry;\r\n carry = 1;\r\n }\r\n }\r\n borrow += carry;\r\n }\r\n result[shift] = quotientDigit;\r\n }\r\n // denormalization\r\n remainder = divModSmall(remainder, lambda)[0];\r\n return [arrayToSmall(result), arrayToSmall(remainder)];\r\n }\r\n\r\n function divMod2(a, b) { // Implementation idea shamelessly stolen from Silent Matt's library http://silentmatt.com/biginteger/\r\n // Performs faster than divMod1 on larger input sizes.\r\n var a_l = a.length,\r\n b_l = b.length,\r\n result = [],\r\n part = [],\r\n base = BASE,\r\n guess, xlen, highx, highy, check;\r\n while (a_l) {\r\n part.unshift(a[--a_l]);\r\n trim(part);\r\n if (compareAbs(part, b) < 0) {\r\n result.push(0);\r\n continue;\r\n }\r\n xlen = part.length;\r\n highx = part[xlen - 1] * base + part[xlen - 2];\r\n highy = b[b_l - 1] * base + b[b_l - 2];\r\n if (xlen > b_l) {\r\n highx = (highx + 1) * base;\r\n }\r\n guess = Math.ceil(highx / highy);\r\n do {\r\n check = multiplySmall(b, guess);\r\n if (compareAbs(check, part) <= 0) break;\r\n guess--;\r\n } while (guess);\r\n result.push(guess);\r\n part = subtract(part, check);\r\n }\r\n result.reverse();\r\n return [arrayToSmall(result), arrayToSmall(part)];\r\n }\r\n\r\n function divModSmall(value, lambda) {\r\n var length = value.length,\r\n quotient = createArray(length),\r\n base = BASE,\r\n i, q, remainder, divisor;\r\n remainder = 0;\r\n for (i = length - 1; i >= 0; --i) {\r\n divisor = remainder * base + value[i];\r\n q = truncate(divisor / lambda);\r\n remainder = divisor - q * lambda;\r\n quotient[i] = q | 0;\r\n }\r\n return [quotient, remainder | 0];\r\n }\r\n\r\n function divModAny(self, v) {\r\n var value, n = parseValue(v);\r\n if (supportsNativeBigInt) {\r\n return [new NativeBigInt(self.value / n.value), new NativeBigInt(self.value % n.value)];\r\n }\r\n var a = self.value, b = n.value;\r\n var quotient;\r\n if (b === 0) throw new Error(\"Cannot divide by zero\");\r\n if (self.isSmall) {\r\n if (n.isSmall) {\r\n return [new SmallInteger(truncate(a / b)), new SmallInteger(a % b)];\r\n }\r\n return [Integer[0], self];\r\n }\r\n if (n.isSmall) {\r\n if (b === 1) return [self, Integer[0]];\r\n if (b == -1) return [self.negate(), Integer[0]];\r\n var abs = Math.abs(b);\r\n if (abs < BASE) {\r\n value = divModSmall(a, abs);\r\n quotient = arrayToSmall(value[0]);\r\n var remainder = value[1];\r\n if (self.sign) remainder = -remainder;\r\n if (typeof quotient === \"number\") {\r\n if (self.sign !== n.sign) quotient = -quotient;\r\n return [new SmallInteger(quotient), new SmallInteger(remainder)];\r\n }\r\n return [new BigInteger(quotient, self.sign !== n.sign), new SmallInteger(remainder)];\r\n }\r\n b = smallToArray(abs);\r\n }\r\n var comparison = compareAbs(a, b);\r\n if (comparison === -1) return [Integer[0], self];\r\n if (comparison === 0) return [Integer[self.sign === n.sign ? 1 : -1], Integer[0]];\r\n\r\n // divMod1 is faster on smaller input sizes\r\n if (a.length + b.length <= 200)\r\n value = divMod1(a, b);\r\n else value = divMod2(a, b);\r\n\r\n quotient = value[0];\r\n var qSign = self.sign !== n.sign,\r\n mod = value[1],\r\n mSign = self.sign;\r\n if (typeof quotient === \"number\") {\r\n if (qSign) quotient = -quotient;\r\n quotient = new SmallInteger(quotient);\r\n } else quotient = new BigInteger(quotient, qSign);\r\n if (typeof mod === \"number\") {\r\n if (mSign) mod = -mod;\r\n mod = new SmallInteger(mod);\r\n } else mod = new BigInteger(mod, mSign);\r\n return [quotient, mod];\r\n }\r\n\r\n BigInteger.prototype.divmod = function (v) {\r\n var result = divModAny(this, v);\r\n return {\r\n quotient: result[0],\r\n remainder: result[1]\r\n };\r\n };\r\n NativeBigInt.prototype.divmod = SmallInteger.prototype.divmod = BigInteger.prototype.divmod;\r\n\r\n\r\n BigInteger.prototype.divide = function (v) {\r\n return divModAny(this, v)[0];\r\n };\r\n NativeBigInt.prototype.over = NativeBigInt.prototype.divide = function (v) {\r\n return new NativeBigInt(this.value / parseValue(v).value);\r\n };\r\n SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide;\r\n\r\n BigInteger.prototype.mod = function (v) {\r\n return divModAny(this, v)[1];\r\n };\r\n NativeBigInt.prototype.mod = NativeBigInt.prototype.remainder = function (v) {\r\n return new NativeBigInt(this.value % parseValue(v).value);\r\n };\r\n SmallInteger.prototype.remainder = SmallInteger.prototype.mod = BigInteger.prototype.remainder = BigInteger.prototype.mod;\r\n\r\n BigInteger.prototype.pow = function (v) {\r\n var n = parseValue(v),\r\n a = this.value,\r\n b = n.value,\r\n value, x, y;\r\n if (b === 0) return Integer[1];\r\n if (a === 0) return Integer[0];\r\n if (a === 1) return Integer[1];\r\n if (a === -1) return n.isEven() ? Integer[1] : Integer[-1];\r\n if (n.sign) {\r\n return Integer[0];\r\n }\r\n if (!n.isSmall) throw new Error(\"The exponent \" + n.toString() + \" is too large.\");\r\n if (this.isSmall) {\r\n if (isPrecise(value = Math.pow(a, b)))\r\n return new SmallInteger(truncate(value));\r\n }\r\n x = this;\r\n y = Integer[1];\r\n while (true) {\r\n if (b & 1 === 1) {\r\n y = y.times(x);\r\n --b;\r\n }\r\n if (b === 0) break;\r\n b /= 2;\r\n x = x.square();\r\n }\r\n return y;\r\n };\r\n SmallInteger.prototype.pow = BigInteger.prototype.pow;\r\n\r\n NativeBigInt.prototype.pow = function (v) {\r\n var n = parseValue(v);\r\n var a = this.value, b = n.value;\r\n var _0 = BigInt(0), _1 = BigInt(1), _2 = BigInt(2);\r\n if (b === _0) return Integer[1];\r\n if (a === _0) return Integer[0];\r\n if (a === _1) return Integer[1];\r\n if (a === BigInt(-1)) return n.isEven() ? Integer[1] : Integer[-1];\r\n if (n.isNegative()) return new NativeBigInt(_0);\r\n var x = this;\r\n var y = Integer[1];\r\n while (true) {\r\n if ((b & _1) === _1) {\r\n y = y.times(x);\r\n --b;\r\n }\r\n if (b === _0) break;\r\n b /= _2;\r\n x = x.square();\r\n }\r\n return y;\r\n }\r\n\r\n BigInteger.prototype.modPow = function (exp, mod) {\r\n exp = parseValue(exp);\r\n mod = parseValue(mod);\r\n if (mod.isZero()) throw new Error(\"Cannot take modPow with modulus 0\");\r\n var r = Integer[1],\r\n base = this.mod(mod);\r\n if (exp.isNegative()) {\r\n exp = exp.multiply(Integer[-1]);\r\n base = base.modInv(mod);\r\n }\r\n while (exp.isPositive()) {\r\n if (base.isZero()) return Integer[0];\r\n if (exp.isOdd()) r = r.multiply(base).mod(mod);\r\n exp = exp.divide(2);\r\n base = base.square().mod(mod);\r\n }\r\n return r;\r\n };\r\n NativeBigInt.prototype.modPow = SmallInteger.prototype.modPow = BigInteger.prototype.modPow;\r\n\r\n function compareAbs(a, b) {\r\n if (a.length !== b.length) {\r\n return a.length > b.length ? 1 : -1;\r\n }\r\n for (var i = a.length - 1; i >= 0; i--) {\r\n if (a[i] !== b[i]) return a[i] > b[i] ? 1 : -1;\r\n }\r\n return 0;\r\n }\r\n\r\n BigInteger.prototype.compareAbs = function (v) {\r\n var n = parseValue(v),\r\n a = this.value,\r\n b = n.value;\r\n if (n.isSmall) return 1;\r\n return compareAbs(a, b);\r\n };\r\n SmallInteger.prototype.compareAbs = function (v) {\r\n var n = parseValue(v),\r\n a = Math.abs(this.value),\r\n b = n.value;\r\n if (n.isSmall) {\r\n b = Math.abs(b);\r\n return a === b ? 0 : a > b ? 1 : -1;\r\n }\r\n return -1;\r\n };\r\n NativeBigInt.prototype.compareAbs = function (v) {\r\n var a = this.value;\r\n var b = parseValue(v).value;\r\n a = a >= 0 ? a : -a;\r\n b = b >= 0 ? b : -b;\r\n return a === b ? 0 : a > b ? 1 : -1;\r\n }\r\n\r\n BigInteger.prototype.compare = function (v) {\r\n // See discussion about comparison with Infinity:\r\n // https://github.com/peterolson/BigInteger.js/issues/61\r\n if (v === Infinity) {\r\n return -1;\r\n }\r\n if (v === -Infinity) {\r\n return 1;\r\n }\r\n\r\n var n = parseValue(v),\r\n a = this.value,\r\n b = n.value;\r\n if (this.sign !== n.sign) {\r\n return n.sign ? 1 : -1;\r\n }\r\n if (n.isSmall) {\r\n return this.sign ? -1 : 1;\r\n }\r\n return compareAbs(a, b) * (this.sign ? -1 : 1);\r\n };\r\n BigInteger.prototype.compareTo = BigInteger.prototype.compare;\r\n\r\n SmallInteger.prototype.compare = function (v) {\r\n if (v === Infinity) {\r\n return -1;\r\n }\r\n if (v === -Infinity) {\r\n return 1;\r\n }\r\n\r\n var n = parseValue(v),\r\n a = this.value,\r\n b = n.value;\r\n if (n.isSmall) {\r\n return a == b ? 0 : a > b ? 1 : -1;\r\n }\r\n if (a < 0 !== n.sign) {\r\n return a < 0 ? -1 : 1;\r\n }\r\n return a < 0 ? 1 : -1;\r\n };\r\n SmallInteger.prototype.compareTo = SmallInteger.prototype.compare;\r\n\r\n NativeBigInt.prototype.compare = function (v) {\r\n if (v === Infinity) {\r\n return -1;\r\n }\r\n if (v === -Infinity) {\r\n return 1;\r\n }\r\n var a = this.value;\r\n var b = parseValue(v).value;\r\n return a === b ? 0 : a > b ? 1 : -1;\r\n }\r\n NativeBigInt.prototype.compareTo = NativeBigInt.prototype.compare;\r\n\r\n BigInteger.prototype.equals = function (v) {\r\n return this.compare(v) === 0;\r\n };\r\n NativeBigInt.prototype.eq = NativeBigInt.prototype.equals = SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals;\r\n\r\n BigInteger.prototype.notEquals = function (v) {\r\n return this.compare(v) !== 0;\r\n };\r\n NativeBigInt.prototype.neq = NativeBigInt.prototype.notEquals = SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals;\r\n\r\n BigInteger.prototype.greater = function (v) {\r\n return this.compare(v) > 0;\r\n };\r\n NativeBigInt.prototype.gt = NativeBigInt.prototype.greater = SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater;\r\n\r\n BigInteger.prototype.lesser = function (v) {\r\n return this.compare(v) < 0;\r\n };\r\n NativeBigInt.prototype.lt = NativeBigInt.prototype.lesser = SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser;\r\n\r\n BigInteger.prototype.greaterOrEquals = function (v) {\r\n return this.compare(v) >= 0;\r\n };\r\n NativeBigInt.prototype.geq = NativeBigInt.prototype.greaterOrEquals = SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals;\r\n\r\n BigInteger.prototype.lesserOrEquals = function (v) {\r\n return this.compare(v) <= 0;\r\n };\r\n NativeBigInt.prototype.leq = NativeBigInt.prototype.lesserOrEquals = SmallInteger.prototype.leq = SmallInteger.prototype.lesserOrEquals = BigInteger.prototype.leq = BigInteger.prototype.lesserOrEquals;\r\n\r\n BigInteger.prototype.isEven = function () {\r\n return (this.value[0] & 1) === 0;\r\n };\r\n SmallInteger.prototype.isEven = function () {\r\n return (this.value & 1) === 0;\r\n };\r\n NativeBigInt.prototype.isEven = function () {\r\n return (this.value & BigInt(1)) === BigInt(0);\r\n }\r\n\r\n BigInteger.prototype.isOdd = function () {\r\n return (this.value[0] & 1) === 1;\r\n };\r\n SmallInteger.prototype.isOdd = function () {\r\n return (this.value & 1) === 1;\r\n };\r\n NativeBigInt.prototype.isOdd = function () {\r\n return (this.value & BigInt(1)) === BigInt(1);\r\n }\r\n\r\n BigInteger.prototype.isPositive = function () {\r\n return !this.sign;\r\n };\r\n SmallInteger.prototype.isPositive = function () {\r\n return this.value > 0;\r\n };\r\n NativeBigInt.prototype.isPositive = SmallInteger.prototype.isPositive;\r\n\r\n BigInteger.prototype.isNegative = function () {\r\n return this.sign;\r\n };\r\n SmallInteger.prototype.isNegative = function () {\r\n return this.value < 0;\r\n };\r\n NativeBigInt.prototype.isNegative = SmallInteger.prototype.isNegative;\r\n\r\n BigInteger.prototype.isUnit = function () {\r\n return false;\r\n };\r\n SmallInteger.prototype.isUnit = function () {\r\n return Math.abs(this.value) === 1;\r\n };\r\n NativeBigInt.prototype.isUnit = function () {\r\n return this.abs().value === BigInt(1);\r\n }\r\n\r\n BigInteger.prototype.isZero = function () {\r\n return false;\r\n };\r\n SmallInteger.prototype.isZero = function () {\r\n return this.value === 0;\r\n };\r\n NativeBigInt.prototype.isZero = function () {\r\n return this.value === BigInt(0);\r\n }\r\n\r\n BigInteger.prototype.isDivisibleBy = function (v) {\r\n var n = parseValue(v);\r\n if (n.isZero()) return false;\r\n if (n.isUnit()) return true;\r\n if (n.compareAbs(2) === 0) return this.isEven();\r\n return this.mod(n).isZero();\r\n };\r\n NativeBigInt.prototype.isDivisibleBy = SmallInteger.prototype.isDivisibleBy = BigInteger.prototype.isDivisibleBy;\r\n\r\n function isBasicPrime(v) {\r\n var n = v.abs();\r\n if (n.isUnit()) return false;\r\n if (n.equals(2) || n.equals(3) || n.equals(5)) return true;\r\n if (n.isEven() || n.isDivisibleBy(3) || n.isDivisibleBy(5)) return false;\r\n if (n.lesser(49)) return true;\r\n // we don't know if it's prime: let the other functions figure it out\r\n }\r\n\r\n function millerRabinTest(n, a) {\r\n var nPrev = n.prev(),\r\n b = nPrev,\r\n r = 0,\r\n d, t, i, x;\r\n while (b.isEven()) b = b.divide(2), r++;\r\n next: for (i = 0; i < a.length; i++) {\r\n if (n.lesser(a[i])) continue;\r\n x = bigInt(a[i]).modPow(b, n);\r\n if (x.isUnit() || x.equals(nPrev)) continue;\r\n for (d = r - 1; d != 0; d--) {\r\n x = x.square().mod(n);\r\n if (x.isUnit()) return false;\r\n if (x.equals(nPrev)) continue next;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n // Set \"strict\" to true to force GRH-supported lower bound of 2*log(N)^2\r\n BigInteger.prototype.isPrime = function (strict) {\r\n var isPrime = isBasicPrime(this);\r\n if (isPrime !== undefined) return isPrime;\r\n var n = this.abs();\r\n var bits = n.bitLength();\r\n if (bits <= 64)\r\n return millerRabinTest(n, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]);\r\n var logN = Math.log(2) * bits.toJSNumber();\r\n var t = Math.ceil((strict === true) ? (2 * Math.pow(logN, 2)) : logN);\r\n for (var a = [], i = 0; i < t; i++) {\r\n a.push(bigInt(i + 2));\r\n }\r\n return millerRabinTest(n, a);\r\n };\r\n NativeBigInt.prototype.isPrime = SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime;\r\n\r\n BigInteger.prototype.isProbablePrime = function (iterations, rng) {\r\n var isPrime = isBasicPrime(this);\r\n if (isPrime !== undefined) return isPrime;\r\n var n = this.abs();\r\n var t = iterations === undefined ? 5 : iterations;\r\n for (var a = [], i = 0; i < t; i++) {\r\n a.push(bigInt.randBetween(2, n.minus(2), rng));\r\n }\r\n return millerRabinTest(n, a);\r\n };\r\n NativeBigInt.prototype.isProbablePrime = SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime;\r\n\r\n BigInteger.prototype.modInv = function (n) {\r\n var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR;\r\n while (!newR.isZero()) {\r\n q = r.divide(newR);\r\n lastT = t;\r\n lastR = r;\r\n t = newT;\r\n r = newR;\r\n newT = lastT.subtract(q.multiply(newT));\r\n newR = lastR.subtract(q.multiply(newR));\r\n }\r\n if (!r.isUnit()) throw new Error(this.toString() + \" and \" + n.toString() + \" are not co-prime\");\r\n if (t.compare(0) === -1) {\r\n t = t.add(n);\r\n }\r\n if (this.isNegative()) {\r\n return t.negate();\r\n }\r\n return t;\r\n };\r\n\r\n NativeBigInt.prototype.modInv = SmallInteger.prototype.modInv = BigInteger.prototype.modInv;\r\n\r\n BigInteger.prototype.next = function () {\r\n var value = this.value;\r\n if (this.sign) {\r\n return subtractSmall(value, 1, this.sign);\r\n }\r\n return new BigInteger(addSmall(value, 1), this.sign);\r\n };\r\n SmallInteger.prototype.next = function () {\r\n var value = this.value;\r\n if (value + 1 < MAX_INT) return new SmallInteger(value + 1);\r\n return new BigInteger(MAX_INT_ARR, false);\r\n };\r\n NativeBigInt.prototype.next = function () {\r\n return new NativeBigInt(this.value + BigInt(1));\r\n }\r\n\r\n BigInteger.prototype.prev = function () {\r\n var value = this.value;\r\n if (this.sign) {\r\n return new BigInteger(addSmall(value, 1), true);\r\n }\r\n return subtractSmall(value, 1, this.sign);\r\n };\r\n SmallInteger.prototype.prev = function () {\r\n var value = this.value;\r\n if (value - 1 > -MAX_INT) return new SmallInteger(value - 1);\r\n return new BigInteger(MAX_INT_ARR, true);\r\n };\r\n NativeBigInt.prototype.prev = function () {\r\n return new NativeBigInt(this.value - BigInt(1));\r\n }\r\n\r\n var powersOfTwo = [1];\r\n while (2 * powersOfTwo[powersOfTwo.length - 1] <= BASE) powersOfTwo.push(2 * powersOfTwo[powersOfTwo.length - 1]);\r\n var powers2Length = powersOfTwo.length, highestPower2 = powersOfTwo[powers2Length - 1];\r\n\r\n function shift_isSmall(n) {\r\n return Math.abs(n) <= BASE;\r\n }\r\n\r\n BigInteger.prototype.shiftLeft = function (v) {\r\n var n = parseValue(v).toJSNumber();\r\n if (!shift_isSmall(n)) {\r\n throw new Error(String(n) + \" is too large for shifting.\");\r\n }\r\n if (n < 0) return this.shiftRight(-n);\r\n var result = this;\r\n if (result.isZero()) return result;\r\n while (n >= powers2Length) {\r\n result = result.multiply(highestPower2);\r\n n -= powers2Length - 1;\r\n }\r\n return result.multiply(powersOfTwo[n]);\r\n };\r\n NativeBigInt.prototype.shiftLeft = SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft;\r\n\r\n BigInteger.prototype.shiftRight = function (v) {\r\n var remQuo;\r\n var n = parseValue(v).toJSNumber();\r\n if (!shift_isSmall(n)) {\r\n throw new Error(String(n) + \" is too large for shifting.\");\r\n }\r\n if (n < 0) return this.shiftLeft(-n);\r\n var result = this;\r\n while (n >= powers2Length) {\r\n if (result.isZero() || (result.isNegative() && result.isUnit())) return result;\r\n remQuo = divModAny(result, highestPower2);\r\n result = remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0];\r\n n -= powers2Length - 1;\r\n }\r\n remQuo = divModAny(result, powersOfTwo[n]);\r\n return remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0];\r\n };\r\n NativeBigInt.prototype.shiftRight = SmallInteger.prototype.shiftRight = BigInteger.prototype.shiftRight;\r\n\r\n function bitwise(x, y, fn) {\r\n y = parseValue(y);\r\n var xSign = x.isNegative(), ySign = y.isNegative();\r\n var xRem = xSign ? x.not() : x,\r\n yRem = ySign ? y.not() : y;\r\n var xDigit = 0, yDigit = 0;\r\n var xDivMod = null, yDivMod = null;\r\n var result = [];\r\n while (!xRem.isZero() || !yRem.isZero()) {\r\n xDivMod = divModAny(xRem, highestPower2);\r\n xDigit = xDivMod[1].toJSNumber();\r\n if (xSign) {\r\n xDigit = highestPower2 - 1 - xDigit; // two's complement for negative numbers\r\n }\r\n\r\n yDivMod = divModAny(yRem, highestPower2);\r\n yDigit = yDivMod[1].toJSNumber();\r\n if (ySign) {\r\n yDigit = highestPower2 - 1 - yDigit; // two's complement for negative numbers\r\n }\r\n\r\n xRem = xDivMod[0];\r\n yRem = yDivMod[0];\r\n result.push(fn(xDigit, yDigit));\r\n }\r\n var sum = fn(xSign ? 1 : 0, ySign ? 1 : 0) !== 0 ? bigInt(-1) : bigInt(0);\r\n for (var i = result.length - 1; i >= 0; i -= 1) {\r\n sum = sum.multiply(highestPower2).add(bigInt(result[i]));\r\n }\r\n return sum;\r\n }\r\n\r\n BigInteger.prototype.not = function () {\r\n return this.negate().prev();\r\n };\r\n NativeBigInt.prototype.not = SmallInteger.prototype.not = BigInteger.prototype.not;\r\n\r\n BigInteger.prototype.and = function (n) {\r\n return bitwise(this, n, function (a, b) { return a & b; });\r\n };\r\n NativeBigInt.prototype.and = SmallInteger.prototype.and = BigInteger.prototype.and;\r\n\r\n BigInteger.prototype.or = function (n) {\r\n return bitwise(this, n, function (a, b) { return a | b; });\r\n };\r\n NativeBigInt.prototype.or = SmallInteger.prototype.or = BigInteger.prototype.or;\r\n\r\n BigInteger.prototype.xor = function (n) {\r\n return bitwise(this, n, function (a, b) { return a ^ b; });\r\n };\r\n NativeBigInt.prototype.xor = SmallInteger.prototype.xor = BigInteger.prototype.xor;\r\n\r\n var LOBMASK_I = 1 << 30, LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I;\r\n function roughLOB(n) { // get lowestOneBit (rough)\r\n // SmallInteger: return Min(lowestOneBit(n), 1 << 30)\r\n // BigInteger: return Min(lowestOneBit(n), 1 << 14) [BASE=1e7]\r\n var v = n.value,\r\n x = typeof v === \"number\" ? v | LOBMASK_I :\r\n typeof v === \"bigint\" ? v | BigInt(LOBMASK_I) :\r\n v[0] + v[1] * BASE | LOBMASK_BI;\r\n return x & -x;\r\n }\r\n\r\n function integerLogarithm(value, base) {\r\n if (base.compareTo(value) <= 0) {\r\n var tmp = integerLogarithm(value, base.square(base));\r\n var p = tmp.p;\r\n var e = tmp.e;\r\n var t = p.multiply(base);\r\n return t.compareTo(value) <= 0 ? { p: t, e: e * 2 + 1 } : { p: p, e: e * 2 };\r\n }\r\n return { p: bigInt(1), e: 0 };\r\n }\r\n\r\n BigInteger.prototype.bitLength = function () {\r\n var n = this;\r\n if (n.compareTo(bigInt(0)) < 0) {\r\n n = n.negate().subtract(bigInt(1));\r\n }\r\n if (n.compareTo(bigInt(0)) === 0) {\r\n return bigInt(0);\r\n }\r\n return bigInt(integerLogarithm(n, bigInt(2)).e).add(bigInt(1));\r\n }\r\n NativeBigInt.prototype.bitLength = SmallInteger.prototype.bitLength = BigInteger.prototype.bitLength;\r\n\r\n function max(a, b) {\r\n a = parseValue(a);\r\n b = parseValue(b);\r\n return a.greater(b) ? a : b;\r\n }\r\n function min(a, b) {\r\n a = parseValue(a);\r\n b = parseValue(b);\r\n return a.lesser(b) ? a : b;\r\n }\r\n function gcd(a, b) {\r\n a = parseValue(a).abs();\r\n b = parseValue(b).abs();\r\n if (a.equals(b)) return a;\r\n if (a.isZero()) return b;\r\n if (b.isZero()) return a;\r\n var c = Integer[1], d, t;\r\n while (a.isEven() && b.isEven()) {\r\n d = min(roughLOB(a), roughLOB(b));\r\n a = a.divide(d);\r\n b = b.divide(d);\r\n c = c.multiply(d);\r\n }\r\n while (a.isEven()) {\r\n a = a.divide(roughLOB(a));\r\n }\r\n do {\r\n while (b.isEven()) {\r\n b = b.divide(roughLOB(b));\r\n }\r\n if (a.greater(b)) {\r\n t = b; b = a; a = t;\r\n }\r\n b = b.subtract(a);\r\n } while (!b.isZero());\r\n return c.isUnit() ? a : a.multiply(c);\r\n }\r\n function lcm(a, b) {\r\n a = parseValue(a).abs();\r\n b = parseValue(b).abs();\r\n return a.divide(gcd(a, b)).multiply(b);\r\n }\r\n function randBetween(a, b, rng) {\r\n a = parseValue(a);\r\n b = parseValue(b);\r\n var usedRNG = rng || Math.random;\r\n var low = min(a, b), high = max(a, b);\r\n var range = high.subtract(low).add(1);\r\n if (range.isSmall) return low.add(Math.floor(usedRNG() * range));\r\n var digits = toBase(range, BASE).value;\r\n var result = [], restricted = true;\r\n for (var i = 0; i < digits.length; i++) {\r\n var top = restricted ? digits[i] + (i + 1 < digits.length ? digits[i + 1] / BASE : 0) : BASE;\r\n var digit = truncate(usedRNG() * top);\r\n result.push(digit);\r\n if (digit < digits[i]) restricted = false;\r\n }\r\n return low.add(Integer.fromArray(result, BASE, false));\r\n }\r\n\r\n var parseBase = function (text, base, alphabet, caseSensitive) {\r\n alphabet = alphabet || DEFAULT_ALPHABET;\r\n text = String(text);\r\n if (!caseSensitive) {\r\n text = text.toLowerCase();\r\n alphabet = alphabet.toLowerCase();\r\n }\r\n var length = text.length;\r\n var i;\r\n var absBase = Math.abs(base);\r\n var alphabetValues = {};\r\n for (i = 0; i < alphabet.length; i++) {\r\n alphabetValues[alphabet[i]] = i;\r\n }\r\n for (i = 0; i < length; i++) {\r\n var c = text[i];\r\n if (c === \"-\") continue;\r\n if (c in alphabetValues) {\r\n if (alphabetValues[c] >= absBase) {\r\n if (c === \"1\" && absBase === 1) continue;\r\n throw new Error(c + \" is not a valid digit in base \" + base + \".\");\r\n }\r\n }\r\n }\r\n base = parseValue(base);\r\n var digits = [];\r\n var isNegative = text[0] === \"-\";\r\n for (i = isNegative ? 1 : 0; i < text.length; i++) {\r\n var c = text[i];\r\n if (c in alphabetValues) digits.push(parseValue(alphabetValues[c]));\r\n else if (c === \"<\") {\r\n var start = i;\r\n do { i++; } while (text[i] !== \">\" && i < text.length);\r\n digits.push(parseValue(text.slice(start + 1, i)));\r\n }\r\n else throw new Error(c + \" is not a valid character\");\r\n }\r\n return parseBaseFromArray(digits, base, isNegative);\r\n };\r\n\r\n function parseBaseFromArray(digits, base, isNegative) {\r\n var val = Integer[0], pow = Integer[1], i;\r\n for (i = digits.length - 1; i >= 0; i--) {\r\n val = val.add(digits[i].times(pow));\r\n pow = pow.times(base);\r\n }\r\n return isNegative ? val.negate() : val;\r\n }\r\n\r\n function stringify(digit, alphabet) {\r\n alphabet = alphabet || DEFAULT_ALPHABET;\r\n if (digit < alphabet.length) {\r\n return alphabet[digit];\r\n }\r\n return \"<\" + digit + \">\";\r\n }\r\n\r\n function toBase(n, base) {\r\n base = bigInt(base);\r\n if (base.isZero()) {\r\n if (n.isZero()) return { value: [0], isNegative: false };\r\n throw new Error(\"Cannot convert nonzero numbers to base 0.\");\r\n }\r\n if (base.equals(-1)) {\r\n if (n.isZero()) return { value: [0], isNegative: false };\r\n if (n.isNegative())\r\n return {\r\n value: [].concat.apply([], Array.apply(null, Array(-n.toJSNumber()))\r\n .map(Array.prototype.valueOf, [1, 0])\r\n ),\r\n isNegative: false\r\n };\r\n\r\n var arr = Array.apply(null, Array(n.toJSNumber() - 1))\r\n .map(Array.prototype.valueOf, [0, 1]);\r\n arr.unshift([1]);\r\n return {\r\n value: [].concat.apply([], arr),\r\n isNegative: false\r\n };\r\n }\r\n\r\n var neg = false;\r\n if (n.isNegative() && base.isPositive()) {\r\n neg = true;\r\n n = n.abs();\r\n }\r\n if (base.isUnit()) {\r\n if (n.isZero()) return { value: [0], isNegative: false };\r\n\r\n return {\r\n value: Array.apply(null, Array(n.toJSNumber()))\r\n .map(Number.prototype.valueOf, 1),\r\n isNegative: neg\r\n };\r\n }\r\n var out = [];\r\n var left = n, divmod;\r\n while (left.isNegative() || left.compareAbs(base) >= 0) {\r\n divmod = left.divmod(base);\r\n left = divmod.quotient;\r\n var digit = divmod.remainder;\r\n if (digit.isNegative()) {\r\n digit = base.minus(digit).abs();\r\n left = left.next();\r\n }\r\n out.push(digit.toJSNumber());\r\n }\r\n out.push(left.toJSNumber());\r\n return { value: out.reverse(), isNegative: neg };\r\n }\r\n\r\n function toBaseString(n, base, alphabet) {\r\n var arr = toBase(n, base);\r\n return (arr.isNegative ? \"-\" : \"\") + arr.value.map(function (x) {\r\n return stringify(x, alphabet);\r\n }).join('');\r\n }\r\n\r\n BigInteger.prototype.toArray = function (radix) {\r\n return toBase(this, radix);\r\n };\r\n\r\n SmallInteger.prototype.toArray = function (radix) {\r\n return toBase(this, radix);\r\n };\r\n\r\n NativeBigInt.prototype.toArray = function (radix) {\r\n return toBase(this, radix);\r\n };\r\n\r\n BigInteger.prototype.toString = function (radix, alphabet) {\r\n if (radix === undefined) radix = 10;\r\n if (radix !== 10) return toBaseString(this, radix, alphabet);\r\n var v = this.value, l = v.length, str = String(v[--l]), zeros = \"0000000\", digit;\r\n while (--l >= 0) {\r\n digit = String(v[l]);\r\n str += zeros.slice(digit.length) + digit;\r\n }\r\n var sign = this.sign ? \"-\" : \"\";\r\n return sign + str;\r\n };\r\n\r\n SmallInteger.prototype.toString = function (radix, alphabet) {\r\n if (radix === undefined) radix = 10;\r\n if (radix != 10) return toBaseString(this, radix, alphabet);\r\n return String(this.value);\r\n };\r\n\r\n NativeBigInt.prototype.toString = SmallInteger.prototype.toString;\r\n\r\n NativeBigInt.prototype.toJSON = BigInteger.prototype.toJSON = SmallInteger.prototype.toJSON = function () { return this.toString(); }\r\n\r\n BigInteger.prototype.valueOf = function () {\r\n return parseInt(this.toString(), 10);\r\n };\r\n BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf;\r\n\r\n SmallInteger.prototype.valueOf = function () {\r\n return this.value;\r\n };\r\n SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf;\r\n NativeBigInt.prototype.valueOf = NativeBigInt.prototype.toJSNumber = function () {\r\n return parseInt(this.toString(), 10);\r\n }\r\n\r\n function parseStringValue(v) {\r\n if (isPrecise(+v)) {\r\n var x = +v;\r\n if (x === truncate(x))\r\n return supportsNativeBigInt ? new NativeBigInt(BigInt(x)) : new SmallInteger(x);\r\n throw new Error(\"Invalid integer: \" + v);\r\n }\r\n var sign = v[0] === \"-\";\r\n if (sign) v = v.slice(1);\r\n var split = v.split(/e/i);\r\n if (split.length > 2) throw new Error(\"Invalid integer: \" + split.join(\"e\"));\r\n if (split.length === 2) {\r\n var exp = split[1];\r\n if (exp[0] === \"+\") exp = exp.slice(1);\r\n exp = +exp;\r\n if (exp !== truncate(exp) || !isPrecise(exp)) throw new Error(\"Invalid integer: \" + exp + \" is not a valid exponent.\");\r\n var text = split[0];\r\n var decimalPlace = text.indexOf(\".\");\r\n if (decimalPlace >= 0) {\r\n exp -= text.length - decimalPlace - 1;\r\n text = text.slice(0, decimalPlace) + text.slice(decimalPlace + 1);\r\n }\r\n if (exp < 0) throw new Error(\"Cannot include negative exponent part for integers\");\r\n text += (new Array(exp + 1)).join(\"0\");\r\n v = text;\r\n }\r\n var isValid = /^([0-9][0-9]*)$/.test(v);\r\n if (!isValid) throw new Error(\"Invalid integer: \" + v);\r\n if (supportsNativeBigInt) {\r\n return new NativeBigInt(BigInt(sign ? \"-\" + v : v));\r\n }\r\n var r = [], max = v.length, l = LOG_BASE, min = max - l;\r\n while (max > 0) {\r\n r.push(+v.slice(min, max));\r\n min -= l;\r\n if (min < 0) min = 0;\r\n max -= l;\r\n }\r\n trim(r);\r\n return new BigInteger(r, sign);\r\n }\r\n\r\n function parseNumberValue(v) {\r\n if (supportsNativeBigInt) {\r\n return new NativeBigInt(BigInt(v));\r\n }\r\n if (isPrecise(v)) {\r\n if (v !== truncate(v)) throw new Error(v + \" is not an integer.\");\r\n return new SmallInteger(v);\r\n }\r\n return parseStringValue(v.toString());\r\n }\r\n\r\n function parseValue(v) {\r\n if (typeof v === \"number\") {\r\n return parseNumberValue(v);\r\n }\r\n if (typeof v === \"string\") {\r\n return parseStringValue(v);\r\n }\r\n if (typeof v === \"bigint\") {\r\n return new NativeBigInt(v);\r\n }\r\n return v;\r\n }\r\n // Pre-define numbers in range [-999,999]\r\n for (var i = 0; i < 1000; i++) {\r\n Integer[i] = parseValue(i);\r\n if (i > 0) Integer[-i] = parseValue(-i);\r\n }\r\n // Backwards compatibility\r\n Integer.one = Integer[1];\r\n Integer.zero = Integer[0];\r\n Integer.minusOne = Integer[-1];\r\n Integer.max = max;\r\n Integer.min = min;\r\n Integer.gcd = gcd;\r\n Integer.lcm = lcm;\r\n Integer.isInstance = function (x) { return x instanceof BigInteger || x instanceof SmallInteger || x instanceof NativeBigInt; };\r\n Integer.randBetween = randBetween;\r\n\r\n Integer.fromArray = function (digits, base, isNegative) {\r\n return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative);\r\n };\r\n\r\n return Integer;\r\n})();\r\n\r\n// Node.js check\r\nif (typeof module !== \"undefined\" && module.hasOwnProperty(\"exports\")) {\r\n module.exports = bigInt;\r\n}\r\n\r\n//amd check\r\nif (typeof define === \"function\" && define.amd) {\r\n define( function () {\r\n return bigInt;\r\n });\r\n}\r\n", ";(function (globalObject) {\r\n 'use strict';\r\n\r\n/*\r\n * bignumber.js v9.0.2\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2021 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\n var BigNumber,\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',\r\n alphabetHasNormalDecimalDigits = true;\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10 && alphabetHasNormalDecimalDigits) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, P.lt);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, P.gt);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n function maxOrMin(args, method) {\r\n var n,\r\n i = 1,\r\n m = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n n = new BigNumber(args[i]);\r\n\r\n // If any number is NaN, return NaN.\r\n if (!n.s) {\r\n m = n;\r\n break;\r\n } else if (method.call(m, n)) {\r\n m = n;\r\n }\r\n }\r\n\r\n return m;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = n / pows10[d - j - 1] % 10 | 0;\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) t = yc, yc = xc, xc = t, b = a;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) i = g1, g1 = g2, g2 = i, len -= i;\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10 && alphabetHasNormalDecimalDigits) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n // These functions don't need access to variables,\r\n // e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\n function intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n }\r\n\r\n\r\n // Assumes finite n.\r\n function isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n }\r\n\r\n\r\n function toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n }\r\n\r\n\r\n function toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = clone();\r\n BigNumber['default'] = BigNumber.BigNumber = BigNumber;\r\n\r\n // AMD.\r\n if (typeof define == 'function' && define.amd) {\r\n define(function () { return BigNumber; });\r\n\r\n // Node.js and other environments that support module.exports.\r\n } else if (typeof module != 'undefined' && module.exports) {\r\n module.exports = BigNumber;\r\n\r\n // Browser.\r\n } else {\r\n if (!globalObject) {\r\n globalObject = typeof self != 'undefined' && self ? self : window;\r\n }\r\n\r\n globalObject.BigNumber = BigNumber;\r\n }\r\n})(this);\r\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto = require(\"./crypto\");\nconst bs58check = require('bs58check');\nconst ecc = require('tiny-secp256k1');\nconst typeforce = require('typeforce');\nconst wif = require('wif');\nconst UINT256_TYPE = typeforce.BufferN(32);\nconst NETWORK_TYPE = typeforce.compile({\n wif: typeforce.UInt8,\n bip32: {\n public: typeforce.UInt32,\n private: typeforce.UInt32,\n },\n});\nconst BITCOIN = {\n messagePrefix: '\\x18Bitcoin Signed Message:\\n',\n bech32: 'bc',\n bip32: {\n public: 0x0488b21e,\n private: 0x0488ade4,\n },\n pubKeyHash: 0x00,\n scriptHash: 0x05,\n wif: 0x80,\n};\nconst HIGHEST_BIT = 0x80000000;\nconst UINT31_MAX = Math.pow(2, 31) - 1;\nfunction BIP32Path(value) {\n return (typeforce.String(value) && value.match(/^(m\\/)?(\\d+'?\\/)*\\d+'?$/) !== null);\n}\nfunction UInt31(value) {\n return typeforce.UInt32(value) && value <= UINT31_MAX;\n}\nclass BIP32 {\n constructor(__D, __Q, chainCode, network, __DEPTH = 0, __INDEX = 0, __PARENT_FINGERPRINT = 0x00000000) {\n this.__D = __D;\n this.__Q = __Q;\n this.chainCode = chainCode;\n this.network = network;\n this.__DEPTH = __DEPTH;\n this.__INDEX = __INDEX;\n this.__PARENT_FINGERPRINT = __PARENT_FINGERPRINT;\n typeforce(NETWORK_TYPE, network);\n this.lowR = false;\n }\n get depth() {\n return this.__DEPTH;\n }\n get index() {\n return this.__INDEX;\n }\n get parentFingerprint() {\n return this.__PARENT_FINGERPRINT;\n }\n get publicKey() {\n if (this.__Q === undefined)\n this.__Q = ecc.pointFromScalar(this.__D, true);\n return this.__Q;\n }\n get privateKey() {\n return this.__D;\n }\n get identifier() {\n return crypto.hash160(this.publicKey);\n }\n get fingerprint() {\n return this.identifier.slice(0, 4);\n }\n get compressed() {\n return true;\n }\n // Private === not neutered\n // Public === neutered\n isNeutered() {\n return this.__D === undefined;\n }\n neutered() {\n return fromPublicKeyLocal(this.publicKey, this.chainCode, this.network, this.depth, this.index, this.parentFingerprint);\n }\n toBase58() {\n const network = this.network;\n const version = !this.isNeutered()\n ? network.bip32.private\n : network.bip32.public;\n const buffer = Buffer.allocUnsafe(78);\n // 4 bytes: version bytes\n buffer.writeUInt32BE(version, 0);\n // 1 byte: depth: 0x00 for master nodes, 0x01 for level-1 descendants, ....\n buffer.writeUInt8(this.depth, 4);\n // 4 bytes: the fingerprint of the parent's key (0x00000000 if master key)\n buffer.writeUInt32BE(this.parentFingerprint, 5);\n // 4 bytes: child number. This is the number i in xi = xpar/i, with xi the key being serialized.\n // This is encoded in big endian. (0x00000000 if master key)\n buffer.writeUInt32BE(this.index, 9);\n // 32 bytes: the chain code\n this.chainCode.copy(buffer, 13);\n // 33 bytes: the public key or private key data\n if (!this.isNeutered()) {\n // 0x00 + k for private keys\n buffer.writeUInt8(0, 45);\n this.privateKey.copy(buffer, 46);\n // 33 bytes: the public key\n }\n else {\n // X9.62 encoding for public keys\n this.publicKey.copy(buffer, 45);\n }\n return bs58check.encode(buffer);\n }\n toWIF() {\n if (!this.privateKey)\n throw new TypeError('Missing private key');\n return wif.encode(this.network.wif, this.privateKey, true);\n }\n // https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#child-key-derivation-ckd-functions\n derive(index) {\n typeforce(typeforce.UInt32, index);\n const isHardened = index >= HIGHEST_BIT;\n const data = Buffer.allocUnsafe(37);\n // Hardened child\n if (isHardened) {\n if (this.isNeutered())\n throw new TypeError('Missing private key for hardened child key');\n // data = 0x00 || ser256(kpar) || ser32(index)\n data[0] = 0x00;\n this.privateKey.copy(data, 1);\n data.writeUInt32BE(index, 33);\n // Normal child\n }\n else {\n // data = serP(point(kpar)) || ser32(index)\n // = serP(Kpar) || ser32(index)\n this.publicKey.copy(data, 0);\n data.writeUInt32BE(index, 33);\n }\n const I = crypto.hmacSHA512(this.chainCode, data);\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n // if parse256(IL) >= n, proceed with the next value for i\n if (!ecc.isPrivate(IL))\n return this.derive(index + 1);\n // Private parent key -> private child key\n let hd;\n if (!this.isNeutered()) {\n // ki = parse256(IL) + kpar (mod n)\n const ki = ecc.privateAdd(this.privateKey, IL);\n // In case ki == 0, proceed with the next value for i\n if (ki == null)\n return this.derive(index + 1);\n hd = fromPrivateKeyLocal(ki, IR, this.network, this.depth + 1, index, this.fingerprint.readUInt32BE(0));\n // Public parent key -> public child key\n }\n else {\n // Ki = point(parse256(IL)) + Kpar\n // = G*IL + Kpar\n const Ki = ecc.pointAddScalar(this.publicKey, IL, true);\n // In case Ki is the point at infinity, proceed with the next value for i\n if (Ki === null)\n return this.derive(index + 1);\n hd = fromPublicKeyLocal(Ki, IR, this.network, this.depth + 1, index, this.fingerprint.readUInt32BE(0));\n }\n return hd;\n }\n deriveHardened(index) {\n typeforce(UInt31, index);\n // Only derives hardened private keys by default\n return this.derive(index + HIGHEST_BIT);\n }\n derivePath(path) {\n typeforce(BIP32Path, path);\n let splitPath = path.split('/');\n if (splitPath[0] === 'm') {\n if (this.parentFingerprint)\n throw new TypeError('Expected master, got child');\n splitPath = splitPath.slice(1);\n }\n return splitPath.reduce((prevHd, indexStr) => {\n let index;\n if (indexStr.slice(-1) === `'`) {\n index = parseInt(indexStr.slice(0, -1), 10);\n return prevHd.deriveHardened(index);\n }\n else {\n index = parseInt(indexStr, 10);\n return prevHd.derive(index);\n }\n }, this);\n }\n sign(hash, lowR) {\n if (!this.privateKey)\n throw new Error('Missing private key');\n if (lowR === undefined)\n lowR = this.lowR;\n if (lowR === false) {\n return ecc.sign(hash, this.privateKey);\n }\n else {\n let sig = ecc.sign(hash, this.privateKey);\n const extraData = Buffer.alloc(32, 0);\n let counter = 0;\n // if first try is lowR, skip the loop\n // for second try and on, add extra entropy counting up\n while (sig[0] > 0x7f) {\n counter++;\n extraData.writeUIntLE(counter, 0, 6);\n sig = ecc.signWithEntropy(hash, this.privateKey, extraData);\n }\n return sig;\n }\n }\n verify(hash, signature) {\n return ecc.verify(hash, this.publicKey, signature);\n }\n}\nfunction fromBase58(inString, network) {\n const buffer = bs58check.decode(inString);\n if (buffer.length !== 78)\n throw new TypeError('Invalid buffer length');\n network = network || BITCOIN;\n // 4 bytes: version bytes\n const version = buffer.readUInt32BE(0);\n if (version !== network.bip32.private && version !== network.bip32.public)\n throw new TypeError('Invalid network version');\n // 1 byte: depth: 0x00 for master nodes, 0x01 for level-1 descendants, ...\n const depth = buffer[4];\n // 4 bytes: the fingerprint of the parent's key (0x00000000 if master key)\n const parentFingerprint = buffer.readUInt32BE(5);\n if (depth === 0) {\n if (parentFingerprint !== 0x00000000)\n throw new TypeError('Invalid parent fingerprint');\n }\n // 4 bytes: child number. This is the number i in xi = xpar/i, with xi the key being serialized.\n // This is encoded in MSB order. (0x00000000 if master key)\n const index = buffer.readUInt32BE(9);\n if (depth === 0 && index !== 0)\n throw new TypeError('Invalid index');\n // 32 bytes: the chain code\n const chainCode = buffer.slice(13, 45);\n let hd;\n // 33 bytes: private key data (0x00 + k)\n if (version === network.bip32.private) {\n if (buffer.readUInt8(45) !== 0x00)\n throw new TypeError('Invalid private key');\n const k = buffer.slice(46, 78);\n hd = fromPrivateKeyLocal(k, chainCode, network, depth, index, parentFingerprint);\n // 33 bytes: public key data (0x02 + X or 0x03 + X)\n }\n else {\n const X = buffer.slice(45, 78);\n hd = fromPublicKeyLocal(X, chainCode, network, depth, index, parentFingerprint);\n }\n return hd;\n}\nexports.fromBase58 = fromBase58;\nfunction fromPrivateKey(privateKey, chainCode, network) {\n return fromPrivateKeyLocal(privateKey, chainCode, network);\n}\nexports.fromPrivateKey = fromPrivateKey;\nfunction fromPrivateKeyLocal(privateKey, chainCode, network, depth, index, parentFingerprint) {\n typeforce({\n privateKey: UINT256_TYPE,\n chainCode: UINT256_TYPE,\n }, { privateKey, chainCode });\n network = network || BITCOIN;\n if (!ecc.isPrivate(privateKey))\n throw new TypeError('Private key not in range [1, n)');\n return new BIP32(privateKey, undefined, chainCode, network, depth, index, parentFingerprint);\n}\nfunction fromPublicKey(publicKey, chainCode, network) {\n return fromPublicKeyLocal(publicKey, chainCode, network);\n}\nexports.fromPublicKey = fromPublicKey;\nfunction fromPublicKeyLocal(publicKey, chainCode, network, depth, index, parentFingerprint) {\n typeforce({\n publicKey: typeforce.BufferN(33),\n chainCode: UINT256_TYPE,\n }, { publicKey, chainCode });\n network = network || BITCOIN;\n // verify the X coordinate is a point on the curve\n if (!ecc.isPoint(publicKey))\n throw new TypeError('Point is not on the curve');\n return new BIP32(undefined, publicKey, chainCode, network, depth, index, parentFingerprint);\n}\nfunction fromSeed(seed, network) {\n typeforce(typeforce.Buffer, seed);\n if (seed.length < 16)\n throw new TypeError('Seed should be at least 128 bits');\n if (seed.length > 64)\n throw new TypeError('Seed should be at most 512 bits');\n network = network || BITCOIN;\n const I = crypto.hmacSHA512(Buffer.from('Bitcoin seed', 'utf8'), seed);\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n return fromPrivateKey(IL, IR, network);\n}\nexports.fromSeed = fromSeed;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst createHash = require('create-hash');\nconst createHmac = require('create-hmac');\nfunction hash160(buffer) {\n const sha256Hash = createHash('sha256')\n .update(buffer)\n .digest();\n try {\n return createHash('rmd160')\n .update(sha256Hash)\n .digest();\n }\n catch (err) {\n return createHash('ripemd160')\n .update(sha256Hash)\n .digest();\n }\n}\nexports.hash160 = hash160;\nfunction hmacSHA512(key, data) {\n return createHmac('sha512', key)\n .update(data)\n .digest();\n}\nexports.hmacSHA512 = hmacSHA512;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar bip32_1 = require(\"./bip32\");\nexports.fromSeed = bip32_1.fromSeed;\nexports.fromBase58 = bip32_1.fromBase58;\nexports.fromPublicKey = bip32_1.fromPublicKey;\nexports.fromPrivateKey = bip32_1.fromPrivateKey;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// browserify by default only pulls in files that are hard coded in requires\n// In order of last to first in this file, the default wordlist will be chosen\n// based on what is present. (Bundles may remove wordlists they don't need)\nconst wordlists = {};\nexports.wordlists = wordlists;\nlet _default;\nexports._default = _default;\ntry {\n exports._default = _default = require('./wordlists/czech.json');\n wordlists.czech = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/chinese_simplified.json');\n wordlists.chinese_simplified = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/chinese_traditional.json');\n wordlists.chinese_traditional = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/korean.json');\n wordlists.korean = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/french.json');\n wordlists.french = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/italian.json');\n wordlists.italian = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/spanish.json');\n wordlists.spanish = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/japanese.json');\n wordlists.japanese = _default;\n wordlists.JA = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/portuguese.json');\n wordlists.portuguese = _default;\n}\ncatch (err) { }\ntry {\n exports._default = _default = require('./wordlists/english.json');\n wordlists.english = _default;\n wordlists.EN = _default;\n}\ncatch (err) { }\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst createHash = require(\"create-hash\");\nconst pbkdf2_1 = require(\"pbkdf2\");\nconst randomBytes = require(\"randombytes\");\nconst _wordlists_1 = require(\"./_wordlists\");\nlet DEFAULT_WORDLIST = _wordlists_1._default;\nconst INVALID_MNEMONIC = 'Invalid mnemonic';\nconst INVALID_ENTROPY = 'Invalid entropy';\nconst INVALID_CHECKSUM = 'Invalid mnemonic checksum';\nconst WORDLIST_REQUIRED = 'A wordlist is required but a default could not be found.\\n' +\n 'Please pass a 2048 word array explicitly.';\nfunction pbkdf2Promise(password, saltMixin, iterations, keylen, digest) {\n return Promise.resolve().then(() => new Promise((resolve, reject) => {\n const callback = (err, derivedKey) => {\n if (err) {\n return reject(err);\n }\n else {\n return resolve(derivedKey);\n }\n };\n pbkdf2_1.pbkdf2(password, saltMixin, iterations, keylen, digest, callback);\n }));\n}\nfunction normalize(str) {\n return (str || '').normalize('NFKD');\n}\nfunction lpad(str, padString, length) {\n while (str.length < length) {\n str = padString + str;\n }\n return str;\n}\nfunction binaryToByte(bin) {\n return parseInt(bin, 2);\n}\nfunction bytesToBinary(bytes) {\n return bytes.map((x) => lpad(x.toString(2), '0', 8)).join('');\n}\nfunction deriveChecksumBits(entropyBuffer) {\n const ENT = entropyBuffer.length * 8;\n const CS = ENT / 32;\n const hash = createHash('sha256')\n .update(entropyBuffer)\n .digest();\n return bytesToBinary(Array.from(hash)).slice(0, CS);\n}\nfunction salt(password) {\n return 'mnemonic' + (password || '');\n}\nfunction mnemonicToSeedSync(mnemonic, password) {\n const mnemonicBuffer = Buffer.from(normalize(mnemonic), 'utf8');\n const saltBuffer = Buffer.from(salt(normalize(password)), 'utf8');\n return pbkdf2_1.pbkdf2Sync(mnemonicBuffer, saltBuffer, 2048, 64, 'sha512');\n}\nexports.mnemonicToSeedSync = mnemonicToSeedSync;\nfunction mnemonicToSeed(mnemonic, password) {\n return Promise.resolve().then(() => {\n const mnemonicBuffer = Buffer.from(normalize(mnemonic), 'utf8');\n const saltBuffer = Buffer.from(salt(normalize(password)), 'utf8');\n return pbkdf2Promise(mnemonicBuffer, saltBuffer, 2048, 64, 'sha512');\n });\n}\nexports.mnemonicToSeed = mnemonicToSeed;\nfunction mnemonicToEntropy(mnemonic, wordlist) {\n wordlist = wordlist || DEFAULT_WORDLIST;\n if (!wordlist) {\n throw new Error(WORDLIST_REQUIRED);\n }\n const words = normalize(mnemonic).split(' ');\n if (words.length % 3 !== 0) {\n throw new Error(INVALID_MNEMONIC);\n }\n // convert word indices to 11 bit binary strings\n const bits = words\n .map((word) => {\n const index = wordlist.indexOf(word);\n if (index === -1) {\n throw new Error(INVALID_MNEMONIC);\n }\n return lpad(index.toString(2), '0', 11);\n })\n .join('');\n // split the binary string into ENT/CS\n const dividerIndex = Math.floor(bits.length / 33) * 32;\n const entropyBits = bits.slice(0, dividerIndex);\n const checksumBits = bits.slice(dividerIndex);\n // calculate the checksum and compare\n const entropyBytes = entropyBits.match(/(.{1,8})/g).map(binaryToByte);\n if (entropyBytes.length < 16) {\n throw new Error(INVALID_ENTROPY);\n }\n if (entropyBytes.length > 32) {\n throw new Error(INVALID_ENTROPY);\n }\n if (entropyBytes.length % 4 !== 0) {\n throw new Error(INVALID_ENTROPY);\n }\n const entropy = Buffer.from(entropyBytes);\n const newChecksum = deriveChecksumBits(entropy);\n if (newChecksum !== checksumBits) {\n throw new Error(INVALID_CHECKSUM);\n }\n return entropy.toString('hex');\n}\nexports.mnemonicToEntropy = mnemonicToEntropy;\nfunction entropyToMnemonic(entropy, wordlist) {\n if (!Buffer.isBuffer(entropy)) {\n entropy = Buffer.from(entropy, 'hex');\n }\n wordlist = wordlist || DEFAULT_WORDLIST;\n if (!wordlist) {\n throw new Error(WORDLIST_REQUIRED);\n }\n // 128 <= ENT <= 256\n if (entropy.length < 16) {\n throw new TypeError(INVALID_ENTROPY);\n }\n if (entropy.length > 32) {\n throw new TypeError(INVALID_ENTROPY);\n }\n if (entropy.length % 4 !== 0) {\n throw new TypeError(INVALID_ENTROPY);\n }\n const entropyBits = bytesToBinary(Array.from(entropy));\n const checksumBits = deriveChecksumBits(entropy);\n const bits = entropyBits + checksumBits;\n const chunks = bits.match(/(.{1,11})/g);\n const words = chunks.map((binary) => {\n const index = binaryToByte(binary);\n return wordlist[index];\n });\n return wordlist[0] === '\\u3042\\u3044\\u3053\\u304f\\u3057\\u3093' // Japanese wordlist\n ? words.join('\\u3000')\n : words.join(' ');\n}\nexports.entropyToMnemonic = entropyToMnemonic;\nfunction generateMnemonic(strength, rng, wordlist) {\n strength = strength || 128;\n if (strength % 32 !== 0) {\n throw new TypeError(INVALID_ENTROPY);\n }\n rng = rng || randomBytes;\n return entropyToMnemonic(rng(strength / 8), wordlist);\n}\nexports.generateMnemonic = generateMnemonic;\nfunction validateMnemonic(mnemonic, wordlist) {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n }\n catch (e) {\n return false;\n }\n return true;\n}\nexports.validateMnemonic = validateMnemonic;\nfunction setDefaultWordlist(language) {\n const result = _wordlists_1.wordlists[language];\n if (result) {\n DEFAULT_WORDLIST = result;\n }\n else {\n throw new Error('Could not find wordlist for language \"' + language + '\"');\n }\n}\nexports.setDefaultWordlist = setDefaultWordlist;\nfunction getDefaultWordlist() {\n if (!DEFAULT_WORDLIST) {\n throw new Error('No Default Wordlist set');\n }\n return Object.keys(_wordlists_1.wordlists).filter((lang) => {\n if (lang === 'JA' || lang === 'EN') {\n return false;\n }\n return _wordlists_1.wordlists[lang].every((word, index) => word === DEFAULT_WORDLIST[index]);\n })[0];\n}\nexports.getDefaultWordlist = getDefaultWordlist;\nvar _wordlists_2 = require(\"./_wordlists\");\nexports.wordlists = _wordlists_2.wordlists;\n", "(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n", "var r;\n\nmodule.exports = function rand(len) {\n if (!r)\n r = new Rand(null);\n\n return r.generate(len);\n};\n\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\n\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n);\n\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++)\n res[i] = this.rand.getByte();\n return res;\n};\n\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function() {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function')\n throw new Error('Not supported');\n\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {\n }\n}\n", "var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n", "'use strict'\n\nvar base58 = require('bs58')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (checksumFn) {\n // Encode a buffer as a base58-check encoded string\n function encode (payload) {\n var checksum = checksumFn(payload)\n\n return base58.encode(Buffer.concat([\n payload,\n checksum\n ], payload.length + 4))\n }\n\n function decodeRaw (buffer) {\n var payload = buffer.slice(0, -4)\n var checksum = buffer.slice(-4)\n var newChecksum = checksumFn(payload)\n\n if (checksum[0] ^ newChecksum[0] |\n checksum[1] ^ newChecksum[1] |\n checksum[2] ^ newChecksum[2] |\n checksum[3] ^ newChecksum[3]) return\n\n return payload\n }\n\n // Decode a base58-check encoded string to a buffer, no result if checksum is wrong\n function decodeUnsafe (string) {\n var buffer = base58.decodeUnsafe(string)\n if (!buffer) return\n\n return decodeRaw(buffer)\n }\n\n function decode (string) {\n var buffer = base58.decode(string)\n var payload = decodeRaw(buffer, checksumFn)\n if (!payload) throw new Error('Invalid checksum')\n return payload\n }\n\n return {\n encode: encode,\n decode: decode,\n decodeUnsafe: decodeUnsafe\n }\n}\n", "'use strict'\n\nvar createHash = require('create-hash')\nvar bs58checkBase = require('./base')\n\n// SHA256(SHA256(buffer))\nfunction sha256x2 (buffer) {\n var tmp = createHash('sha256').update(buffer).digest()\n return createHash('sha256').update(tmp).digest()\n}\n\nmodule.exports = bs58checkBase(sha256x2)\n", "/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n", "'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n", "var Buffer = require('safe-buffer').Buffer\nvar Transform = require('stream').Transform\nvar StringDecoder = require('string_decoder').StringDecoder\nvar inherits = require('inherits')\n\nfunction CipherBase (hashMode) {\n Transform.call(this)\n this.hashMode = typeof hashMode === 'string'\n if (this.hashMode) {\n this[hashMode] = this._finalOrDigest\n } else {\n this.final = this._finalOrDigest\n }\n if (this._final) {\n this.__final = this._final\n this._final = null\n }\n this._decoder = null\n this._encoding = null\n}\ninherits(CipherBase, Transform)\n\nCipherBase.prototype.update = function (data, inputEnc, outputEnc) {\n if (typeof data === 'string') {\n data = Buffer.from(data, inputEnc)\n }\n\n var outData = this._update(data)\n if (this.hashMode) return this\n\n if (outputEnc) {\n outData = this._toString(outData, outputEnc)\n }\n\n return outData\n}\n\nCipherBase.prototype.setAutoPadding = function () {}\nCipherBase.prototype.getAuthTag = function () {\n throw new Error('trying to get auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAuthTag = function () {\n throw new Error('trying to set auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAAD = function () {\n throw new Error('trying to set aad in unsupported state')\n}\n\nCipherBase.prototype._transform = function (data, _, next) {\n var err\n try {\n if (this.hashMode) {\n this._update(data)\n } else {\n this.push(this._update(data))\n }\n } catch (e) {\n err = e\n } finally {\n next(err)\n }\n}\nCipherBase.prototype._flush = function (done) {\n var err\n try {\n this.push(this.__final())\n } catch (e) {\n err = e\n }\n\n done(err)\n}\nCipherBase.prototype._finalOrDigest = function (outputEnc) {\n var outData = this.__final() || Buffer.alloc(0)\n if (outputEnc) {\n outData = this._toString(outData, outputEnc, true)\n }\n return outData\n}\n\nCipherBase.prototype._toString = function (value, enc, fin) {\n if (!this._decoder) {\n this._decoder = new StringDecoder(enc)\n this._encoding = enc\n }\n\n if (this._encoding !== enc) throw new Error('can\\'t switch encodings')\n\n var out = this._decoder.write(value)\n if (fin) {\n out += this._decoder.end()\n }\n\n return out\n}\n\nmodule.exports = CipherBase\n", "/*global window, global*/\nvar util = require(\"util\")\nvar assert = require(\"assert\")\nfunction now() { return new Date().getTime() }\n\nvar slice = Array.prototype.slice\nvar console\nvar times = {}\n\nif (typeof global !== \"undefined\" && global.console) {\n console = global.console\n} else if (typeof window !== \"undefined\" && window.console) {\n console = window.console\n} else {\n console = {}\n}\n\nvar functions = [\n [log, \"log\"],\n [info, \"info\"],\n [warn, \"warn\"],\n [error, \"error\"],\n [time, \"time\"],\n [timeEnd, \"timeEnd\"],\n [trace, \"trace\"],\n [dir, \"dir\"],\n [consoleAssert, \"assert\"]\n]\n\nfor (var i = 0; i < functions.length; i++) {\n var tuple = functions[i]\n var f = tuple[0]\n var name = tuple[1]\n\n if (!console[name]) {\n console[name] = f\n }\n}\n\nmodule.exports = console\n\nfunction log() {}\n\nfunction info() {\n console.log.apply(console, arguments)\n}\n\nfunction warn() {\n console.log.apply(console, arguments)\n}\n\nfunction error() {\n console.warn.apply(console, arguments)\n}\n\nfunction time(label) {\n times[label] = now()\n}\n\nfunction timeEnd(label) {\n var time = times[label]\n if (!time) {\n throw new Error(\"No such label: \" + label)\n }\n\n delete times[label]\n var duration = now() - time\n console.log(label + \": \" + duration + \"ms\")\n}\n\nfunction trace() {\n var err = new Error()\n err.name = \"Trace\"\n err.message = util.format.apply(null, arguments)\n console.error(err.stack)\n}\n\nfunction dir(object) {\n console.log(util.inspect(object) + \"\\n\")\n}\n\nfunction consoleAssert(expression) {\n if (!expression) {\n var arr = slice.call(arguments, 1)\n assert.ok(false, util.format.apply(null, arr))\n }\n}\n", "'use strict'\nvar inherits = require('inherits')\nvar MD5 = require('md5.js')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Base = require('cipher-base')\n\nfunction Hash (hash) {\n Base.call(this, 'digest')\n\n this._hash = hash\n}\n\ninherits(Hash, Base)\n\nHash.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHash.prototype._final = function () {\n return this._hash.digest()\n}\n\nmodule.exports = function createHash (alg) {\n alg = alg.toLowerCase()\n if (alg === 'md5') return new MD5()\n if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()\n\n return new Hash(sha(alg))\n}\n", "var MD5 = require('md5.js')\n\nmodule.exports = function (buffer) {\n return new MD5().update(buffer).digest()\n}\n", "'use strict'\nvar inherits = require('inherits')\nvar Legacy = require('./legacy')\nvar Base = require('cipher-base')\nvar Buffer = require('safe-buffer').Buffer\nvar md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\n\nvar sha = require('sha.js')\n\nvar ZEROS = Buffer.alloc(128)\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n this._alg = alg\n this._key = key\n if (key.length > blocksize) {\n var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n key = hash.update(key).digest()\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n this._hash.update(ipad)\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._hash.digest()\n var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)\n return hash.update(this._opad).update(h).digest()\n}\n\nmodule.exports = function createHmac (alg, key) {\n alg = alg.toLowerCase()\n if (alg === 'rmd160' || alg === 'ripemd160') {\n return new Hmac('rmd160', key)\n }\n if (alg === 'md5') {\n return new Legacy(md5, key)\n }\n return new Hmac(alg, key)\n}\n", "'use strict'\nvar inherits = require('inherits')\nvar Buffer = require('safe-buffer').Buffer\n\nvar Base = require('cipher-base')\n\nvar ZEROS = Buffer.alloc(128)\nvar blocksize = 64\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n this._alg = alg\n this._key = key\n\n if (key.length > blocksize) {\n key = alg(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n this._hash = [ipad]\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.push(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._alg(Buffer.concat(this._hash))\n return this._alg(Buffer.concat([this._opad, h]))\n}\nmodule.exports = Hmac\n", "var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet _0 = new Uint8Array(16);\nlet _9 = new Uint8Array(32);\n_9[0] = 9;\nfunction gf(init) {\n var i, r = new Float64Array(16);\n if (init)\n for (i = 0; i < init.length; i++)\n r[i] = init[i];\n return r;\n}\n;\nconst gf0 = gf(), gf1 = gf([1]), _121665 = gf([0xdb41, 1]), D = gf([\n 0x78a3,\n 0x1359,\n 0x4dca,\n 0x75eb,\n 0xd8ab,\n 0x4141,\n 0x0a4d,\n 0x0070,\n 0xe898,\n 0x7779,\n 0x4079,\n 0x8cc7,\n 0xfe73,\n 0x2b6f,\n 0x6cee,\n 0x5203,\n]), D2 = gf([\n 0xf159,\n 0x26b2,\n 0x9b94,\n 0xebd6,\n 0xb156,\n 0x8283,\n 0x149a,\n 0x00e0,\n 0xd130,\n 0xeef3,\n 0x80f2,\n 0x198e,\n 0xfce7,\n 0x56df,\n 0xd9dc,\n 0x2406,\n]), X = gf([\n 0xd51a,\n 0x8f25,\n 0x2d60,\n 0xc956,\n 0xa7b2,\n 0x9525,\n 0xc760,\n 0x692c,\n 0xdc5c,\n 0xfdd6,\n 0xe231,\n 0xc0a4,\n 0x53fe,\n 0xcd6e,\n 0x36d3,\n 0x2169,\n]), Y = gf([\n 0x6658,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n 0x6666,\n]), I = gf([\n 0xa0b0,\n 0x4a0e,\n 0x1b27,\n 0xc4ee,\n 0xe478,\n 0xad2f,\n 0x1806,\n 0x2f43,\n 0xd7a7,\n 0x3dfb,\n 0x0099,\n 0x2b4d,\n 0xdf0b,\n 0x4fc1,\n 0x2480,\n 0x2b83,\n]);\nfunction ts64(x, i, h, l) {\n x[i] = (h >> 24) & 0xff;\n x[i + 1] = (h >> 16) & 0xff;\n x[i + 2] = (h >> 8) & 0xff;\n x[i + 3] = h & 0xff;\n x[i + 4] = (l >> 24) & 0xff;\n x[i + 5] = (l >> 16) & 0xff;\n x[i + 6] = (l >> 8) & 0xff;\n x[i + 7] = l & 0xff;\n}\nfunction vn(x, xi, y, yi, n) {\n var i, d = 0;\n for (i = 0; i < n; i++)\n d |= x[xi + i] ^ y[yi + i];\n return (1 & ((d - 1) >>> 8)) - 1;\n}\nfunction crypto_verify_32(x, xi, y, yi) {\n return vn(x, xi, y, yi, 32);\n}\nfunction set25519(r, a) {\n var i;\n for (i = 0; i < 16; i++)\n r[i] = a[i] | 0;\n}\nfunction car25519(o) {\n var i, v, c = 1;\n for (i = 0; i < 16; i++) {\n v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n var t, c = ~(b - 1);\n for (var i = 0; i < 16; i++) {\n t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n var i, j, b;\n var m = gf(), t = gf();\n for (i = 0; i < 16; i++)\n t[i] = n[i];\n car25519(t);\n car25519(t);\n car25519(t);\n for (j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction neq25519(a, b) {\n var c = new Uint8Array(32), d = new Uint8Array(32);\n pack25519(c, a);\n pack25519(d, b);\n return crypto_verify_32(c, 0, d, 0);\n}\nfunction par25519(a) {\n var d = new Uint8Array(32);\n pack25519(d, a);\n return d[0] & 1;\n}\nfunction unpack25519(o, n) {\n var i;\n for (i = 0; i < 16; i++)\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n o[15] &= 0x7fff;\n}\nfunction A(o, a, b) {\n for (var i = 0; i < 16; i++)\n o[i] = a[i] + b[i];\n}\nfunction Z(o, a, b) {\n for (var i = 0; i < 16; i++)\n o[i] = a[i] - b[i];\n}\nfunction M(o, a, b) {\n var v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction S(o, a) {\n M(o, a, a);\n}\nfunction inv25519(o, i) {\n var c = gf();\n var a;\n for (a = 0; a < 16; a++)\n c[a] = i[a];\n for (a = 253; a >= 0; a--) {\n S(c, c);\n if (a !== 2 && a !== 4)\n M(c, c, i);\n }\n for (a = 0; a < 16; a++)\n o[a] = c[a];\n}\nfunction pow2523(o, i) {\n var c = gf();\n var a;\n for (a = 0; a < 16; a++)\n c[a] = i[a];\n for (a = 250; a >= 0; a--) {\n S(c, c);\n if (a !== 1)\n M(c, c, i);\n }\n for (a = 0; a < 16; a++)\n o[a] = c[a];\n}\nfunction crypto_scalarmult(q, n, p) {\n var z = new Uint8Array(32);\n var x = new Float64Array(80), r, i;\n var a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf();\n for (i = 0; i < 31; i++)\n z[i] = n[i];\n z[31] = (n[31] & 127) | 64;\n z[0] &= 248;\n unpack25519(x, p);\n for (i = 0; i < 16; i++) {\n b[i] = x[i];\n d[i] = a[i] = c[i] = 0;\n }\n a[0] = d[0] = 1;\n for (i = 254; i >= 0; --i) {\n r = (z[i >>> 3] >>> (i & 7)) & 1;\n sel25519(a, b, r);\n sel25519(c, d, r);\n A(e, a, c);\n Z(a, a, c);\n A(c, b, d);\n Z(b, b, d);\n S(d, e);\n S(f, a);\n M(a, c, a);\n M(c, b, e);\n A(e, a, c);\n Z(a, a, c);\n S(b, a);\n Z(c, d, f);\n M(a, c, _121665);\n A(a, a, d);\n M(c, c, a);\n M(a, d, f);\n M(d, b, x);\n S(b, e);\n sel25519(a, b, r);\n sel25519(c, d, r);\n }\n for (i = 0; i < 16; i++) {\n x[i + 16] = a[i];\n x[i + 32] = c[i];\n x[i + 48] = b[i];\n x[i + 64] = d[i];\n }\n var x32 = x.subarray(32);\n var x16 = x.subarray(16);\n inv25519(x32, x32);\n M(x16, x16, x32);\n pack25519(q, x16);\n return 0;\n}\nfunction crypto_scalarmult_base(q, n) {\n return crypto_scalarmult(q, n, _9);\n}\nvar K = [\n 0x428a2f98,\n 0xd728ae22,\n 0x71374491,\n 0x23ef65cd,\n 0xb5c0fbcf,\n 0xec4d3b2f,\n 0xe9b5dba5,\n 0x8189dbbc,\n 0x3956c25b,\n 0xf348b538,\n 0x59f111f1,\n 0xb605d019,\n 0x923f82a4,\n 0xaf194f9b,\n 0xab1c5ed5,\n 0xda6d8118,\n 0xd807aa98,\n 0xa3030242,\n 0x12835b01,\n 0x45706fbe,\n 0x243185be,\n 0x4ee4b28c,\n 0x550c7dc3,\n 0xd5ffb4e2,\n 0x72be5d74,\n 0xf27b896f,\n 0x80deb1fe,\n 0x3b1696b1,\n 0x9bdc06a7,\n 0x25c71235,\n 0xc19bf174,\n 0xcf692694,\n 0xe49b69c1,\n 0x9ef14ad2,\n 0xefbe4786,\n 0x384f25e3,\n 0x0fc19dc6,\n 0x8b8cd5b5,\n 0x240ca1cc,\n 0x77ac9c65,\n 0x2de92c6f,\n 0x592b0275,\n 0x4a7484aa,\n 0x6ea6e483,\n 0x5cb0a9dc,\n 0xbd41fbd4,\n 0x76f988da,\n 0x831153b5,\n 0x983e5152,\n 0xee66dfab,\n 0xa831c66d,\n 0x2db43210,\n 0xb00327c8,\n 0x98fb213f,\n 0xbf597fc7,\n 0xbeef0ee4,\n 0xc6e00bf3,\n 0x3da88fc2,\n 0xd5a79147,\n 0x930aa725,\n 0x06ca6351,\n 0xe003826f,\n 0x14292967,\n 0x0a0e6e70,\n 0x27b70a85,\n 0x46d22ffc,\n 0x2e1b2138,\n 0x5c26c926,\n 0x4d2c6dfc,\n 0x5ac42aed,\n 0x53380d13,\n 0x9d95b3df,\n 0x650a7354,\n 0x8baf63de,\n 0x766a0abb,\n 0x3c77b2a8,\n 0x81c2c92e,\n 0x47edaee6,\n 0x92722c85,\n 0x1482353b,\n 0xa2bfe8a1,\n 0x4cf10364,\n 0xa81a664b,\n 0xbc423001,\n 0xc24b8b70,\n 0xd0f89791,\n 0xc76c51a3,\n 0x0654be30,\n 0xd192e819,\n 0xd6ef5218,\n 0xd6990624,\n 0x5565a910,\n 0xf40e3585,\n 0x5771202a,\n 0x106aa070,\n 0x32bbd1b8,\n 0x19a4c116,\n 0xb8d2d0c8,\n 0x1e376c08,\n 0x5141ab53,\n 0x2748774c,\n 0xdf8eeb99,\n 0x34b0bcb5,\n 0xe19b48a8,\n 0x391c0cb3,\n 0xc5c95a63,\n 0x4ed8aa4a,\n 0xe3418acb,\n 0x5b9cca4f,\n 0x7763e373,\n 0x682e6ff3,\n 0xd6b2b8a3,\n 0x748f82ee,\n 0x5defb2fc,\n 0x78a5636f,\n 0x43172f60,\n 0x84c87814,\n 0xa1f0ab72,\n 0x8cc70208,\n 0x1a6439ec,\n 0x90befffa,\n 0x23631e28,\n 0xa4506ceb,\n 0xde82bde9,\n 0xbef9a3f7,\n 0xb2c67915,\n 0xc67178f2,\n 0xe372532b,\n 0xca273ece,\n 0xea26619c,\n 0xd186b8c7,\n 0x21c0c207,\n 0xeada7dd6,\n 0xcde0eb1e,\n 0xf57d4f7f,\n 0xee6ed178,\n 0x06f067aa,\n 0x72176fba,\n 0x0a637dc5,\n 0xa2c898a6,\n 0x113f9804,\n 0xbef90dae,\n 0x1b710b35,\n 0x131c471b,\n 0x28db77f5,\n 0x23047d84,\n 0x32caab7b,\n 0x40c72493,\n 0x3c9ebe0a,\n 0x15c9bebc,\n 0x431d67c4,\n 0x9c100d4c,\n 0x4cc5d4be,\n 0xcb3e42b6,\n 0x597f299c,\n 0xfc657e2a,\n 0x5fcb6fab,\n 0x3ad6faec,\n 0x6c44198c,\n 0x4a475817,\n];\nfunction crypto_hashblocks_hl(hh, hl, m, n) {\n var wh = new Int32Array(16), wl = new Int32Array(16), bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, th, tl, i, j, h, l, a, b, c, d;\n var ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7];\n var pos = 0;\n while (n >= 128) {\n for (i = 0; i < 16; i++) {\n j = 8 * i + pos;\n wh[i] = (m[j + 0] << 24) | (m[j + 1] << 16) | (m[j + 2] << 8) | m[j + 3];\n wl[i] = (m[j + 4] << 24) | (m[j + 5] << 16) | (m[j + 6] << 8) | m[j + 7];\n }\n for (i = 0; i < 80; i++) {\n bh0 = ah0;\n bh1 = ah1;\n bh2 = ah2;\n bh3 = ah3;\n bh4 = ah4;\n bh5 = ah5;\n bh6 = ah6;\n bh7 = ah7;\n bl0 = al0;\n bl1 = al1;\n bl2 = al2;\n bl3 = al3;\n bl4 = al4;\n bl5 = al5;\n bl6 = al6;\n bl7 = al7;\n // add\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma1\n h =\n ((ah4 >>> 14) | (al4 << (32 - 14))) ^\n ((ah4 >>> 18) | (al4 << (32 - 18))) ^\n ((al4 >>> (41 - 32)) | (ah4 << (32 - (41 - 32))));\n l =\n ((al4 >>> 14) | (ah4 << (32 - 14))) ^\n ((al4 >>> 18) | (ah4 << (32 - 18))) ^\n ((ah4 >>> (41 - 32)) | (al4 << (32 - (41 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Ch\n h = (ah4 & ah5) ^ (~ah4 & ah6);\n l = (al4 & al5) ^ (~al4 & al6);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // K\n h = K[i * 2];\n l = K[i * 2 + 1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // w\n h = wh[i % 16];\n l = wl[i % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n th = (c & 0xffff) | (d << 16);\n tl = (a & 0xffff) | (b << 16);\n // add\n h = th;\n l = tl;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma0\n h =\n ((ah0 >>> 28) | (al0 << (32 - 28))) ^\n ((al0 >>> (34 - 32)) | (ah0 << (32 - (34 - 32)))) ^\n ((al0 >>> (39 - 32)) | (ah0 << (32 - (39 - 32))));\n l =\n ((al0 >>> 28) | (ah0 << (32 - 28))) ^\n ((ah0 >>> (34 - 32)) | (al0 << (32 - (34 - 32)))) ^\n ((ah0 >>> (39 - 32)) | (al0 << (32 - (39 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Maj\n h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);\n l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh7 = (c & 0xffff) | (d << 16);\n bl7 = (a & 0xffff) | (b << 16);\n // add\n h = bh3;\n l = bl3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = th;\n l = tl;\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh3 = (c & 0xffff) | (d << 16);\n bl3 = (a & 0xffff) | (b << 16);\n ah1 = bh0;\n ah2 = bh1;\n ah3 = bh2;\n ah4 = bh3;\n ah5 = bh4;\n ah6 = bh5;\n ah7 = bh6;\n ah0 = bh7;\n al1 = bl0;\n al2 = bl1;\n al3 = bl2;\n al4 = bl3;\n al5 = bl4;\n al6 = bl5;\n al7 = bl6;\n al0 = bl7;\n if (i % 16 === 15) {\n for (j = 0; j < 16; j++) {\n // add\n h = wh[j];\n l = wl[j];\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = wh[(j + 9) % 16];\n l = wl[(j + 9) % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma0\n th = wh[(j + 1) % 16];\n tl = wl[(j + 1) % 16];\n h = ((th >>> 1) | (tl << (32 - 1))) ^ ((th >>> 8) | (tl << (32 - 8))) ^ (th >>> 7);\n l = ((tl >>> 1) | (th << (32 - 1))) ^ ((tl >>> 8) | (th << (32 - 8))) ^ ((tl >>> 7) | (th << (32 - 7)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma1\n th = wh[(j + 14) % 16];\n tl = wl[(j + 14) % 16];\n h = ((th >>> 19) | (tl << (32 - 19))) ^ ((tl >>> (61 - 32)) | (th << (32 - (61 - 32)))) ^ (th >>> 6);\n l =\n ((tl >>> 19) | (th << (32 - 19))) ^\n ((th >>> (61 - 32)) | (tl << (32 - (61 - 32)))) ^\n ((tl >>> 6) | (th << (32 - 6)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n wh[j] = (c & 0xffff) | (d << 16);\n wl[j] = (a & 0xffff) | (b << 16);\n }\n }\n }\n // add\n h = ah0;\n l = al0;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[0];\n l = hl[0];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[0] = ah0 = (c & 0xffff) | (d << 16);\n hl[0] = al0 = (a & 0xffff) | (b << 16);\n h = ah1;\n l = al1;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[1];\n l = hl[1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[1] = ah1 = (c & 0xffff) | (d << 16);\n hl[1] = al1 = (a & 0xffff) | (b << 16);\n h = ah2;\n l = al2;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[2];\n l = hl[2];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[2] = ah2 = (c & 0xffff) | (d << 16);\n hl[2] = al2 = (a & 0xffff) | (b << 16);\n h = ah3;\n l = al3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[3];\n l = hl[3];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[3] = ah3 = (c & 0xffff) | (d << 16);\n hl[3] = al3 = (a & 0xffff) | (b << 16);\n h = ah4;\n l = al4;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[4];\n l = hl[4];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[4] = ah4 = (c & 0xffff) | (d << 16);\n hl[4] = al4 = (a & 0xffff) | (b << 16);\n h = ah5;\n l = al5;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[5];\n l = hl[5];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[5] = ah5 = (c & 0xffff) | (d << 16);\n hl[5] = al5 = (a & 0xffff) | (b << 16);\n h = ah6;\n l = al6;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[6];\n l = hl[6];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[6] = ah6 = (c & 0xffff) | (d << 16);\n hl[6] = al6 = (a & 0xffff) | (b << 16);\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[7];\n l = hl[7];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[7] = ah7 = (c & 0xffff) | (d << 16);\n hl[7] = al7 = (a & 0xffff) | (b << 16);\n pos += 128;\n n -= 128;\n }\n return n;\n}\nfunction crypto_hash(out, m, n) {\n var hh = new Int32Array(8), hl = new Int32Array(8), x = new Uint8Array(256), i, b = n;\n hh[0] = 0x6a09e667;\n hh[1] = 0xbb67ae85;\n hh[2] = 0x3c6ef372;\n hh[3] = 0xa54ff53a;\n hh[4] = 0x510e527f;\n hh[5] = 0x9b05688c;\n hh[6] = 0x1f83d9ab;\n hh[7] = 0x5be0cd19;\n hl[0] = 0xf3bcc908;\n hl[1] = 0x84caa73b;\n hl[2] = 0xfe94f82b;\n hl[3] = 0x5f1d36f1;\n hl[4] = 0xade682d1;\n hl[5] = 0x2b3e6c1f;\n hl[6] = 0xfb41bd6b;\n hl[7] = 0x137e2179;\n crypto_hashblocks_hl(hh, hl, m, n);\n n %= 128;\n for (i = 0; i < n; i++)\n x[i] = m[b - n + i];\n x[n] = 128;\n n = 256 - 128 * (n < 112 ? 1 : 0);\n x[n - 9] = 0;\n ts64(x, n - 8, (b / 0x20000000) | 0, b << 3);\n crypto_hashblocks_hl(hh, hl, x, n);\n for (i = 0; i < 8; i++)\n ts64(out, 8 * i, hh[i], hl[i]);\n return 0;\n}\nfunction add(p, q) {\n var a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(), g = gf(), h = gf(), t = gf();\n Z(a, p[1], p[0]);\n Z(t, q[1], q[0]);\n M(a, a, t);\n A(b, p[0], p[1]);\n A(t, q[0], q[1]);\n M(b, b, t);\n M(c, p[3], q[3]);\n M(c, c, D2);\n M(d, p[2], q[2]);\n A(d, d, d);\n Z(e, b, a);\n Z(f, d, c);\n A(g, d, c);\n A(h, b, a);\n M(p[0], e, f);\n M(p[1], h, g);\n M(p[2], g, f);\n M(p[3], e, h);\n}\nfunction cswap(p, q, b) {\n var i;\n for (i = 0; i < 4; i++) {\n sel25519(p[i], q[i], b);\n }\n}\nfunction pack(r, p) {\n var tx = gf(), ty = gf(), zi = gf();\n inv25519(zi, p[2]);\n M(tx, p[0], zi);\n M(ty, p[1], zi);\n pack25519(r, ty);\n r[31] ^= par25519(tx) << 7;\n}\nfunction scalarmult(p, q, s) {\n var b, i;\n set25519(p[0], gf0);\n set25519(p[1], gf1);\n set25519(p[2], gf1);\n set25519(p[3], gf0);\n for (i = 255; i >= 0; --i) {\n b = (s[(i / 8) | 0] >> (i & 7)) & 1;\n cswap(p, q, b);\n add(q, p);\n add(p, p);\n cswap(p, q, b);\n }\n}\nfunction scalarbase(p, s) {\n var q = [gf(), gf(), gf(), gf()];\n set25519(q[0], X);\n set25519(q[1], Y);\n set25519(q[2], gf1);\n M(q[3], X, Y);\n scalarmult(p, q, s);\n}\nvar L = new Float64Array([\n 0xed,\n 0xd3,\n 0xf5,\n 0x5c,\n 0x1a,\n 0x63,\n 0x12,\n 0x58,\n 0xd6,\n 0x9c,\n 0xf7,\n 0xa2,\n 0xde,\n 0xf9,\n 0xde,\n 0x14,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0x10,\n]);\nfunction modL(r, x) {\n var carry, i, j, k;\n for (i = 63; i >= 32; --i) {\n carry = 0;\n for (j = i - 32, k = i - 12; j < k; ++j) {\n x[j] += carry - 16 * x[i] * L[j - (i - 32)];\n carry = (x[j] + 128) >> 8;\n x[j] -= carry * 256;\n }\n x[j] += carry;\n x[i] = 0;\n }\n carry = 0;\n for (j = 0; j < 32; j++) {\n x[j] += carry - (x[31] >> 4) * L[j];\n carry = x[j] >> 8;\n x[j] &= 255;\n }\n for (j = 0; j < 32; j++)\n x[j] -= carry * L[j];\n for (i = 0; i < 32; i++) {\n x[i + 1] += x[i] >> 8;\n r[i] = x[i] & 255;\n }\n}\nfunction reduce(r) {\n var x = new Float64Array(64), i;\n for (i = 0; i < 64; i++)\n x[i] = r[i];\n for (i = 0; i < 64; i++)\n r[i] = 0;\n modL(r, x);\n}\n// Like crypto_sign, but uses secret key directly in hash.\nfunction crypto_sign_direct(sm, m, n, sk) {\n var h = new Uint8Array(64), r = new Uint8Array(64);\n var i, j, x = new Float64Array(64);\n var p = [gf(), gf(), gf(), gf()];\n for (i = 0; i < n; i++)\n sm[64 + i] = m[i];\n for (i = 0; i < 32; i++)\n sm[32 + i] = sk[i];\n crypto_hash(r, sm.subarray(32), n + 32);\n reduce(r);\n scalarbase(p, r);\n pack(sm, p);\n for (i = 0; i < 32; i++)\n sm[i + 32] = sk[32 + i];\n crypto_hash(h, sm, n + 64);\n reduce(h);\n for (i = 0; i < 64; i++)\n x[i] = 0;\n for (i = 0; i < 32; i++)\n x[i] = r[i];\n for (i = 0; i < 32; i++) {\n for (j = 0; j < 32; j++) {\n x[i + j] += h[i] * sk[j];\n }\n }\n modL(sm.subarray(32), x);\n return n + 64;\n}\n// Note: sm must be n+128.\nfunction crypto_sign_direct_rnd(sm, m, n, sk, rnd) {\n var h = new Uint8Array(64), r = new Uint8Array(64);\n var i, j, x = new Float64Array(64);\n var p = [gf(), gf(), gf(), gf()];\n // Hash separation.\n sm[0] = 0xfe;\n for (i = 1; i < 32; i++)\n sm[i] = 0xff;\n // Secret key.\n for (i = 0; i < 32; i++)\n sm[32 + i] = sk[i];\n // Message.\n for (i = 0; i < n; i++)\n sm[64 + i] = m[i];\n // Random suffix.\n for (i = 0; i < 64; i++)\n sm[n + 64 + i] = rnd[i];\n crypto_hash(r, sm, n + 128);\n reduce(r);\n scalarbase(p, r);\n pack(sm, p);\n for (i = 0; i < 32; i++)\n sm[i + 32] = sk[32 + i];\n crypto_hash(h, sm, n + 64);\n reduce(h);\n // Wipe out random suffix.\n for (i = 0; i < 64; i++)\n sm[n + 64 + i] = 0;\n for (i = 0; i < 64; i++)\n x[i] = 0;\n for (i = 0; i < 32; i++)\n x[i] = r[i];\n for (i = 0; i < 32; i++) {\n for (j = 0; j < 32; j++) {\n x[i + j] += h[i] * sk[j];\n }\n }\n modL(sm.subarray(32, n + 64), x);\n return n + 64;\n}\nfunction curve25519_sign(sm, m, n, sk, opt_rnd) {\n // If opt_rnd is provided, sm must have n + 128,\n // otherwise it must have n + 64 bytes.\n // Convert Curve25519 secret key into Ed25519 secret key (includes pub key).\n var edsk = new Uint8Array(64);\n var p = [gf(), gf(), gf(), gf()];\n for (var i = 0; i < 32; i++)\n edsk[i] = sk[i];\n // Ensure private key is in the correct format.\n edsk[0] &= 248;\n edsk[31] &= 127;\n edsk[31] |= 64;\n scalarbase(p, edsk);\n pack(edsk.subarray(32), p);\n // Remember sign bit.\n var signBit = edsk[63] & 128;\n var smlen;\n if (opt_rnd) {\n smlen = crypto_sign_direct_rnd(sm, m, n, edsk, opt_rnd);\n }\n else {\n smlen = crypto_sign_direct(sm, m, n, edsk);\n }\n // Copy sign bit from public key into signature.\n sm[63] |= signBit;\n return smlen;\n}\nfunction unpackneg(r, p) {\n var t = gf(), chk = gf(), num = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf();\n set25519(r[2], gf1);\n unpack25519(r[1], p);\n S(num, r[1]);\n M(den, num, D);\n Z(num, num, r[2]);\n A(den, r[2], den);\n S(den2, den);\n S(den4, den2);\n M(den6, den4, den2);\n M(t, den6, num);\n M(t, t, den);\n pow2523(t, t);\n M(t, t, num);\n M(t, t, den);\n M(t, t, den);\n M(r[0], t, den);\n S(chk, r[0]);\n M(chk, chk, den);\n if (neq25519(chk, num))\n M(r[0], r[0], I);\n S(chk, r[0]);\n M(chk, chk, den);\n if (neq25519(chk, num))\n return -1;\n if (par25519(r[0]) === p[31] >> 7)\n Z(r[0], gf0, r[0]);\n M(r[3], r[0], r[1]);\n return 0;\n}\nfunction crypto_sign_open(m, sm, n, pk) {\n var i, mlen;\n var t = new Uint8Array(32), h = new Uint8Array(64);\n var p = [gf(), gf(), gf(), gf()], q = [gf(), gf(), gf(), gf()];\n mlen = -1;\n if (n < 64)\n return -1;\n if (unpackneg(q, pk))\n return -1;\n for (i = 0; i < n; i++)\n m[i] = sm[i];\n for (i = 0; i < 32; i++)\n m[i + 32] = pk[i];\n crypto_hash(h, m, n);\n reduce(h);\n scalarmult(p, q, h);\n scalarbase(q, sm.subarray(32));\n add(p, q);\n pack(t, p);\n n -= 64;\n if (crypto_verify_32(sm, 0, t, 0)) {\n for (i = 0; i < n; i++)\n m[i] = 0;\n return -1;\n }\n for (i = 0; i < n; i++)\n m[i] = sm[i + 64];\n mlen = n;\n return mlen;\n}\n// Converts Curve25519 public key back to Ed25519 public key.\n// edwardsY = (montgomeryX - 1) / (montgomeryX + 1)\nfunction convertPublicKey(pk) {\n var z = new Uint8Array(32), x = gf(), a = gf(), b = gf();\n unpack25519(x, pk);\n A(a, x, gf1);\n Z(b, x, gf1);\n inv25519(a, a);\n M(a, a, b);\n pack25519(z, a);\n return z;\n}\nfunction curve25519_sign_open(m, sm, n, pk) {\n // Convert Curve25519 public key into Ed25519 public key.\n var edpk = convertPublicKey(pk);\n // Restore sign bit from signature.\n edpk[31] |= sm[63] & 128;\n // Remove sign bit from signature.\n sm[63] &= 127;\n // Verify signed message.\n return crypto_sign_open(m, sm, n, edpk);\n}\n/* High-level API */\nfunction checkArrayTypes(...args) {\n var t, i;\n for (i = 0; i < arguments.length; i++) {\n if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]')\n throw new TypeError('unexpected type ' + t + ', use Uint8Array');\n }\n}\n/**\n * Returns a raw shared key between own private key and peer's public key (in other words, this is an ECC Diffie-Hellman function X25519, performing scalar multiplication).\n *\n * The result should not be used directly as a key, but should be processed with a one-way function (e.g. HSalsa20 as in NaCl, or any secure cryptographic hash function, such as SHA-256, or key derivation function, such as HKDF).\n *\n * @export\n * @param {Uint8Array} secretKey\n * @param {Uint8Array} publicKey\n * @returns Uint8Array\n */\nfunction sharedKey(secretKey, publicKey) {\n checkArrayTypes(publicKey, secretKey);\n if (publicKey.length !== 32)\n throw new Error('wrong public key length');\n if (secretKey.length !== 32)\n throw new Error('wrong secret key length');\n var sharedKey = new Uint8Array(32);\n crypto_scalarmult(sharedKey, secretKey, publicKey);\n return sharedKey;\n}\nexports.sharedKey = sharedKey;\n/**\n * Signs the given message using the private key and returns a signed message (signature concatenated with the message copy).\n *\n * Optional random data argument (which must have 64 random bytes) turns on hash separation and randomization to make signatures non-deterministic.\n *\n * @export\n * @param {Uint8Array} secretKey\n * @param {*} msg\n * @param {Uint8Array} opt_random\n * @returns\n */\nfunction signMessage(secretKey, msg, opt_random) {\n checkArrayTypes(msg, secretKey);\n if (secretKey.length !== 32)\n throw new Error('wrong secret key length');\n if (opt_random) {\n checkArrayTypes(opt_random);\n if (opt_random.length !== 64)\n throw new Error('wrong random data length');\n var buf = new Uint8Array(128 + msg.length);\n curve25519_sign(buf, msg, msg.length, secretKey, opt_random);\n return new Uint8Array(buf.subarray(0, 64 + msg.length));\n }\n else {\n var signedMsg = new Uint8Array(64 + msg.length);\n curve25519_sign(signedMsg, msg, msg.length, secretKey);\n return signedMsg;\n }\n}\nexports.signMessage = signMessage;\n/**\n * Verifies signed message with the public key and returns the original message without signature if it's correct or null if verification fails.\n *\n * @export\n * @param {Uint8Array} publicKey\n * @param {*} signedMsg\n * @returns Message\n */\nfunction openMessage(publicKey, signedMsg) {\n checkArrayTypes(signedMsg, publicKey);\n if (publicKey.length !== 32)\n throw new Error('wrong public key length');\n var tmp = new Uint8Array(signedMsg.length);\n var mlen = curve25519_sign_open(tmp, signedMsg, signedMsg.length, publicKey);\n if (mlen < 0)\n return null;\n var m = new Uint8Array(mlen);\n for (var i = 0; i < m.length; i++)\n m[i] = tmp[i];\n return m;\n}\nexports.openMessage = openMessage;\n/**\n * Signs the given message using the private key and returns signature.\n *\n * Optional random data argument (which must have 64 random bytes) turns on hash separation and randomization to make signatures non-deterministic.\n *\n * @export\n * @param {Uint8Array} secretKey\n * @param {*} msg\n * @param {Uint8Array} opt_random\n * @returns\n */\nfunction sign(secretKey, msg, opt_random) {\n checkArrayTypes(secretKey, msg);\n if (secretKey.length !== 32)\n throw new Error('wrong secret key length');\n if (opt_random) {\n checkArrayTypes(opt_random);\n if (opt_random.length !== 64)\n throw new Error('wrong random data length');\n }\n var buf = new Uint8Array((opt_random ? 128 : 64) + msg.length);\n curve25519_sign(buf, msg, msg.length, secretKey, opt_random);\n var signature = new Uint8Array(64);\n for (var i = 0; i < signature.length; i++)\n signature[i] = buf[i];\n return signature;\n}\nexports.sign = sign;\n/**\n * Verifies the given signature for the message using the given private key. Returns true if the signature is valid, false otherwise.\n *\n * @export\n * @param {Uint8Array} publicKey\n * @param {*} msg\n * @param {*} signature\n * @returns\n */\nfunction verify(publicKey, msg, signature) {\n checkArrayTypes(msg, signature, publicKey);\n if (signature.length !== 64)\n throw new Error('wrong signature length');\n if (publicKey.length !== 32)\n throw new Error('wrong public key length');\n var sm = new Uint8Array(64 + msg.length);\n var m = new Uint8Array(64 + msg.length);\n var i;\n for (i = 0; i < 64; i++)\n sm[i] = signature[i];\n for (i = 0; i < msg.length; i++)\n sm[i + 64] = msg[i];\n return curve25519_sign_open(m, sm, sm.length, publicKey) >= 0;\n}\nexports.verify = verify;\n/**\n * Generates a new key pair from the given 32-byte secret seed (which should be generated with a CSPRNG) and returns it as object.\n *\n * The returned keys can be used for signing and key agreement.\n *\n * @export\n * @param {Uint8Array} seed required\n * @returns\n */\nfunction generateKeyPair(seed) {\n checkArrayTypes(seed);\n if (seed.length !== 32)\n throw new Error('wrong seed length');\n var sk = new Uint8Array(32);\n var pk = new Uint8Array(32);\n for (var i = 0; i < 32; i++)\n sk[i] = seed[i];\n crypto_scalarmult_base(pk, sk);\n // Turn secret key into the correct format.\n sk[0] &= 248;\n sk[31] &= 127;\n sk[31] |= 64;\n // Remove sign bit from public key.\n pk[31] &= 127;\n return {\n public: pk,\n private: sk,\n };\n}\nexports.generateKeyPair = generateKeyPair;\nexports.default = {};\n", "'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n", "'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n", "'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n", "'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n", "'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction EdwardsCurve(conf) {\n // NOTE: Important as we are creating point in Base.call()\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n\n Base.call(this, 'edwards', conf);\n\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n\n assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n}\ninherits(EdwardsCurve, Base);\nmodule.exports = EdwardsCurve;\n\nEdwardsCurve.prototype._mulA = function _mulA(num) {\n if (this.mOneA)\n return num.redNeg();\n else\n return this.a.redMul(num);\n};\n\nEdwardsCurve.prototype._mulC = function _mulC(num) {\n if (this.oneC)\n return num;\n else\n return this.c.redMul(num);\n};\n\n// Just for compatibility with Short curve\nEdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {\n return this.point(x, y, z, t);\n};\n\nEdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var x2 = x.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x2));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));\n\n var y2 = rhs.redMul(lhs.redInvm());\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {\n y = new BN(y, 16);\n if (!y.red)\n y = y.toRed(this.red);\n\n // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)\n var y2 = y.redSqr();\n var lhs = y2.redSub(this.c2);\n var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x2 = lhs.redMul(rhs.redInvm());\n\n if (x2.cmp(this.zero) === 0) {\n if (odd)\n throw new Error('invalid point');\n else\n return this.point(this.zero, y);\n }\n\n var x = x2.redSqrt();\n if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n if (x.fromRed().isOdd() !== odd)\n x = x.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.validate = function validate(point) {\n if (point.isInfinity())\n return true;\n\n // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)\n point.normalize();\n\n var x2 = point.x.redSqr();\n var y2 = point.y.redSqr();\n var lhs = x2.redMul(this.a).redAdd(y2);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));\n\n return lhs.cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, y, z, t) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && y === null && z === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = z ? new BN(z, 16) : this.curve.one;\n this.t = t && new BN(t, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n\n // Use extended coordinates\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n}\ninherits(Point, Base.BasePoint);\n\nEdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nEdwardsCurve.prototype.point = function point(x, y, z, t) {\n return new Point(this, x, y, z, t);\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1], obj[2]);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.x.cmpn(0) === 0 &&\n (this.y.cmp(this.z) === 0 ||\n (this.zOne && this.y.cmp(this.curve.c) === 0));\n};\n\nPoint.prototype._extDbl = function _extDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #doubling-dbl-2008-hwcd\n // 4M + 4S\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = 2 * Z1^2\n var c = this.z.redSqr();\n c = c.redIAdd(c);\n // D = a * A\n var d = this.curve._mulA(a);\n // E = (X1 + Y1)^2 - A - B\n var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);\n // G = D + B\n var g = d.redAdd(b);\n // F = G - C\n var f = g.redSub(c);\n // H = D - B\n var h = d.redSub(b);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projDbl = function _projDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #doubling-dbl-2008-bbjlp\n // #doubling-dbl-2007-bl\n // and others\n // Generally 3M + 4S or 2M + 4S\n\n // B = (X1 + Y1)^2\n var b = this.x.redAdd(this.y).redSqr();\n // C = X1^2\n var c = this.x.redSqr();\n // D = Y1^2\n var d = this.y.redSqr();\n\n var nx;\n var ny;\n var nz;\n var e;\n var h;\n var j;\n if (this.curve.twisted) {\n // E = a * C\n e = this.curve._mulA(c);\n // F = E + D\n var f = e.redAdd(d);\n if (this.zOne) {\n // X3 = (B - C - D) * (F - 2)\n nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F^2 - 2 * F\n nz = f.redSqr().redSub(f).redSub(f);\n } else {\n // H = Z1^2\n h = this.z.redSqr();\n // J = F - 2 * H\n j = f.redSub(h).redISub(h);\n // X3 = (B-C-D)*J\n nx = b.redSub(c).redISub(d).redMul(j);\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F * J\n nz = f.redMul(j);\n }\n } else {\n // E = C + D\n e = c.redAdd(d);\n // H = (c * Z1)^2\n h = this.curve._mulC(this.z).redSqr();\n // J = E - 2 * H\n j = e.redSub(h).redSub(h);\n // X3 = c * (B - E) * J\n nx = this.curve._mulC(b.redISub(e)).redMul(j);\n // Y3 = c * E * (C - D)\n ny = this.curve._mulC(e).redMul(c.redISub(d));\n // Z3 = E * J\n nz = e.redMul(j);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n // Double in extended coordinates\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n};\n\nPoint.prototype._extAdd = function _extAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #addition-add-2008-hwcd-3\n // 8M\n\n // A = (Y1 - X1) * (Y2 - X2)\n var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));\n // B = (Y1 + X1) * (Y2 + X2)\n var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));\n // C = T1 * k * T2\n var c = this.t.redMul(this.curve.dd).redMul(p.t);\n // D = Z1 * 2 * Z2\n var d = this.z.redMul(p.z.redAdd(p.z));\n // E = B - A\n var e = b.redSub(a);\n // F = D - C\n var f = d.redSub(c);\n // G = D + C\n var g = d.redAdd(c);\n // H = B + A\n var h = b.redAdd(a);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projAdd = function _projAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #addition-add-2008-bbjlp\n // #addition-add-2007-bl\n // 10M + 1S\n\n // A = Z1 * Z2\n var a = this.z.redMul(p.z);\n // B = A^2\n var b = a.redSqr();\n // C = X1 * X2\n var c = this.x.redMul(p.x);\n // D = Y1 * Y2\n var d = this.y.redMul(p.y);\n // E = d * C * D\n var e = this.curve.d.redMul(c).redMul(d);\n // F = B - E\n var f = b.redSub(e);\n // G = B + E\n var g = b.redAdd(e);\n // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)\n var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);\n var nx = a.redMul(f).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n // Y3 = A * G * (D - a * C)\n ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));\n // Z3 = F * G\n nz = f.redMul(g);\n } else {\n // Y3 = A * G * (D - C)\n ny = a.redMul(g).redMul(d.redSub(c));\n // Z3 = c * F * G\n nz = this.curve._mulC(f).redMul(g);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.add = function add(p) {\n if (this.isInfinity())\n return p;\n if (p.isInfinity())\n return this;\n\n if (this.curve.extended)\n return this._extAdd(p);\n else\n return this._projAdd(p);\n};\n\nPoint.prototype.mul = function mul(k) {\n if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);\n};\n\nPoint.prototype.normalize = function normalize() {\n if (this.zOne)\n return this;\n\n // Normalize coordinates\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n};\n\nPoint.prototype.neg = function neg() {\n return this.curve.point(this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg());\n};\n\nPoint.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n};\n\nPoint.prototype.eq = function eq(other) {\n return this === other ||\n this.getX().cmp(other.getX()) === 0 &&\n this.getY().cmp(other.getY()) === 0;\n};\n\nPoint.prototype.eqXToP = function eqXToP(x) {\n var rx = x.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(this.z);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\n// Compatibility with BaseCurve\nPoint.prototype.toP = Point.prototype.normalize;\nPoint.prototype.mixedAdd = Point.prototype.add;\n", "'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n", "'use strict';\n\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar utils = require('../utils');\n\nfunction MontCurve(conf) {\n Base.call(this, 'mont', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n}\ninherits(MontCurve, Base);\nmodule.exports = MontCurve;\n\nMontCurve.prototype.validate = function validate(point) {\n var x = point.normalize().x;\n var x2 = x.redSqr();\n var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);\n var y = rhs.redSqrt();\n\n return y.redSqr().cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, z) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && z === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x, 16);\n this.z = new BN(z, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n}\ninherits(Point, Base.BasePoint);\n\nMontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n};\n\nMontCurve.prototype.point = function point(x, z) {\n return new Point(this, x, z);\n};\n\nMontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nPoint.prototype.precompute = function precompute() {\n // No-op\n};\n\nPoint.prototype._encode = function _encode() {\n return this.getX().toArray('be', this.curve.p.byteLength());\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1] || curve.one);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n\nPoint.prototype.dbl = function dbl() {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3\n // 2M + 2S + 4A\n\n // A = X1 + Z1\n var a = this.x.redAdd(this.z);\n // AA = A^2\n var aa = a.redSqr();\n // B = X1 - Z1\n var b = this.x.redSub(this.z);\n // BB = B^2\n var bb = b.redSqr();\n // C = AA - BB\n var c = aa.redSub(bb);\n // X3 = AA * BB\n var nx = aa.redMul(bb);\n // Z3 = C * (BB + A24 * C)\n var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.add = function add() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.diffAdd = function diffAdd(p, diff) {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3\n // 4M + 2S + 6A\n\n // A = X2 + Z2\n var a = this.x.redAdd(this.z);\n // B = X2 - Z2\n var b = this.x.redSub(this.z);\n // C = X3 + Z3\n var c = p.x.redAdd(p.z);\n // D = X3 - Z3\n var d = p.x.redSub(p.z);\n // DA = D * A\n var da = d.redMul(a);\n // CB = C * B\n var cb = c.redMul(b);\n // X5 = Z1 * (DA + CB)^2\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n // Z5 = X1 * (DA - CB)^2\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.mul = function mul(k) {\n var t = k.clone();\n var a = this; // (N / 2) * Q + Q\n var b = this.curve.point(null, null); // (N / 2) * Q\n var c = this; // Q\n\n for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))\n bits.push(t.andln(1));\n\n for (var i = bits.length - 1; i >= 0; i--) {\n if (bits[i] === 0) {\n // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q\n a = a.diffAdd(b, c);\n // N * Q = 2 * ((N / 2) * Q + Q))\n b = b.dbl();\n } else {\n // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)\n b = a.diffAdd(b, c);\n // N * Q + Q = 2 * ((N / 2) * Q + Q)\n a = a.dbl();\n }\n }\n return b;\n};\n\nPoint.prototype.mulAdd = function mulAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.jumlAdd = function jumlAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n};\n\nPoint.prototype.normalize = function normalize() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n};\n\nPoint.prototype.getX = function getX() {\n // Normalize coordinates\n this.normalize();\n\n return this.x.fromRed();\n};\n", "'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n", "'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n", "'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n", "'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n", "'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n", "'use strict';\n\nvar hash = require('hash.js');\nvar curves = require('../curves');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EDDSA(curve) {\n assert(curve === 'ed25519', 'only tested with ed25519 so far');\n\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash.sha512;\n}\n\nmodule.exports = EDDSA;\n\n/**\n* @param {Array|String} message - message bytes\n* @param {Array|String|KeyPair} secret - secret bytes or a keypair\n* @returns {Signature} - signature\n*/\nEDDSA.prototype.sign = function sign(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r = this.hashInt(key.messagePrefix(), message);\n var R = this.g.mul(r);\n var Rencoded = this.encodePoint(R);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message)\n .mul(key.priv());\n var S = r.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });\n};\n\n/**\n* @param {Array} message - message bytes\n* @param {Array|String|Signature} sig - sig bytes\n* @param {Array|String|Point|KeyPair} pub - public key\n* @returns {Boolean} - true if public key matches sig of message\n*/\nEDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n var key = this.keyFromPublic(pub);\n var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h));\n return RplusAh.eq(SG);\n};\n\nEDDSA.prototype.hashInt = function hashInt() {\n var hash = this.hash();\n for (var i = 0; i < arguments.length; i++)\n hash.update(arguments[i]);\n return utils.intFromLE(hash.digest()).umod(this.curve.n);\n};\n\nEDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n};\n\nEDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n};\n\nEDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature)\n return sig;\n return new Signature(this, sig);\n};\n\n/**\n* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2\n*\n* EDDSA defines methods for encoding and decoding points and integers. These are\n* helper convenience methods, that pass along to utility functions implied\n* parameters.\n*\n*/\nEDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray('le', this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;\n return enc;\n};\n\nEDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);\n var xIsOdd = (bytes[lastIx] & 0x80) !== 0;\n\n var y = utils.intFromLE(normed);\n return this.curve.pointFromY(y, xIsOdd);\n};\n\nEDDSA.prototype.encodeInt = function encodeInt(num) {\n return num.toArray('le', this.encodingLength);\n};\n\nEDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n};\n\nEDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n};\n", "'use strict';\n\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar cachedProperty = utils.cachedProperty;\n\n/**\n* @param {EDDSA} eddsa - instance\n* @param {Object} params - public/private key parameters\n*\n* @param {Array} [params.secret] - secret seed bytes\n* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)\n* @param {Array} [params.pub] - public key point encoded as bytes\n*\n*/\nfunction KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n}\n\nKeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub: pub });\n};\n\nKeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret: secret });\n};\n\nKeyPair.prototype.secret = function secret() {\n return this._secret;\n};\n\ncachedProperty(KeyPair, 'pubBytes', function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n});\n\ncachedProperty(KeyPair, 'pub', function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n});\n\ncachedProperty(KeyPair, 'privBytes', function privBytes() {\n var eddsa = this.eddsa;\n var hash = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n\n var a = hash.slice(0, eddsa.encodingLength);\n a[0] &= 248;\n a[lastIx] &= 127;\n a[lastIx] |= 64;\n\n return a;\n});\n\ncachedProperty(KeyPair, 'priv', function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n});\n\ncachedProperty(KeyPair, 'hash', function hash() {\n return this.eddsa.hash().update(this.secret()).digest();\n});\n\ncachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n});\n\nKeyPair.prototype.sign = function sign(message) {\n assert(this._secret, 'KeyPair can only verify');\n return this.eddsa.sign(message, this);\n};\n\nKeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n};\n\nKeyPair.prototype.getSecret = function getSecret(enc) {\n assert(this._secret, 'KeyPair is public only');\n return utils.encode(this.secret(), enc);\n};\n\nKeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n};\n\nmodule.exports = KeyPair;\n", "'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar cachedProperty = utils.cachedProperty;\nvar parseBytes = utils.parseBytes;\n\n/**\n* @param {EDDSA} eddsa - eddsa instance\n* @param {Array|Object} sig -\n* @param {Array|Point} [sig.R] - R point as Point or bytes\n* @param {Array|bn} [sig.S] - S scalar as bn or bytes\n* @param {Array} [sig.Rencoded] - R point encoded\n* @param {Array} [sig.Sencoded] - S scalar encoded\n*/\nfunction Signature(eddsa, sig) {\n this.eddsa = eddsa;\n\n if (typeof sig !== 'object')\n sig = parseBytes(sig);\n\n if (Array.isArray(sig)) {\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength),\n };\n }\n\n assert(sig.R && sig.S, 'Signature without R or S');\n\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n}\n\ncachedProperty(Signature, 'S', function S() {\n return this.eddsa.decodeInt(this.Sencoded());\n});\n\ncachedProperty(Signature, 'R', function R() {\n return this.eddsa.decodePoint(this.Rencoded());\n});\n\ncachedProperty(Signature, 'Rencoded', function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n});\n\ncachedProperty(Signature, 'Sencoded', function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n});\n\nSignature.prototype.toBytes = function toBytes() {\n return this.Rencoded().concat(this.Sencoded());\n};\n\nSignature.prototype.toHex = function toHex() {\n return utils.encode(this.toBytes(), 'hex').toUpperCase();\n};\n\nmodule.exports = Signature;\n", "module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',\n 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821',\n ],\n [\n '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',\n '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf',\n ],\n [\n '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',\n 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695',\n ],\n [\n '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',\n '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9',\n ],\n [\n '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',\n '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36',\n ],\n [\n '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',\n '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f',\n ],\n [\n 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',\n '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999',\n ],\n [\n '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',\n 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09',\n ],\n [\n 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',\n '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d',\n ],\n [\n 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',\n 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088',\n ],\n [\n 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',\n '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d',\n ],\n [\n '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',\n '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8',\n ],\n [\n '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',\n '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a',\n ],\n [\n '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',\n '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453',\n ],\n [\n '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',\n '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160',\n ],\n [\n '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',\n '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0',\n ],\n [\n '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',\n '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6',\n ],\n [\n '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',\n '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589',\n ],\n [\n '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',\n 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17',\n ],\n [\n 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',\n '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda',\n ],\n [\n 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',\n '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd',\n ],\n [\n '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',\n '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2',\n ],\n [\n '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',\n '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6',\n ],\n [\n 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',\n '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f',\n ],\n [\n '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',\n 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01',\n ],\n [\n 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',\n '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3',\n ],\n [\n 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',\n 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f',\n ],\n [\n 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',\n '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7',\n ],\n [\n 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',\n 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78',\n ],\n [\n 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',\n '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1',\n ],\n [\n '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',\n 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150',\n ],\n [\n '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',\n '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82',\n ],\n [\n 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',\n '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc',\n ],\n [\n '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',\n 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b',\n ],\n [\n 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',\n '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51',\n ],\n [\n 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',\n '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45',\n ],\n [\n 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',\n 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120',\n ],\n [\n '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',\n '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84',\n ],\n [\n '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',\n '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d',\n ],\n [\n '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',\n 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d',\n ],\n [\n '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',\n '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8',\n ],\n [\n 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',\n '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8',\n ],\n [\n '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',\n '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac',\n ],\n [\n '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',\n 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f',\n ],\n [\n '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',\n '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962',\n ],\n [\n 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',\n '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907',\n ],\n [\n '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',\n 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec',\n ],\n [\n 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',\n 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d',\n ],\n [\n 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',\n '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414',\n ],\n [\n '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',\n 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd',\n ],\n [\n '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',\n 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0',\n ],\n [\n 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',\n '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811',\n ],\n [\n 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',\n '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1',\n ],\n [\n 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',\n '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c',\n ],\n [\n '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',\n 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73',\n ],\n [\n '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',\n '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd',\n ],\n [\n 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',\n 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405',\n ],\n [\n '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',\n 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589',\n ],\n [\n '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',\n '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e',\n ],\n [\n '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',\n '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27',\n ],\n [\n 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',\n 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1',\n ],\n [\n '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',\n '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482',\n ],\n [\n '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',\n '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945',\n ],\n [\n 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',\n '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573',\n ],\n [\n 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',\n 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82',\n ],\n ],\n },\n naf: {\n wnd: 7,\n points: [\n [\n 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',\n '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672',\n ],\n [\n '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',\n 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6',\n ],\n [\n '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',\n '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da',\n ],\n [\n 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',\n 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37',\n ],\n [\n '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',\n 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b',\n ],\n [\n 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',\n 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81',\n ],\n [\n 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',\n '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58',\n ],\n [\n 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',\n '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77',\n ],\n [\n '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',\n '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a',\n ],\n [\n '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',\n '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c',\n ],\n [\n '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',\n '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67',\n ],\n [\n '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',\n '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402',\n ],\n [\n 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',\n 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55',\n ],\n [\n 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',\n '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482',\n ],\n [\n '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',\n 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82',\n ],\n [\n '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',\n 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396',\n ],\n [\n '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',\n '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49',\n ],\n [\n '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',\n '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf',\n ],\n [\n '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',\n '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a',\n ],\n [\n '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',\n 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7',\n ],\n [\n 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',\n 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933',\n ],\n [\n '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',\n '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a',\n ],\n [\n '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',\n '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6',\n ],\n [\n 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',\n 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37',\n ],\n [\n '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',\n '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e',\n ],\n [\n 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',\n 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6',\n ],\n [\n 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',\n 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476',\n ],\n [\n '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',\n '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40',\n ],\n [\n '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',\n '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61',\n ],\n [\n '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',\n '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683',\n ],\n [\n 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',\n '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5',\n ],\n [\n '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',\n '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b',\n ],\n [\n 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',\n '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417',\n ],\n [\n '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',\n 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868',\n ],\n [\n '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',\n 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a',\n ],\n [\n 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',\n 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6',\n ],\n [\n '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',\n '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996',\n ],\n [\n '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',\n 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e',\n ],\n [\n 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',\n 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d',\n ],\n [\n '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',\n '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2',\n ],\n [\n '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',\n 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e',\n ],\n [\n '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',\n '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437',\n ],\n [\n '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',\n 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311',\n ],\n [\n 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',\n '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4',\n ],\n [\n '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',\n '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575',\n ],\n [\n '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',\n 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d',\n ],\n [\n '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',\n 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d',\n ],\n [\n 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',\n 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629',\n ],\n [\n 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',\n 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06',\n ],\n [\n '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',\n '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374',\n ],\n [\n '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',\n '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee',\n ],\n [\n 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',\n '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1',\n ],\n [\n 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',\n 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b',\n ],\n [\n '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',\n '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661',\n ],\n [\n '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',\n '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6',\n ],\n [\n 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',\n '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e',\n ],\n [\n '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',\n '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d',\n ],\n [\n 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',\n 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc',\n ],\n [\n '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',\n 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4',\n ],\n [\n '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',\n '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c',\n ],\n [\n 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',\n '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b',\n ],\n [\n 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',\n '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913',\n ],\n [\n '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',\n '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154',\n ],\n [\n '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',\n '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865',\n ],\n [\n '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',\n 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc',\n ],\n [\n '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',\n 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224',\n ],\n [\n '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',\n '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e',\n ],\n [\n '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',\n '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6',\n ],\n [\n '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',\n '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511',\n ],\n [\n '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',\n 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b',\n ],\n [\n 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',\n 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2',\n ],\n [\n '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',\n 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c',\n ],\n [\n 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',\n '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3',\n ],\n [\n 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',\n '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d',\n ],\n [\n 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',\n '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700',\n ],\n [\n 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',\n '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4',\n ],\n [\n '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',\n 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196',\n ],\n [\n '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',\n '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4',\n ],\n [\n '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',\n 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257',\n ],\n [\n 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',\n 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13',\n ],\n [\n 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',\n '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096',\n ],\n [\n 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',\n 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38',\n ],\n [\n 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',\n '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f',\n ],\n [\n '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',\n '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448',\n ],\n [\n 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',\n '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a',\n ],\n [\n 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',\n '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4',\n ],\n [\n '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',\n '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437',\n ],\n [\n '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',\n 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7',\n ],\n [\n 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',\n '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d',\n ],\n [\n 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',\n '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a',\n ],\n [\n 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',\n '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54',\n ],\n [\n '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',\n '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77',\n ],\n [\n 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',\n 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517',\n ],\n [\n '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',\n 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10',\n ],\n [\n 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',\n 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125',\n ],\n [\n 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',\n '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e',\n ],\n [\n '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',\n 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1',\n ],\n [\n 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',\n '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2',\n ],\n [\n 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',\n '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423',\n ],\n [\n 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',\n '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8',\n ],\n [\n '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',\n 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758',\n ],\n [\n '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',\n 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375',\n ],\n [\n 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',\n '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d',\n ],\n [\n '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',\n 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec',\n ],\n [\n '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',\n '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0',\n ],\n [\n '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',\n 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c',\n ],\n [\n 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',\n 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4',\n ],\n [\n '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',\n 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f',\n ],\n [\n '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',\n '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649',\n ],\n [\n '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',\n 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826',\n ],\n [\n '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',\n '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5',\n ],\n [\n 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',\n 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87',\n ],\n [\n '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',\n '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b',\n ],\n [\n 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',\n '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc',\n ],\n [\n '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',\n '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c',\n ],\n [\n 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',\n 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f',\n ],\n [\n 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',\n '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a',\n ],\n [\n 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',\n 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46',\n ],\n [\n '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',\n 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f',\n ],\n [\n '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',\n '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03',\n ],\n [\n '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',\n 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08',\n ],\n [\n '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',\n '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8',\n ],\n [\n '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',\n '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373',\n ],\n [\n '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',\n 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3',\n ],\n [\n '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',\n '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8',\n ],\n [\n '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',\n '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1',\n ],\n [\n '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',\n '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9',\n ],\n ],\n },\n};\n", "'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n", "'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n", "'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n", "'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n", "'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n", "'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n", "'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n", "'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n", "'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n", "'use strict'\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('readable-stream').Transform\nvar inherits = require('inherits')\n\nfunction throwIfNotStringOrBuffer (val, prefix) {\n if (!Buffer.isBuffer(val) && typeof val !== 'string') {\n throw new TypeError(prefix + ' must be a string or a buffer')\n }\n}\n\nfunction HashBase (blockSize) {\n Transform.call(this)\n\n this._block = Buffer.allocUnsafe(blockSize)\n this._blockSize = blockSize\n this._blockOffset = 0\n this._length = [0, 0, 0, 0]\n\n this._finalized = false\n}\n\ninherits(HashBase, Transform)\n\nHashBase.prototype._transform = function (chunk, encoding, callback) {\n var error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype._flush = function (callback) {\n var error = null\n try {\n this.push(this.digest())\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype.update = function (data, encoding) {\n throwIfNotStringOrBuffer(data, 'Data')\n if (this._finalized) throw new Error('Digest already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n // consume data\n var block = this._block\n var offset = 0\n while (this._blockOffset + data.length - offset >= this._blockSize) {\n for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]\n this._update()\n this._blockOffset = 0\n }\n while (offset < data.length) block[this._blockOffset++] = data[offset++]\n\n // update length\n for (var j = 0, carry = data.length * 8; carry > 0; ++j) {\n this._length[j] += carry\n carry = (this._length[j] / 0x0100000000) | 0\n if (carry > 0) this._length[j] -= 0x0100000000 * carry\n }\n\n return this\n}\n\nHashBase.prototype._update = function () {\n throw new Error('_update is not implemented')\n}\n\nHashBase.prototype.digest = function (encoding) {\n if (this._finalized) throw new Error('Digest already called')\n this._finalized = true\n\n var digest = this._digest()\n if (encoding !== undefined) digest = digest.toString(encoding)\n\n // reset state\n this._block.fill(0)\n this._blockOffset = 0\n for (var i = 0; i < 4; ++i) this._length[i] = 0\n\n return digest\n}\n\nHashBase.prototype._digest = function () {\n throw new Error('_digest is not implemented')\n}\n\nmodule.exports = HashBase\n", "var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n", "'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n", "'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n", "'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n", "'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n", "'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n", "'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n", "'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n", "'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n", "'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n", "'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n", "'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n", "'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n", "/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n", "if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n", "'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n", "'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n", "'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n", "'use strict';\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n", "'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n", "'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n", "'use strict';\n\nvar whichTypedArray = require('which-typed-array');\n\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n", "module.exports = Long;\r\n\r\n/**\r\n * wasm optimizations, to do native i64 multiplication and divide\r\n */\r\nvar wasm = null;\r\n\r\ntry {\r\n wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\r\n 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11\r\n ])), {}).exports;\r\n} catch (e) {\r\n // no wasm support :(\r\n}\r\n\r\n/**\r\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\r\n * See the from* functions below for more convenient ways of constructing Longs.\r\n * @exports Long\r\n * @class A Long class for representing a 64 bit two's-complement integer value.\r\n * @param {number} low The low (signed) 32 bits of the long\r\n * @param {number} high The high (signed) 32 bits of the long\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @constructor\r\n */\r\nfunction Long(low, high, unsigned) {\r\n\r\n /**\r\n * The low 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.low = low | 0;\r\n\r\n /**\r\n * The high 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.high = high | 0;\r\n\r\n /**\r\n * Whether unsigned or not.\r\n * @type {boolean}\r\n */\r\n this.unsigned = !!unsigned;\r\n}\r\n\r\n// The internal representation of a long is the two given signed, 32-bit values.\r\n// We use 32-bit pieces because these are the size of integers on which\r\n// Javascript performs bit-operations. For operations like addition and\r\n// multiplication, we split each number into 16 bit pieces, which can easily be\r\n// multiplied within Javascript's floating-point representation without overflow\r\n// or change in sign.\r\n//\r\n// In the algorithms below, we frequently reduce the negative case to the\r\n// positive case by negating the input(s) and then post-processing the result.\r\n// Note that we must ALWAYS check specially whether those values are MIN_VALUE\r\n// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\r\n// a positive number, it overflows back into a negative). Not handling this\r\n// case would often result in infinite recursion.\r\n//\r\n// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\r\n// methods on which they depend.\r\n\r\n/**\r\n * An indicator used to reliably determine if an object is a Long or not.\r\n * @type {boolean}\r\n * @const\r\n * @private\r\n */\r\nLong.prototype.__isLong__;\r\n\r\nObject.defineProperty(Long.prototype, \"__isLong__\", { value: true });\r\n\r\n/**\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n * @inner\r\n */\r\nfunction isLong(obj) {\r\n return (obj && obj[\"__isLong__\"]) === true;\r\n}\r\n\r\n/**\r\n * Tests if the specified object is a Long.\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n */\r\nLong.isLong = isLong;\r\n\r\n/**\r\n * A cache of the Long representations of small integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\nvar INT_CACHE = {};\r\n\r\n/**\r\n * A cache of the Long representations of small unsigned integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\nvar UINT_CACHE = {};\r\n\r\n/**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromInt(value, unsigned) {\r\n var obj, cachedObj, cache;\r\n if (unsigned) {\r\n value >>>= 0;\r\n if (cache = (0 <= value && value < 256)) {\r\n cachedObj = UINT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\r\n if (cache)\r\n UINT_CACHE[value] = obj;\r\n return obj;\r\n } else {\r\n value |= 0;\r\n if (cache = (-128 <= value && value < 128)) {\r\n cachedObj = INT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, value < 0 ? -1 : 0, false);\r\n if (cache)\r\n INT_CACHE[value] = obj;\r\n return obj;\r\n }\r\n}\r\n\r\n/**\r\n * Returns a Long representing the given 32 bit integer value.\r\n * @function\r\n * @param {number} value The 32 bit integer in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromInt = fromInt;\r\n\r\n/**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromNumber(value, unsigned) {\r\n if (isNaN(value))\r\n return unsigned ? UZERO : ZERO;\r\n if (unsigned) {\r\n if (value < 0)\r\n return UZERO;\r\n if (value >= TWO_PWR_64_DBL)\r\n return MAX_UNSIGNED_VALUE;\r\n } else {\r\n if (value <= -TWO_PWR_63_DBL)\r\n return MIN_VALUE;\r\n if (value + 1 >= TWO_PWR_63_DBL)\r\n return MAX_VALUE;\r\n }\r\n if (value < 0)\r\n return fromNumber(-value, unsigned).neg();\r\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\r\n}\r\n\r\n/**\r\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\r\n * @function\r\n * @param {number} value The number in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromNumber = fromNumber;\r\n\r\n/**\r\n * @param {number} lowBits\r\n * @param {number} highBits\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromBits(lowBits, highBits, unsigned) {\r\n return new Long(lowBits, highBits, unsigned);\r\n}\r\n\r\n/**\r\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\r\n * assumed to use 32 bits.\r\n * @function\r\n * @param {number} lowBits The low 32 bits\r\n * @param {number} highBits The high 32 bits\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromBits = fromBits;\r\n\r\n/**\r\n * @function\r\n * @param {number} base\r\n * @param {number} exponent\r\n * @returns {number}\r\n * @inner\r\n */\r\nvar pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\r\n\r\n/**\r\n * @param {string} str\r\n * @param {(boolean|number)=} unsigned\r\n * @param {number=} radix\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromString(str, unsigned, radix) {\r\n if (str.length === 0)\r\n throw Error('empty string');\r\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\r\n return ZERO;\r\n if (typeof unsigned === 'number') {\r\n // For goog.math.long compatibility\r\n radix = unsigned,\r\n unsigned = false;\r\n } else {\r\n unsigned = !! unsigned;\r\n }\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n\r\n var p;\r\n if ((p = str.indexOf('-')) > 0)\r\n throw Error('interior hyphen');\r\n else if (p === 0) {\r\n return fromString(str.substring(1), unsigned, radix).neg();\r\n }\r\n\r\n // Do several (8) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 8));\r\n\r\n var result = ZERO;\r\n for (var i = 0; i < str.length; i += 8) {\r\n var size = Math.min(8, str.length - i),\r\n value = parseInt(str.substring(i, i + size), radix);\r\n if (size < 8) {\r\n var power = fromNumber(pow_dbl(radix, size));\r\n result = result.mul(power).add(fromNumber(value));\r\n } else {\r\n result = result.mul(radixToPower);\r\n result = result.add(fromNumber(value));\r\n }\r\n }\r\n result.unsigned = unsigned;\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns a Long representation of the given string, written using the specified radix.\r\n * @function\r\n * @param {string} str The textual representation of the Long\r\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\r\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromString = fromString;\r\n\r\n/**\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromValue(val, unsigned) {\r\n if (typeof val === 'number')\r\n return fromNumber(val, unsigned);\r\n if (typeof val === 'string')\r\n return fromString(val, unsigned);\r\n // Throws for non-objects, converts non-instanceof Long:\r\n return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);\r\n}\r\n\r\n/**\r\n * Converts the specified value to a Long using the appropriate from* function for its type.\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long}\r\n */\r\nLong.fromValue = fromValue;\r\n\r\n// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\r\n// no runtime penalty for these.\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_16_DBL = 1 << 16;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_24_DBL = 1 << 24;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\r\n\r\n/**\r\n * @type {!Long}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar ZERO = fromInt(0);\r\n\r\n/**\r\n * Signed zero.\r\n * @type {!Long}\r\n */\r\nLong.ZERO = ZERO;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar UZERO = fromInt(0, true);\r\n\r\n/**\r\n * Unsigned zero.\r\n * @type {!Long}\r\n */\r\nLong.UZERO = UZERO;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar ONE = fromInt(1);\r\n\r\n/**\r\n * Signed one.\r\n * @type {!Long}\r\n */\r\nLong.ONE = ONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar UONE = fromInt(1, true);\r\n\r\n/**\r\n * Unsigned one.\r\n * @type {!Long}\r\n */\r\nLong.UONE = UONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar NEG_ONE = fromInt(-1);\r\n\r\n/**\r\n * Signed negative one.\r\n * @type {!Long}\r\n */\r\nLong.NEG_ONE = NEG_ONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false);\r\n\r\n/**\r\n * Maximum signed value.\r\n * @type {!Long}\r\n */\r\nLong.MAX_VALUE = MAX_VALUE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true);\r\n\r\n/**\r\n * Maximum unsigned value.\r\n * @type {!Long}\r\n */\r\nLong.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MIN_VALUE = fromBits(0, 0x80000000|0, false);\r\n\r\n/**\r\n * Minimum signed value.\r\n * @type {!Long}\r\n */\r\nLong.MIN_VALUE = MIN_VALUE;\r\n\r\n/**\r\n * @alias Long.prototype\r\n * @inner\r\n */\r\nvar LongPrototype = Long.prototype;\r\n\r\n/**\r\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\r\n * @returns {number}\r\n */\r\nLongPrototype.toInt = function toInt() {\r\n return this.unsigned ? this.low >>> 0 : this.low;\r\n};\r\n\r\n/**\r\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\r\n * @returns {number}\r\n */\r\nLongPrototype.toNumber = function toNumber() {\r\n if (this.unsigned)\r\n return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\r\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\r\n};\r\n\r\n/**\r\n * Converts the Long to a string written in the specified radix.\r\n * @param {number=} radix Radix (2-36), defaults to 10\r\n * @returns {string}\r\n * @override\r\n * @throws {RangeError} If `radix` is out of range\r\n */\r\nLongPrototype.toString = function toString(radix) {\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n if (this.isZero())\r\n return '0';\r\n if (this.isNegative()) { // Unsigned Longs are never negative\r\n if (this.eq(MIN_VALUE)) {\r\n // We need to change the Long value before it can be negated, so we remove\r\n // the bottom-most digit in this base and then recurse to do the rest.\r\n var radixLong = fromNumber(radix),\r\n div = this.div(radixLong),\r\n rem1 = div.mul(radixLong).sub(this);\r\n return div.toString(radix) + rem1.toInt().toString(radix);\r\n } else\r\n return '-' + this.neg().toString(radix);\r\n }\r\n\r\n // Do several (6) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\r\n rem = this;\r\n var result = '';\r\n while (true) {\r\n var remDiv = rem.div(radixToPower),\r\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\r\n digits = intval.toString(radix);\r\n rem = remDiv;\r\n if (rem.isZero())\r\n return digits + result;\r\n else {\r\n while (digits.length < 6)\r\n digits = '0' + digits;\r\n result = '' + digits + result;\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Gets the high 32 bits as a signed integer.\r\n * @returns {number} Signed high bits\r\n */\r\nLongPrototype.getHighBits = function getHighBits() {\r\n return this.high;\r\n};\r\n\r\n/**\r\n * Gets the high 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned high bits\r\n */\r\nLongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\r\n return this.high >>> 0;\r\n};\r\n\r\n/**\r\n * Gets the low 32 bits as a signed integer.\r\n * @returns {number} Signed low bits\r\n */\r\nLongPrototype.getLowBits = function getLowBits() {\r\n return this.low;\r\n};\r\n\r\n/**\r\n * Gets the low 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned low bits\r\n */\r\nLongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\r\n return this.low >>> 0;\r\n};\r\n\r\n/**\r\n * Gets the number of bits needed to represent the absolute value of this Long.\r\n * @returns {number}\r\n */\r\nLongPrototype.getNumBitsAbs = function getNumBitsAbs() {\r\n if (this.isNegative()) // Unsigned Longs are never negative\r\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\r\n var val = this.high != 0 ? this.high : this.low;\r\n for (var bit = 31; bit > 0; bit--)\r\n if ((val & (1 << bit)) != 0)\r\n break;\r\n return this.high != 0 ? bit + 33 : bit + 1;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals zero.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isZero = function isZero() {\r\n return this.high === 0 && this.low === 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.eqz = LongPrototype.isZero;\r\n\r\n/**\r\n * Tests if this Long's value is negative.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isNegative = function isNegative() {\r\n return !this.unsigned && this.high < 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is positive.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isPositive = function isPositive() {\r\n return this.unsigned || this.high >= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is odd.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isOdd = function isOdd() {\r\n return (this.low & 1) === 1;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is even.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isEven = function isEven() {\r\n return (this.low & 1) === 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.equals = function equals(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\r\n return false;\r\n return this.high === other.high && this.low === other.low;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.eq = LongPrototype.equals;\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.notEquals = function notEquals(other) {\r\n return !this.eq(/* validates */ other);\r\n};\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.neq = LongPrototype.notEquals;\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.ne = LongPrototype.notEquals;\r\n\r\n/**\r\n * Tests if this Long's value is less than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lessThan = function lessThan(other) {\r\n return this.comp(/* validates */ other) < 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lt = LongPrototype.lessThan;\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\r\n return this.comp(/* validates */ other) <= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lte = LongPrototype.lessThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.le = LongPrototype.lessThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is greater than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.greaterThan = function greaterThan(other) {\r\n return this.comp(/* validates */ other) > 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.gt = LongPrototype.greaterThan;\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\r\n return this.comp(/* validates */ other) >= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.gte = LongPrototype.greaterThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.ge = LongPrototype.greaterThanOrEqual;\r\n\r\n/**\r\n * Compares this Long's value with the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\nLongPrototype.compare = function compare(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.eq(other))\r\n return 0;\r\n var thisNeg = this.isNegative(),\r\n otherNeg = other.isNegative();\r\n if (thisNeg && !otherNeg)\r\n return -1;\r\n if (!thisNeg && otherNeg)\r\n return 1;\r\n // At this point the sign bits are the same\r\n if (!this.unsigned)\r\n return this.sub(other).isNegative() ? -1 : 1;\r\n // Both are positive if at least one is unsigned\r\n return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\r\n};\r\n\r\n/**\r\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\nLongPrototype.comp = LongPrototype.compare;\r\n\r\n/**\r\n * Negates this Long's value.\r\n * @returns {!Long} Negated Long\r\n */\r\nLongPrototype.negate = function negate() {\r\n if (!this.unsigned && this.eq(MIN_VALUE))\r\n return MIN_VALUE;\r\n return this.not().add(ONE);\r\n};\r\n\r\n/**\r\n * Negates this Long's value. This is an alias of {@link Long#negate}.\r\n * @function\r\n * @returns {!Long} Negated Long\r\n */\r\nLongPrototype.neg = LongPrototype.negate;\r\n\r\n/**\r\n * Returns the sum of this and the specified Long.\r\n * @param {!Long|number|string} addend Addend\r\n * @returns {!Long} Sum\r\n */\r\nLongPrototype.add = function add(addend) {\r\n if (!isLong(addend))\r\n addend = fromValue(addend);\r\n\r\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = addend.high >>> 16;\r\n var b32 = addend.high & 0xFFFF;\r\n var b16 = addend.low >>> 16;\r\n var b00 = addend.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 + b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 + b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 + b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 + b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the difference of this and the specified Long.\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\nLongPrototype.subtract = function subtract(subtrahend) {\r\n if (!isLong(subtrahend))\r\n subtrahend = fromValue(subtrahend);\r\n return this.add(subtrahend.neg());\r\n};\r\n\r\n/**\r\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\r\n * @function\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\nLongPrototype.sub = LongPrototype.subtract;\r\n\r\n/**\r\n * Returns the product of this and the specified Long.\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\nLongPrototype.multiply = function multiply(multiplier) {\r\n if (this.isZero())\r\n return ZERO;\r\n if (!isLong(multiplier))\r\n multiplier = fromValue(multiplier);\r\n\r\n // use wasm support if present\r\n if (wasm) {\r\n var low = wasm.mul(this.low,\r\n this.high,\r\n multiplier.low,\r\n multiplier.high);\r\n return fromBits(low, wasm.get_high(), this.unsigned);\r\n }\r\n\r\n if (multiplier.isZero())\r\n return ZERO;\r\n if (this.eq(MIN_VALUE))\r\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\r\n if (multiplier.eq(MIN_VALUE))\r\n return this.isOdd() ? MIN_VALUE : ZERO;\r\n\r\n if (this.isNegative()) {\r\n if (multiplier.isNegative())\r\n return this.neg().mul(multiplier.neg());\r\n else\r\n return this.neg().mul(multiplier).neg();\r\n } else if (multiplier.isNegative())\r\n return this.mul(multiplier.neg()).neg();\r\n\r\n // If both longs are small, use float multiplication\r\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\r\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\r\n\r\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\r\n // We can skip products that would overflow.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = multiplier.high >>> 16;\r\n var b32 = multiplier.high & 0xFFFF;\r\n var b16 = multiplier.low >>> 16;\r\n var b00 = multiplier.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 * b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 * b00;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c16 += a00 * b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 * b00;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a16 * b16;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a00 * b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\r\n * @function\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\nLongPrototype.mul = LongPrototype.multiply;\r\n\r\n/**\r\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\r\n * unsigned if this Long is unsigned.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\nLongPrototype.divide = function divide(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n if (divisor.isZero())\r\n throw Error('division by zero');\r\n\r\n // use wasm support if present\r\n if (wasm) {\r\n // guard against signed division overflow: the largest\r\n // negative number / -1 would be 1 larger than the largest\r\n // positive number, due to two's complement.\r\n if (!this.unsigned &&\r\n this.high === -0x80000000 &&\r\n divisor.low === -1 && divisor.high === -1) {\r\n // be consistent with non-wasm code path\r\n return this;\r\n }\r\n var low = (this.unsigned ? wasm.div_u : wasm.div_s)(\r\n this.low,\r\n this.high,\r\n divisor.low,\r\n divisor.high\r\n );\r\n return fromBits(low, wasm.get_high(), this.unsigned);\r\n }\r\n\r\n if (this.isZero())\r\n return this.unsigned ? UZERO : ZERO;\r\n var approx, rem, res;\r\n if (!this.unsigned) {\r\n // This section is only relevant for signed longs and is derived from the\r\n // closure library as a whole.\r\n if (this.eq(MIN_VALUE)) {\r\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\r\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\r\n else if (divisor.eq(MIN_VALUE))\r\n return ONE;\r\n else {\r\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\r\n var halfThis = this.shr(1);\r\n approx = halfThis.div(divisor).shl(1);\r\n if (approx.eq(ZERO)) {\r\n return divisor.isNegative() ? ONE : NEG_ONE;\r\n } else {\r\n rem = this.sub(divisor.mul(approx));\r\n res = approx.add(rem.div(divisor));\r\n return res;\r\n }\r\n }\r\n } else if (divisor.eq(MIN_VALUE))\r\n return this.unsigned ? UZERO : ZERO;\r\n if (this.isNegative()) {\r\n if (divisor.isNegative())\r\n return this.neg().div(divisor.neg());\r\n return this.neg().div(divisor).neg();\r\n } else if (divisor.isNegative())\r\n return this.div(divisor.neg()).neg();\r\n res = ZERO;\r\n } else {\r\n // The algorithm below has not been made for unsigned longs. It's therefore\r\n // required to take special care of the MSB prior to running it.\r\n if (!divisor.unsigned)\r\n divisor = divisor.toUnsigned();\r\n if (divisor.gt(this))\r\n return UZERO;\r\n if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\r\n return UONE;\r\n res = UZERO;\r\n }\r\n\r\n // Repeat the following until the remainder is less than other: find a\r\n // floating-point that approximates remainder / other *from below*, add this\r\n // into the result, and subtract it from the remainder. It is critical that\r\n // the approximate value is less than or equal to the real value so that the\r\n // remainder never becomes negative.\r\n rem = this;\r\n while (rem.gte(divisor)) {\r\n // Approximate the result of division. This may be a little greater or\r\n // smaller than the actual value.\r\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\r\n\r\n // We will tweak the approximate result by changing it in the 48-th digit or\r\n // the smallest non-fractional digit, whichever is larger.\r\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\r\n delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\r\n\r\n // Decrease the approximation until it is smaller than the remainder. Note\r\n // that if it is too large, the product overflows and is negative.\r\n approxRes = fromNumber(approx),\r\n approxRem = approxRes.mul(divisor);\r\n while (approxRem.isNegative() || approxRem.gt(rem)) {\r\n approx -= delta;\r\n approxRes = fromNumber(approx, this.unsigned);\r\n approxRem = approxRes.mul(divisor);\r\n }\r\n\r\n // We know the answer can't be zero... and actually, zero would cause\r\n // infinite recursion since we would make no progress.\r\n if (approxRes.isZero())\r\n approxRes = ONE;\r\n\r\n res = res.add(approxRes);\r\n rem = rem.sub(approxRem);\r\n }\r\n return res;\r\n};\r\n\r\n/**\r\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\nLongPrototype.div = LongPrototype.divide;\r\n\r\n/**\r\n * Returns this Long modulo the specified.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.modulo = function modulo(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n\r\n // use wasm support if present\r\n if (wasm) {\r\n var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(\r\n this.low,\r\n this.high,\r\n divisor.low,\r\n divisor.high\r\n );\r\n return fromBits(low, wasm.get_high(), this.unsigned);\r\n }\r\n\r\n return this.sub(this.div(divisor).mul(divisor));\r\n};\r\n\r\n/**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.mod = LongPrototype.modulo;\r\n\r\n/**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.rem = LongPrototype.modulo;\r\n\r\n/**\r\n * Returns the bitwise NOT of this Long.\r\n * @returns {!Long}\r\n */\r\nLongPrototype.not = function not() {\r\n return fromBits(~this.low, ~this.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise AND of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.and = function and(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise OR of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.or = function or(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise XOR of this Long and the given one.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.xor = function xor(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits shifted to the left by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftLeft = function shiftLeft(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\r\n else\r\n return fromBits(0, this.low << (numBits - 32), this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shl = LongPrototype.shiftLeft;\r\n\r\n/**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftRight = function shiftRight(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\r\n else\r\n return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shr = LongPrototype.shiftRight;\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n numBits &= 63;\r\n if (numBits === 0)\r\n return this;\r\n else {\r\n var high = this.high;\r\n if (numBits < 32) {\r\n var low = this.low;\r\n return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);\r\n } else if (numBits === 32)\r\n return fromBits(high, 0, this.unsigned);\r\n else\r\n return fromBits(high >>> (numBits - 32), 0, this.unsigned);\r\n }\r\n};\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shru = LongPrototype.shiftRightUnsigned;\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\r\n\r\n/**\r\n * Converts this Long to signed.\r\n * @returns {!Long} Signed long\r\n */\r\nLongPrototype.toSigned = function toSigned() {\r\n if (!this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, false);\r\n};\r\n\r\n/**\r\n * Converts this Long to unsigned.\r\n * @returns {!Long} Unsigned long\r\n */\r\nLongPrototype.toUnsigned = function toUnsigned() {\r\n if (this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, true);\r\n};\r\n\r\n/**\r\n * Converts this Long to its byte representation.\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {!Array.} Byte representation\r\n */\r\nLongPrototype.toBytes = function toBytes(le) {\r\n return le ? this.toBytesLE() : this.toBytesBE();\r\n};\r\n\r\n/**\r\n * Converts this Long to its little endian byte representation.\r\n * @returns {!Array.} Little endian byte representation\r\n */\r\nLongPrototype.toBytesLE = function toBytesLE() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n lo & 0xff,\r\n lo >>> 8 & 0xff,\r\n lo >>> 16 & 0xff,\r\n lo >>> 24 ,\r\n hi & 0xff,\r\n hi >>> 8 & 0xff,\r\n hi >>> 16 & 0xff,\r\n hi >>> 24\r\n ];\r\n};\r\n\r\n/**\r\n * Converts this Long to its big endian byte representation.\r\n * @returns {!Array.} Big endian byte representation\r\n */\r\nLongPrototype.toBytesBE = function toBytesBE() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n hi >>> 24 ,\r\n hi >>> 16 & 0xff,\r\n hi >>> 8 & 0xff,\r\n hi & 0xff,\r\n lo >>> 24 ,\r\n lo >>> 16 & 0xff,\r\n lo >>> 8 & 0xff,\r\n lo & 0xff\r\n ];\r\n};\r\n\r\n/**\r\n * Creates a Long from its byte representation.\r\n * @param {!Array.} bytes Byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytes = function fromBytes(bytes, unsigned, le) {\r\n return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);\r\n};\r\n\r\n/**\r\n * Creates a Long from its little endian byte representation.\r\n * @param {!Array.} bytes Little endian byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytesLE = function fromBytesLE(bytes, unsigned) {\r\n return new Long(\r\n bytes[0] |\r\n bytes[1] << 8 |\r\n bytes[2] << 16 |\r\n bytes[3] << 24,\r\n bytes[4] |\r\n bytes[5] << 8 |\r\n bytes[6] << 16 |\r\n bytes[7] << 24,\r\n unsigned\r\n );\r\n};\r\n\r\n/**\r\n * Creates a Long from its big endian byte representation.\r\n * @param {!Array.} bytes Big endian byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytesBE = function fromBytesBE(bytes, unsigned) {\r\n return new Long(\r\n bytes[4] << 24 |\r\n bytes[5] << 16 |\r\n bytes[6] << 8 |\r\n bytes[7],\r\n bytes[0] << 24 |\r\n bytes[1] << 16 |\r\n bytes[2] << 8 |\r\n bytes[3],\r\n unsigned\r\n );\r\n};\r\n", "'use strict'\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\nvar Buffer = require('safe-buffer').Buffer\n\nvar ARRAY16 = new Array(16)\n\nfunction MD5 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n}\n\ninherits(MD5, HashBase)\n\nMD5.prototype._update = function () {\n var M = ARRAY16\n for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)\n\n var a = this._a\n var b = this._b\n var c = this._c\n var d = this._d\n\n a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)\n d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)\n c = fnF(c, d, a, b, M[2], 0x242070db, 17)\n b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)\n a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)\n d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)\n c = fnF(c, d, a, b, M[6], 0xa8304613, 17)\n b = fnF(b, c, d, a, M[7], 0xfd469501, 22)\n a = fnF(a, b, c, d, M[8], 0x698098d8, 7)\n d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)\n c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)\n b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)\n a = fnF(a, b, c, d, M[12], 0x6b901122, 7)\n d = fnF(d, a, b, c, M[13], 0xfd987193, 12)\n c = fnF(c, d, a, b, M[14], 0xa679438e, 17)\n b = fnF(b, c, d, a, M[15], 0x49b40821, 22)\n\n a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)\n d = fnG(d, a, b, c, M[6], 0xc040b340, 9)\n c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)\n b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)\n a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)\n d = fnG(d, a, b, c, M[10], 0x02441453, 9)\n c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)\n b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)\n a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)\n d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)\n c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)\n b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)\n a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)\n d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)\n c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)\n b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)\n\n a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)\n d = fnH(d, a, b, c, M[8], 0x8771f681, 11)\n c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)\n b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)\n a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)\n d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)\n c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)\n b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)\n a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)\n d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)\n c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)\n b = fnH(b, c, d, a, M[6], 0x04881d05, 23)\n a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)\n d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)\n c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)\n b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)\n\n a = fnI(a, b, c, d, M[0], 0xf4292244, 6)\n d = fnI(d, a, b, c, M[7], 0x432aff97, 10)\n c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)\n b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)\n a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)\n d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)\n c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)\n b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)\n a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)\n d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)\n c = fnI(c, d, a, b, M[6], 0xa3014314, 15)\n b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)\n a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)\n d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)\n c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)\n b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)\n\n this._a = (this._a + a) | 0\n this._b = (this._b + b) | 0\n this._c = (this._c + c) | 0\n this._d = (this._d + d) | 0\n}\n\nMD5.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.allocUnsafe(16)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fnF (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnG (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnH (a, b, c, d, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnI (a, b, c, d, m, k, s) {\n return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0\n}\n\nmodule.exports = MD5\n", "module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n", "'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst webcrypto_1 = require(\"./providers/webcrypto\");\nconst siv_1 = require(\"./siv\");\n/** AEAD interface provider for ISIVLike types */\nclass AEAD {\n /** Create a new AEAD instance with the given key */\n static importKey(keyData, alg, provider = new webcrypto_1.WebCryptoProvider()) {\n return __awaiter(this, void 0, void 0, function* () {\n return new AEAD(yield siv_1.SIV.importKey(keyData, alg, provider));\n });\n }\n constructor(siv) {\n this._siv = siv;\n }\n /** Encrypt and authenticate data using AES-SIV */\n seal(plaintext, nonce, associatedData = new Uint8Array(0)) {\n return __awaiter(this, void 0, void 0, function* () {\n return this._siv.seal(plaintext, [associatedData, nonce]);\n });\n }\n /** Decrypt and authenticate data using AES-SIV */\n open(ciphertext, nonce, associatedData = new Uint8Array(0)) {\n return __awaiter(this, void 0, void 0, function* () {\n return this._siv.open(ciphertext, [associatedData, nonce]);\n });\n }\n /** Make a best effort to wipe memory used by this instance */\n clear() {\n this._siv.clear();\n return this;\n }\n}\nexports.AEAD = AEAD;\n", "\"use strict\";\n// tslint:disable:max-classes-per-file\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/** Thrown when ciphertext fails to verify as authentic */\nclass IntegrityError extends Error {\n constructor(m) {\n super(m);\n Object.setPrototypeOf(this, IntegrityError.prototype);\n }\n}\nexports.IntegrityError = IntegrityError;\n/** Thrown when we attempt to use an unsupported crypto algorithm via WebCrypto */\nclass NotImplementedError extends Error {\n constructor(m) {\n super(m);\n Object.setPrototypeOf(this, NotImplementedError.prototype);\n }\n}\nexports.NotImplementedError = NotImplementedError;\n", "\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/** Exceptions */\n__export(require(\"./exceptions\"));\n/** Symmetric encryption APIs */\nvar aead_1 = require(\"./aead\");\nexports.AEAD = aead_1.AEAD;\nvar siv_1 = require(\"./siv\");\nexports.SIV = siv_1.SIV;\n/** STREAM streaming encryption */\nvar stream_1 = require(\"./stream\");\nexports.StreamEncryptor = stream_1.StreamEncryptor;\nexports.StreamDecryptor = stream_1.StreamDecryptor;\n/** MAC functions */\nvar cmac_1 = require(\"./mac/cmac\");\nexports.CMAC = cmac_1.CMAC;\nvar pmac_1 = require(\"./mac/pmac\");\nexports.PMAC = pmac_1.PMAC;\n/** Crypto providers */\nvar polyfill_1 = require(\"./providers/polyfill\");\nexports.PolyfillCryptoProvider = polyfill_1.PolyfillCryptoProvider;\nvar webcrypto_1 = require(\"./providers/webcrypto\");\nexports.WebCryptoProvider = webcrypto_1.WebCryptoProvider;\n", "\"use strict\";\n/** Type which represents AES blocks */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst constant_time_1 = require(\"./constant-time\");\nconst wipe_1 = require(\"./wipe\");\n/** An AES block (128-bits) */\nclass Block {\n constructor() {\n this.data = new Uint8Array(Block.SIZE);\n }\n /**\n * Clear the given array by setting its values to zero.\n *\n * WARNING: The fact that it sets bytes to zero can be relied on.\n *\n * There is no guarantee that this function makes data disappear from memory,\n * as runtime implementation can, for example, have copying garbage collector\n * that will make copies of sensitive data before we wipe it. Or that an\n * operating system will write our data to swap or sleep image. Another thing\n * is that an optimizing compiler can remove calls to this function or make it\n * no-op. There's nothing we can do with it, so we just do our best and hope\n * that everything will be okay and good will triumph over evil.\n */\n clear() {\n wipe_1.wipe(this.data);\n }\n /**\n * Make a copy of this block, returning a new block\n */\n clone() {\n const ret = new Block();\n ret.copy(this);\n return ret;\n }\n /** Copy the contents of another block into this one */\n copy(other) {\n this.data.set(other.data);\n }\n /**\n * Double a value over GF(2^128):\n *\n * a<<1 if firstbit(a)=0\n * (a<<1) ⊕ 0¹²⁰10000111 if firstbit(a)=1\n */\n dbl() {\n let carry = 0;\n for (let i = Block.SIZE - 1; i >= 0; i--) {\n const b = (this.data[i] >>> 7) & 0xff;\n this.data[i] = (this.data[i] << 1) | carry;\n carry = b;\n }\n this.data[Block.SIZE - 1] ^= constant_time_1.select(carry, Block.R, 0);\n carry = 0;\n }\n}\n/** Size of a block as used by the AES cipher */\nBlock.SIZE = 16;\n/** Minimal irreducible polynomial for a 128-bit block size */\nBlock.R = 0x87;\nexports.default = Block;\n", "\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * NOTE! Due to the inability to guarantee real constant time evaluation of\n * anything in JavaScript VM, this is module is the best effort.\n */\n/**\n * Returns resultIfOne if subject is 1, or resultIfZero if subject is 0.\n *\n * Supports only 32-bit integers, so resultIfOne or resultIfZero are not\n * integers, they'll be converted to them with bitwise operations.\n */\nfunction select(subject, resultIfOne, resultIfZero) {\n return (~(subject - 1) & resultIfOne) | ((subject - 1) & resultIfZero);\n}\nexports.select = select;\n/**\n * Returns 1 if a and b are of equal length and their contents\n * are equal, or 0 otherwise.\n *\n * Note that unlike in equal(), zero-length inputs are considered\n * the same, so this function will return 1.\n */\nfunction compare(a, b) {\n if (a.length !== b.length) {\n return 0;\n }\n let result = 0;\n for (let i = 0; i < a.length; i++) {\n result |= a[i] ^ b[i];\n }\n return (1 & ((result - 1) >>> 8));\n}\nexports.compare = compare;\n/**\n * Returns true if a and b are of equal non-zero length,\n * and their contents are equal, or false otherwise.\n *\n * Note that unlike in compare() zero-length inputs are considered\n * _not_ equal, so this function will return false.\n */\nfunction equal(a, b) {\n if (a.length === 0 || b.length === 0) {\n return false;\n }\n return compare(a, b) !== 0;\n}\nexports.equal = equal;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/** Number of trailing zeros in a given byte value */\nconst CTZ_TABLE = new Uint8Array([\n 8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,\n]);\n/** Count the number of trailing zeroes in a given number */\nfunction ctz(value) {\n return CTZ_TABLE[value];\n}\nexports.ctz = ctz;\n", "\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Sets all values in the given array to zero and returns it.\n *\n * The fact that it sets bytes to zero can be relied on.\n *\n * There is no guarantee that this function makes data disappear from memory,\n * as runtime implementation can, for example, have copying garbage collector\n * that will make copies of sensitive data before we wipe it. Or that an\n * operating system will write our data to swap or sleep image. Another thing\n * is that an optimizing compiler can remove calls to this function or make it\n * no-op. There's nothing we can do with it, so we just do our best and hope\n * that everything will be okay and good will triumph over evil.\n */\nfunction wipe(array) {\n // Right now it's similar to array.fill(0). If it turns\n // out that runtimes optimize this call away, maybe\n // we can try something else.\n for (let i = 0; i < array.length; i++) {\n array[i] = 0;\n }\n return array;\n}\nexports.wipe = wipe;\n", "\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/** Perform an in-place bitwise XOR operation on two bytestrings */\nfunction xor(a, b) {\n for (let i = 0; i < b.length; i++) {\n a[i] ^= b[i];\n }\n}\nexports.xor = xor;\n", "\"use strict\";\n// Copyright (C) 2016-2017 Dmitry Chestnykh, Tony Arcieri\n// MIT License. See LICENSE file for details.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst block_1 = require(\"../internals/block\");\nconst xor_1 = require(\"../internals/xor\");\n/**\n * The AES-CMAC message authentication code\n */\nclass CMAC {\n constructor(_cipher, _subkey1, _subkey2) {\n this._cipher = _cipher;\n this._subkey1 = _subkey1;\n this._subkey2 = _subkey2;\n this._bufferPos = 0;\n this._finished = false;\n this._buffer = new block_1.default();\n }\n /** Create a new CMAC instance from the given key */\n static importKey(provider, keyData) {\n return __awaiter(this, void 0, void 0, function* () {\n const cipher = yield provider.importBlockCipherKey(keyData);\n // Generate subkeys.\n const subkey1 = new block_1.default();\n yield cipher.encryptBlock(subkey1);\n subkey1.dbl();\n const subkey2 = subkey1.clone();\n subkey2.dbl();\n return new CMAC(cipher, subkey1, subkey2);\n });\n }\n reset() {\n this._buffer.clear();\n this._bufferPos = 0;\n this._finished = false;\n return this;\n }\n clear() {\n this.reset();\n this._subkey1.clear();\n this._subkey2.clear();\n }\n update(data) {\n return __awaiter(this, void 0, void 0, function* () {\n const left = block_1.default.SIZE - this._bufferPos;\n let dataPos = 0;\n let dataLength = data.length;\n if (dataLength > left) {\n for (let i = 0; i < left; i++) {\n this._buffer.data[this._bufferPos + i] ^= data[i];\n }\n dataLength -= left;\n dataPos += left;\n yield this._cipher.encryptBlock(this._buffer);\n this._bufferPos = 0;\n }\n // TODO: use AES-CBC with a span of multiple blocks instead of encryptBlock\n // to encrypt many blocks in a single call to the WebCrypto API\n while (dataLength > block_1.default.SIZE) {\n for (let i = 0; i < block_1.default.SIZE; i++) {\n this._buffer.data[i] ^= data[dataPos + i];\n }\n dataLength -= block_1.default.SIZE;\n dataPos += block_1.default.SIZE;\n yield this._cipher.encryptBlock(this._buffer);\n }\n for (let i = 0; i < dataLength; i++) {\n this._buffer.data[this._bufferPos++] ^= data[dataPos + i];\n }\n return this;\n });\n }\n finish() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this._finished) {\n // Select which subkey to use.\n const subkey = (this._bufferPos < block_1.default.SIZE) ? this._subkey2 : this._subkey1;\n // XOR in the subkey.\n xor_1.xor(this._buffer.data, subkey.data);\n // Pad if needed.\n if (this._bufferPos < block_1.default.SIZE) {\n this._buffer.data[this._bufferPos] ^= 0x80;\n }\n // Encrypt buffer to get the final digest.\n yield this._cipher.encryptBlock(this._buffer);\n // Set finished flag.\n this._finished = true;\n }\n return this._buffer.clone().data;\n });\n }\n}\nexports.CMAC = CMAC;\n", "\"use strict\";\n// Copyright (C) 2016-2017 Tony Arcieri, Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst block_1 = require(\"../internals/block\");\nconst constant_time_1 = require(\"../internals/constant-time\");\nconst ctz_1 = require(\"../internals/ctz\");\nconst xor_1 = require(\"../internals/xor\");\n// Number of L blocks to precompute (i.e. µ in the PMAC paper)\n// TODO: dynamically compute these as needed\nconst PRECOMPUTED_BLOCKS = 31;\n/**\n * Polyfill for the AES-PMAC message authentication code\n *\n * Uses a non-constant-time (lookup table-based) AES polyfill.\n * See polyfill/aes.ts for more information on the security impact.\n */\nclass PMAC {\n constructor(cipher, l, lInv) {\n /**\n * finished is set true when we are done processing a message, and forbids\n * any subsequent writes until we reset the internal state\n */\n this._finished = false;\n this._cipher = cipher;\n this._L = l;\n this._LInv = lInv;\n this._buffer = new block_1.default();\n this._bufferPos = 0;\n this._counter = 0;\n this._offset = new block_1.default();\n this._tag = new block_1.default();\n }\n /** Create a new CMAC instance from the given key */\n static importKey(provider, keyData) {\n return __awaiter(this, void 0, void 0, function* () {\n const cipher = yield provider.importBlockCipherKey(keyData);\n /**\n * L is defined as follows (quoted from the PMAC paper):\n *\n * Equation 1:\n *\n * a · x =\n * a<<1 if firstbit(a)=0\n * (a<<1) ⊕ 0¹²⁰10000111 if firstbit(a)=1\n *\n * Equation 2:\n *\n * a · x⁻¹ =\n * a>>1 if lastbit(a)=0\n * (a>>1) ⊕ 10¹²⁰1000011 if lastbit(a)=1\n *\n * Let L(0) ← L. For i ∈ [1..µ], compute L(i) ← L(i − 1) · x by\n * Equation (1) using a shift and a conditional xor.\n *\n * Compute L(−1) ← L · x⁻¹ by Equation (2), using a shift and a\n * conditional xor.\n *\n * Save the values L(−1), L(0), L(1), L(2), ..., L(µ) in a table.\n * (Alternatively, [ed: as we have done in this codebase] defer computing\n * some or all of these L(i) values until the value is actually needed.)\n */\n const tmp = new block_1.default();\n yield cipher.encryptBlock(tmp);\n const l = new Array(PRECOMPUTED_BLOCKS);\n for (let i = 0; i < PRECOMPUTED_BLOCKS; i++) {\n l[i] = tmp.clone();\n tmp.dbl();\n }\n /**\n * Compute L(−1) ← L · x⁻¹:\n *\n * a>>1 if lastbit(a)=0\n * (a>>1) ⊕ 10¹²⁰1000011 if lastbit(a)=1\n */\n const lInv = l[0].clone();\n const lastBit = lInv.data[block_1.default.SIZE - 1] & 0x01;\n for (let i = block_1.default.SIZE - 1; i > 0; i--) {\n const carry = constant_time_1.select(lInv.data[i - 1] & 1, 0x80, 0);\n lInv.data[i] = (lInv.data[i] >>> 1) | carry;\n }\n lInv.data[0] >>>= 1;\n lInv.data[0] ^= constant_time_1.select(lastBit, 0x80, 0);\n lInv.data[block_1.default.SIZE - 1] ^= constant_time_1.select(lastBit, block_1.default.R >>> 1, 0);\n return new PMAC(cipher, l, lInv);\n });\n }\n reset() {\n this._buffer.clear();\n this._bufferPos = 0;\n this._counter = 0;\n this._offset.clear();\n this._tag.clear();\n this._finished = false;\n return this;\n }\n clear() {\n this.reset();\n this._cipher.clear();\n }\n update(data) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._finished) {\n throw new Error(\"pmac: already finished\");\n }\n const left = block_1.default.SIZE - this._bufferPos;\n let dataPos = 0;\n let dataLength = data.length;\n // Finish filling the internal buf with the message\n if (dataLength > left) {\n this._buffer.data.set(data.slice(0, left), this._bufferPos);\n dataPos += left;\n dataLength -= left;\n yield this._processBuffer();\n }\n // So long as we have more than a blocks worth of data, compute\n // whole-sized blocks at a time.\n while (dataLength > block_1.default.SIZE) {\n this._buffer.data.set(data.slice(dataPos, dataPos + block_1.default.SIZE));\n dataPos += block_1.default.SIZE;\n dataLength -= block_1.default.SIZE;\n yield this._processBuffer();\n }\n if (dataLength > 0) {\n this._buffer.data.set(data.slice(dataPos, dataPos + dataLength), this._bufferPos);\n this._bufferPos += dataLength;\n }\n return this;\n });\n }\n finish() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._finished) {\n throw new Error(\"pmac: already finished\");\n }\n if (this._bufferPos === block_1.default.SIZE) {\n xor_1.xor(this._tag.data, this._buffer.data);\n xor_1.xor(this._tag.data, this._LInv.data);\n }\n else {\n xor_1.xor(this._tag.data, this._buffer.data.slice(0, this._bufferPos));\n this._tag.data[this._bufferPos] ^= 0x80;\n }\n yield this._cipher.encryptBlock(this._tag);\n this._finished = true;\n return this._tag.clone().data;\n });\n }\n // Update the internal tag state based on the buffer contents\n _processBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n xor_1.xor(this._offset.data, this._L[ctz_1.ctz(this._counter + 1)].data);\n xor_1.xor(this._buffer.data, this._offset.data);\n this._counter++;\n yield this._cipher.encryptBlock(this._buffer);\n xor_1.xor(this._tag.data, this._buffer.data);\n this._bufferPos = 0;\n });\n }\n}\nexports.PMAC = PMAC;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst aes_1 = require(\"./polyfill/aes\");\nconst aes_ctr_1 = require(\"./polyfill/aes_ctr\");\n/**\n * Pure JavaScript cryptography implementations\n *\n * WARNING: Not constant time! May leak keys or have other security issues.\n */\nclass PolyfillCryptoProvider {\n constructor() {\n // This class doesn't do anything, it just signals that polyfill impls should be used\n }\n importBlockCipherKey(keyData) {\n return __awaiter(this, void 0, void 0, function* () {\n return new aes_1.default(keyData);\n });\n }\n importCTRKey(keyData) {\n return __awaiter(this, void 0, void 0, function* () {\n return new aes_ctr_1.default(new aes_1.default(keyData));\n });\n }\n}\nexports.PolyfillCryptoProvider = PolyfillCryptoProvider;\n", "\"use strict\";\n// Copyright (C) 2016-2017 Dmitry Chestnykh, Tony Arcieri\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst wipe_1 = require(\"../../internals/wipe\");\n// Powers of x mod poly in GF(2).\nconst POWX = new Uint8Array([\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,\n 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f,\n]);\n// FIPS-197 Figure 7. S-box substitution values in hexadecimal format.\nconst SBOX0 = new Uint8Array([\n 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,\n 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,\n 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,\n 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,\n 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,\n 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,\n 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,\n 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,\n 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,\n 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,\n 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,\n 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,\n 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,\n 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,\n 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,\n 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16,\n]);\n// FIPS-197 Figure 14. Inverse S-box substitution values in hexadecimal format.\nconst SBOX1 = new Uint8Array([\n 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,\n 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,\n 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,\n 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25,\n 0x72, 0xf8, 0xf6, 0x64, 0x86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, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d,\n]);\n// Encryption and decryption tables.\n// Will be computed by initialize() when the first AES instance is created.\nlet isInitialized = false;\nlet Te0;\nlet Te1;\nlet Te2;\nlet Te3;\nlet Td0;\nlet Td1;\nlet Td2;\nlet Td3;\n/**\n * Polyfill for the AES block cipher.\n *\n * This implementation uses lookup tables, so it's susceptible to cache-timing\n * side-channel attacks. A constant-time version we tried was super slow (a few\n * kilobytes per second), so we'll have to live with it.\n *\n * Key size: 16 or 32 bytes, block size: 16 bytes.\n */\nclass PolyfillAes {\n /**\n * Constructs AES with the given 16 or 32-byte key\n * for AES-128 or AES-256.\n */\n constructor(keyData) {\n if (!isInitialized) {\n initialize();\n }\n // Only AES-128 and AES-256 supported. AES-192 is not.\n if (keyData.length !== 16 && keyData.length !== 32) {\n throw new Error(`Miscreant: invalid key length: ${keyData.length} (expected 16 or 32 bytes)`);\n }\n this._encKey = expandKey(keyData);\n this._emptyPromise = Promise.resolve(this);\n }\n /**\n * Cleans expanded keys from memory, setting them to zeros.\n */\n clear() {\n if (this._encKey) {\n wipe_1.wipe(this._encKey);\n }\n return this;\n }\n /**\n * Encrypt 16-byte block in-place, replacing its contents with ciphertext.\n *\n * This function should not be used to encrypt data without any\n * cipher mode! It should only be used to implement a cipher mode.\n * This library uses it to implement AES-SIV.\n */\n encryptBlock(block) {\n const src = block.data;\n const dst = block.data;\n let s0 = readUint32BE(src, 0);\n let s1 = readUint32BE(src, 4);\n let s2 = readUint32BE(src, 8);\n let s3 = readUint32BE(src, 12);\n // First round just XORs input with key.\n s0 ^= this._encKey[0];\n s1 ^= this._encKey[1];\n s2 ^= this._encKey[2];\n s3 ^= this._encKey[3];\n let t0 = 0;\n let t1 = 0;\n let t2 = 0;\n let t3 = 0;\n // Middle rounds shuffle using tables.\n // Number of rounds is set by length of expanded key.\n const nr = this._encKey.length / 4 - 2; // - 2: one above, one more below\n let k = 4;\n for (let r = 0; r < nr; r++) {\n t0 = this._encKey[k + 0] ^ Te0[(s0 >>> 24) & 0xff] ^ Te1[(s1 >>> 16) & 0xff] ^\n Te2[(s2 >>> 8) & 0xff] ^ Te3[s3 & 0xff];\n t1 = this._encKey[k + 1] ^ Te0[(s1 >>> 24) & 0xff] ^ Te1[(s2 >>> 16) & 0xff] ^\n Te2[(s3 >>> 8) & 0xff] ^ Te3[s0 & 0xff];\n t2 = this._encKey[k + 2] ^ Te0[(s2 >>> 24) & 0xff] ^ Te1[(s3 >>> 16) & 0xff] ^\n Te2[(s0 >>> 8) & 0xff] ^ Te3[s1 & 0xff];\n t3 = this._encKey[k + 3] ^ Te0[(s3 >>> 24) & 0xff] ^ Te1[(s0 >>> 16) & 0xff] ^\n Te2[(s1 >>> 8) & 0xff] ^ Te3[s2 & 0xff];\n k += 4;\n s0 = t0;\n s1 = t1;\n s2 = t2;\n s3 = t3;\n }\n // Last round uses s-box directly and XORs to produce output.\n s0 = (SBOX0[t0 >>> 24] << 24) | (SBOX0[(t1 >>> 16) & 0xff]) << 16 |\n (SBOX0[(t2 >>> 8) & 0xff]) << 8 | (SBOX0[t3 & 0xff]);\n s1 = (SBOX0[t1 >>> 24] << 24) | (SBOX0[(t2 >>> 16) & 0xff]) << 16 |\n (SBOX0[(t3 >>> 8) & 0xff]) << 8 | (SBOX0[t0 & 0xff]);\n s2 = (SBOX0[t2 >>> 24] << 24) | (SBOX0[(t3 >>> 16) & 0xff]) << 16 |\n (SBOX0[(t0 >>> 8) & 0xff]) << 8 | (SBOX0[t1 & 0xff]);\n s3 = (SBOX0[t3 >>> 24] << 24) | (SBOX0[(t0 >>> 16) & 0xff]) << 16 |\n (SBOX0[(t1 >>> 8) & 0xff]) << 8 | (SBOX0[t2 & 0xff]);\n s0 ^= this._encKey[k + 0];\n s1 ^= this._encKey[k + 1];\n s2 ^= this._encKey[k + 2];\n s3 ^= this._encKey[k + 3];\n writeUint32BE(s0, dst, 0);\n writeUint32BE(s1, dst, 4);\n writeUint32BE(s2, dst, 8);\n writeUint32BE(s3, dst, 12);\n return this._emptyPromise;\n }\n}\nexports.default = PolyfillAes;\n// Initialize generates encryption and decryption tables.\nfunction initialize() {\n const poly = (1 << 8) | (1 << 4) | (1 << 3) | (1 << 1) | (1 << 0);\n function mul(b, c) {\n let i = b;\n let j = c;\n let s = 0;\n for (let k = 1; k < 0x100 && j !== 0; k <<= 1) {\n // Invariant: k == 1< (x << 24) | (x >>> 8);\n // Generate encryption tables.\n Te0 = new Uint32Array(256);\n Te1 = new Uint32Array(256);\n Te2 = new Uint32Array(256);\n Te3 = new Uint32Array(256);\n for (let i = 0; i < 256; i++) {\n const s = SBOX0[i];\n let w = (mul(s, 2) << 24) | (s << 16) | (s << 8) | mul(s, 3);\n Te0[i] = w;\n w = rot(w);\n Te1[i] = w;\n w = rot(w);\n Te2[i] = w;\n w = rot(w);\n Te3[i] = w;\n w = rot(w);\n }\n // Generate decryption tables.\n Td0 = new Uint32Array(256);\n Td1 = new Uint32Array(256);\n Td2 = new Uint32Array(256);\n Td3 = new Uint32Array(256);\n for (let i = 0; i < 256; i++) {\n const s = SBOX1[i];\n let w = (mul(s, 0xe) << 24) | (mul(s, 0x9) << 16) |\n (mul(s, 0xd) << 8) | mul(s, 0xb);\n Td0[i] = w;\n w = rot(w);\n Td1[i] = w;\n w = rot(w);\n Td2[i] = w;\n w = rot(w);\n Td3[i] = w;\n w = rot(w);\n }\n isInitialized = true;\n}\n// Reads 4 bytes from array starting at offset as big-endian\n// unsigned 32-bit integer and returns it.\nfunction readUint32BE(array, offset = 0) {\n return ((array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3]) >>> 0;\n}\n// Writes 4-byte big-endian representation of 32-bit unsigned\n// value to byte array starting at offset.\n//\n// If byte array is not given, creates a new 4-byte one.\n//\n// Returns the output byte array.\nfunction writeUint32BE(value, out = new Uint8Array(4), offset = 0) {\n out[offset + 0] = value >>> 24;\n out[offset + 1] = value >>> 16;\n out[offset + 2] = value >>> 8;\n out[offset + 3] = value >>> 0;\n return out;\n}\n// Apply sbox0 to each byte in w.\nfunction subw(w) {\n return ((SBOX0[(w >>> 24) & 0xff]) << 24) |\n ((SBOX0[(w >>> 16) & 0xff]) << 16) |\n ((SBOX0[(w >>> 8) & 0xff]) << 8) |\n (SBOX0[w & 0xff]);\n}\n// Rotate\nfunction rotw(w) {\n return (w << 8) | (w >>> 24);\n}\nfunction expandKey(key) {\n const encKey = new Uint32Array(key.length + 28);\n const nk = key.length / 4 | 0;\n const n = encKey.length;\n for (let i = 0; i < nk; i++) {\n encKey[i] = readUint32BE(key, i * 4);\n }\n for (let i = nk; i < n; i++) {\n let t = encKey[i - 1];\n if (i % nk === 0) {\n t = subw(rotw(t)) ^ (POWX[i / nk - 1] << 24);\n }\n else if (nk > 6 && i % nk === 4) {\n t = subw(t);\n }\n encKey[i] = encKey[i - nk] ^ t;\n }\n return encKey;\n}\n", "\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst block_1 = require(\"../../internals/block\");\n/**\n * Polyfill for the AES-CTR (counter) mode of operation.\n *\n * Uses a non-constant-time (lookup table-based) AES polyfill.\n * See polyfill/aes.ts for more information on the security impact.\n *\n * Note that CTR mode is malleable and generally should not be used without\n * authentication. Instead, use an authenticated encryption mode, like AES-SIV!\n */\nclass PolyfillAesCtr {\n constructor(cipher) {\n // Set cipher.\n this._cipher = cipher;\n // Allocate space for counter.\n this._counter = new block_1.default();\n // Allocate buffer for encrypted block.\n this._buffer = new block_1.default();\n }\n clear() {\n this._buffer.clear();\n this._counter.clear();\n this._cipher.clear();\n return this;\n }\n encryptCtr(iv, plaintext) {\n return __awaiter(this, void 0, void 0, function* () {\n if (iv.length !== block_1.default.SIZE) {\n throw new Error(\"CTR: iv length must be equal to cipher block size\");\n }\n // Copy IV to counter, overwriting it.\n this._counter.data.set(iv);\n // Set buffer position to length of buffer\n // so that the first cipher block is generated.\n let bufferPos = block_1.default.SIZE;\n const result = new Uint8Array(plaintext.length);\n for (let i = 0; i < plaintext.length; i++) {\n if (bufferPos === block_1.default.SIZE) {\n this._buffer.copy(this._counter);\n this._cipher.encryptBlock(this._buffer);\n bufferPos = 0;\n incrementCounter(this._counter);\n }\n result[i] = plaintext[i] ^ this._buffer.data[bufferPos++];\n }\n return result;\n });\n }\n}\nexports.default = PolyfillAesCtr;\n// Increment an AES-CTR mode counter, intentionally wrapping/overflowing\nfunction incrementCounter(counter) {\n let carry = 1;\n for (let i = block_1.default.SIZE - 1; i >= 0; i--) {\n carry += (counter.data[i] & 0xff) | 0;\n counter.data[i] = carry & 0xff;\n carry >>>= 8;\n }\n}\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst exceptions_1 = require(\"../exceptions\");\nconst aes_1 = require(\"./webcrypto/aes\");\nconst aes_ctr_1 = require(\"./webcrypto/aes_ctr\");\n/** Placeholder backend for using pure JavaScript crypto implementations */\nclass WebCryptoProvider {\n constructor(crypto = window.crypto) {\n this.crypto = crypto;\n }\n importBlockCipherKey(keyData) {\n return __awaiter(this, void 0, void 0, function* () {\n return aes_1.default.importKey(this.crypto, keyData);\n });\n }\n importCTRKey(keyData) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n return yield aes_ctr_1.default.importKey(this.crypto, keyData);\n }\n catch (e) {\n if (e.message.includes(\"unsupported\")) {\n throw new exceptions_1.NotImplementedError(\"WebCryptoProvider: AES-CTR unsupported. Use PolyfillCryptoProvider.\");\n }\n else {\n throw e;\n }\n }\n });\n }\n}\nexports.WebCryptoProvider = WebCryptoProvider;\n", "\"use strict\";\n// Copyright (C) 2017 Tony Arcieri\n// MIT License. See LICENSE file for details.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst block_1 = require(\"../../internals/block\");\n/**\n * WebCrypto-based implementation of the AES block cipher.\n *\n * This implementation (ab)uses AES-CBC mode to implement AES-ECB. This is\n * likely to be rather slow, as it requires an async call per block, and\n * discards half the buffer.\n *\n * In theory it should be constant time due to the use of WebCrypto (provided\n * the browser's implementation is constant time), but it could probably benefit\n * from some clever optimization work, or improvements to the WebCrypto API.\n *\n * Some WebCrypto implementations (e.g. node-webcrypto-ossl) support ECB mode\n * natively, so we could take advantage of that to potentially encrypt multiple\n * blocks in a single invocation.\n *\n * Key size: 16 or 32 bytes, block size: 16 bytes.\n */\nclass WebCryptoAes {\n constructor(_crypto, _key) {\n this._crypto = _crypto;\n this._key = _key;\n // An initialization vector of all zeros, exposing the raw AES function\n this._iv = new block_1.default();\n this._emptyPromise = Promise.resolve(this);\n }\n /**\n * Create a new WebCryptoAes instance\n *\n * @param {Crypto} crypto - the Web Cryptography provider\n * @param {Uint8Array} keyData - the AES secret key\n * @returns {Promise}\n */\n encryptBlock(block) {\n return __awaiter(this, void 0, void 0, function* () {\n const params = { name: \"AES-CBC\", iv: this._iv.data };\n const ctBlock = yield this._crypto.subtle.encrypt(params, this._key, block.data);\n // TODO: a more efficient way to do in-place encryption?\n block.data.set(new Uint8Array(ctBlock, 0, block_1.default.SIZE));\n return this._emptyPromise;\n });\n }\n}\nexports.default = WebCryptoAes;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * AES-CTR using a WebCrypto (or similar) API\n */\nclass WebCryptoAesCtr {\n constructor(key, crypto) {\n this.key = key;\n this.crypto = crypto;\n }\n static importKey(crypto, keyData) {\n return __awaiter(this, void 0, void 0, function* () {\n // Only AES-128 and AES-256 supported. AES-192 is not.\n if (keyData.length !== 16 && keyData.length !== 32) {\n throw new Error(`Miscreant: invalid key length: ${keyData.length} (expected 16 or 32 bytes)`);\n }\n const key = yield crypto.subtle.importKey(\"raw\", keyData, \"AES-CTR\", false, [\"encrypt\"]);\n return new WebCryptoAesCtr(key, crypto);\n });\n }\n encryptCtr(iv, plaintext) {\n return __awaiter(this, void 0, void 0, function* () {\n const ciphertext = yield this.crypto.subtle.encrypt({ name: \"AES-CTR\", counter: iv, length: 16 }, this.key, plaintext);\n return new Uint8Array(ciphertext);\n });\n }\n clear() {\n // TODO: actually clear something. Do we need to?\n return this;\n }\n}\nexports.default = WebCryptoAesCtr;\n", "\"use strict\";\n// Copyright (C) 2017-2018 Dmitry Chestnykh, Tony Arcieri\n// MIT License. See LICENSE file for details.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst constant_time_1 = require(\"./internals/constant-time\");\nconst wipe_1 = require(\"./internals/wipe\");\nconst xor_1 = require(\"./internals/xor\");\nconst exceptions_1 = require(\"./exceptions\");\nconst block_1 = require(\"./internals/block\");\nconst cmac_1 = require(\"./mac/cmac\");\nconst pmac_1 = require(\"./mac/pmac\");\nconst webcrypto_1 = require(\"./providers/webcrypto\");\n/** Maximum number of associated data items */\nexports.MAX_ASSOCIATED_DATA = 126;\n/** The AES-SIV mode of authenticated encryption */\nclass SIV {\n /** Create a new AES-SIV instance with the given 32-byte or 64-byte key */\n static importKey(keyData, alg, provider = new webcrypto_1.WebCryptoProvider()) {\n return __awaiter(this, void 0, void 0, function* () {\n // We only support AES-128 and AES-256. AES-SIV needs a key 2X as long the intended security level\n if (keyData.length !== 32 && keyData.length !== 64) {\n throw new Error(`AES-SIV: key must be 32 or 64-bytes (got ${keyData.length}`);\n }\n const macKey = keyData.subarray(0, keyData.length / 2 | 0);\n const encKey = keyData.subarray(keyData.length / 2 | 0);\n let mac;\n switch (alg) {\n case \"AES-SIV\":\n mac = yield cmac_1.CMAC.importKey(provider, macKey);\n break;\n case \"AES-CMAC-SIV\":\n mac = yield cmac_1.CMAC.importKey(provider, macKey);\n break;\n case \"AES-PMAC-SIV\":\n mac = yield pmac_1.PMAC.importKey(provider, macKey);\n break;\n default:\n throw new exceptions_1.NotImplementedError(`Miscreant: algorithm not supported: ${alg}`);\n }\n const ctr = yield provider.importCTRKey(encKey);\n return new SIV(mac, ctr);\n });\n }\n constructor(mac, ctr) {\n this._mac = mac;\n this._ctr = ctr;\n this._tmp1 = new block_1.default();\n this._tmp2 = new block_1.default();\n }\n /** Encrypt and authenticate data using AES-SIV */\n seal(plaintext, associatedData) {\n return __awaiter(this, void 0, void 0, function* () {\n if (associatedData.length > exports.MAX_ASSOCIATED_DATA) {\n throw new Error(\"AES-SIV: too many associated data items\");\n }\n // Allocate space for sealed ciphertext.\n const resultLength = block_1.default.SIZE + plaintext.length;\n const result = new Uint8Array(resultLength);\n // Authenticate.\n const iv = yield this._s2v(associatedData, plaintext);\n result.set(iv);\n // Encrypt.\n zeroIVBits(iv);\n result.set(yield this._ctr.encryptCtr(iv, plaintext), iv.length);\n return result;\n });\n }\n /** Decrypt and authenticate data using AES-SIV */\n open(sealed, associatedData) {\n return __awaiter(this, void 0, void 0, function* () {\n if (associatedData.length > exports.MAX_ASSOCIATED_DATA) {\n throw new Error(\"AES-SIV: too many associated data items\");\n }\n if (sealed.length < block_1.default.SIZE) {\n throw new exceptions_1.IntegrityError(\"AES-SIV: ciphertext is truncated\");\n }\n // Decrypt.\n const tag = sealed.subarray(0, block_1.default.SIZE);\n const iv = this._tmp1.data;\n iv.set(tag);\n zeroIVBits(iv);\n // NOTE: \"encryptCtr\" is intentional. CTR encryption/decryption are the same\n const result = yield this._ctr.encryptCtr(iv, sealed.subarray(block_1.default.SIZE));\n // Authenticate.\n const expectedTag = yield this._s2v(associatedData, result);\n if (!constant_time_1.equal(expectedTag, tag)) {\n wipe_1.wipe(result);\n throw new exceptions_1.IntegrityError(\"AES-SIV: ciphertext verification failure!\");\n }\n return result;\n });\n }\n /** Make a best effort to wipe memory used by this instance */\n clear() {\n this._tmp1.clear();\n this._tmp2.clear();\n this._ctr.clear();\n this._mac.clear();\n return this;\n }\n /**\n * The S2V operation consists of the doubling and XORing of the outputs\n * of the pseudo-random function CMAC (or PMAC in the case of AES-PMAC-SIV).\n *\n * See Section 2.4 of RFC 5297 for more information\n */\n _s2v(associated_data, plaintext) {\n return __awaiter(this, void 0, void 0, function* () {\n this._mac.reset();\n this._tmp1.clear();\n // Note: the standalone S2V returns CMAC(1) if the number of passed\n // vectors is zero, however in SIV construction this case is never\n // triggered, since we always pass plaintext as the last vector (even\n // if it's zero-length), so we omit this case.\n yield this._mac.update(this._tmp1.data);\n this._tmp2.clear();\n this._tmp2.data.set(yield this._mac.finish());\n this._mac.reset();\n for (const ad of associated_data) {\n yield this._mac.update(ad);\n this._tmp1.clear();\n this._tmp1.data.set(yield this._mac.finish());\n this._mac.reset();\n this._tmp2.dbl();\n xor_1.xor(this._tmp2.data, this._tmp1.data);\n }\n this._tmp1.clear();\n if (plaintext.length >= block_1.default.SIZE) {\n const n = plaintext.length - block_1.default.SIZE;\n this._tmp1.data.set(plaintext.subarray(n));\n yield this._mac.update(plaintext.subarray(0, n));\n }\n else {\n this._tmp1.data.set(plaintext);\n this._tmp1.data[plaintext.length] = 0x80;\n this._tmp2.dbl();\n }\n xor_1.xor(this._tmp1.data, this._tmp2.data);\n yield this._mac.update(this._tmp1.data);\n return this._mac.finish();\n });\n }\n}\nexports.SIV = SIV;\n/** Zero out the top bits in the last 32-bit words of the IV */\nfunction zeroIVBits(iv) {\n // \"We zero-out the top bit in each of the last two 32-bit words\n // of the IV before assigning it to Ctr\"\n // — http://web.cs.ucdavis.edu/~rogaway/papers/siv.pdf\n iv[iv.length - 8] &= 0x7f;\n iv[iv.length - 4] &= 0x7f;\n}\n", "\"use strict\";\n/**\n * The STREAM online authenticated encryption construction.\n * See for definition.\n */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst aead_1 = require(\"./aead\");\nconst webcrypto_1 = require(\"./providers/webcrypto\");\n/** Size of a nonce required by STREAM in bytes */\nexports.NONCE_SIZE = 8;\n/** Byte flag indicating this is the last block in the STREAM (otherwise 0) */\nexports.LAST_BLOCK_FLAG = 1;\n/** Maximum value of the counter STREAM uses internally to identify messages */\nexports.COUNTER_MAX = 0xFFFFFFFF;\n/**\n * A STREAM encryptor with a 32-bit counter, generalized for any AEAD algorithm\n *\n * This corresponds to the ℰ stream encryptor object as defined in the paper\n * Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance\n */\nclass StreamEncryptor {\n /** Create a new StreamEncryptor instance with the given key */\n static importKey(keyData, nonce, alg, provider = new webcrypto_1.WebCryptoProvider()) {\n return __awaiter(this, void 0, void 0, function* () {\n return new StreamEncryptor(yield aead_1.AEAD.importKey(keyData, alg, provider), nonce);\n });\n }\n constructor(aead, nonce) {\n this._aead = aead;\n this._nonce_encoder = new NonceEncoder(nonce);\n }\n /** Encrypt and authenticate data using the selected AEAD algorithm */\n seal(plaintext, lastBlock = false, associatedData = new Uint8Array(0)) {\n return __awaiter(this, void 0, void 0, function* () {\n return this._aead.seal(plaintext, this._nonce_encoder.next(lastBlock), associatedData);\n });\n }\n /** Make a best effort to wipe memory used by this instance */\n clear() {\n this._aead.clear();\n return this;\n }\n}\nexports.StreamEncryptor = StreamEncryptor;\n/**\n * A STREAM decryptor with a 32-bit counter, generalized for any AEAD algorithm\n *\n * This corresponds to the 𝒟 stream decryptor object as defined in the paper\n * Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance\n */\nclass StreamDecryptor {\n /** Create a new StreamDecryptor instance with the given key */\n static importKey(keyData, nonce, alg, provider = new webcrypto_1.WebCryptoProvider()) {\n return __awaiter(this, void 0, void 0, function* () {\n return new StreamDecryptor(yield aead_1.AEAD.importKey(keyData, alg, provider), nonce);\n });\n }\n constructor(aead, nonce) {\n this._aead = aead;\n this._nonce_encoder = new NonceEncoder(nonce);\n }\n /** Decrypt and authenticate data using the selected AEAD algorithm */\n open(ciphertext, lastBlock = false, associatedData = new Uint8Array(0)) {\n return __awaiter(this, void 0, void 0, function* () {\n return this._aead.open(ciphertext, this._nonce_encoder.next(lastBlock), associatedData);\n });\n }\n /** Make a best effort to wipe memory used by this instance */\n clear() {\n this._aead.clear();\n return this;\n }\n}\nexports.StreamDecryptor = StreamDecryptor;\n/** Computes STREAM nonces based on the current position in the STREAM. */\nclass NonceEncoder {\n constructor(noncePrefix) {\n if (noncePrefix.length !== exports.NONCE_SIZE) {\n throw new Error(`STREAM: nonce must be 8-bits (got ${noncePrefix.length}`);\n }\n this.buffer = new ArrayBuffer(exports.NONCE_SIZE + 4 + 1);\n this.view = new DataView(this.buffer);\n this.array = new Uint8Array(this.buffer);\n this.array.set(noncePrefix);\n this.counter = 0;\n this.finished = false;\n }\n /** Compute the next nonce value, incrementing the internal counter */\n next(lastBlock) {\n if (this.finished) {\n throw new Error(\"STREAM: already finished\");\n }\n this.view.setInt32(8, this.counter, false);\n if (lastBlock) {\n this.view.setInt8(12, exports.LAST_BLOCK_FLAG);\n this.finished = true;\n }\n else {\n this.counter += 1;\n if (this.counter > exports.COUNTER_MAX) {\n throw new Error(\"STREAM counter overflowed\");\n }\n }\n return this.array;\n }\n}\n", "'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n", "'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n", "'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n", "'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n", "'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n", "'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n", "'use strict';\n\n// modified from https://github.com/es-shims/es6-shim\nvar objectKeys = require('object-keys');\nvar hasSymbols = require('has-symbols/shams')();\nvar callBound = require('call-bind/callBound');\nvar toObject = Object;\nvar $push = callBound('Array.prototype.push');\nvar $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');\nvar originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function assign(target, source1) {\n\tif (target == null) { throw new TypeError('target must be an object'); }\n\tvar to = toObject(target); // step 1\n\tif (arguments.length === 1) {\n\t\treturn to; // step 2\n\t}\n\tfor (var s = 1; s < arguments.length; ++s) {\n\t\tvar from = toObject(arguments[s]); // step 3.a.i\n\n\t\t// step 3.a.ii:\n\t\tvar keys = objectKeys(from);\n\t\tvar getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);\n\t\tif (getSymbols) {\n\t\t\tvar syms = getSymbols(from);\n\t\t\tfor (var j = 0; j < syms.length; ++j) {\n\t\t\t\tvar key = syms[j];\n\t\t\t\tif ($propIsEnumerable(from, key)) {\n\t\t\t\t\t$push(keys, key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// step 3.a.iii:\n\t\tfor (var i = 0; i < keys.length; ++i) {\n\t\t\tvar nextKey = keys[i];\n\t\t\tif ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2\n\t\t\t\tvar propValue = from[nextKey]; // step 3.a.iii.2.a\n\t\t\t\tto[nextKey] = propValue; // step 3.a.iii.2.b\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to; // step 4\n};\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nvar lacksProperEnumerationOrder = function () {\n\tif (!Object.assign) {\n\t\treturn false;\n\t}\n\t/*\n\t * v8, specifically in node 4.x, has a bug with incorrect property enumeration order\n\t * note: this does not detect the bug unless there's 20 characters\n\t */\n\tvar str = 'abcdefghijklmnopqrst';\n\tvar letters = str.split('');\n\tvar map = {};\n\tfor (var i = 0; i < letters.length; ++i) {\n\t\tmap[letters[i]] = letters[i];\n\t}\n\tvar obj = Object.assign({}, map);\n\tvar actual = '';\n\tfor (var k in obj) {\n\t\tactual += k;\n\t}\n\treturn str !== actual;\n};\n\nvar assignHasPendingExceptions = function () {\n\tif (!Object.assign || !Object.preventExtensions) {\n\t\treturn false;\n\t}\n\t/*\n\t * Firefox 37 still has \"pending exception\" logic in its Object.assign implementation,\n\t * which is 72% slower than our shim, and Firefox 40's native implementation.\n\t */\n\tvar thrower = Object.preventExtensions({ 1: 2 });\n\ttry {\n\t\tObject.assign(thrower, 'xy');\n\t} catch (e) {\n\t\treturn thrower[1] === 'y';\n\t}\n\treturn false;\n};\n\nmodule.exports = function getPolyfill() {\n\tif (!Object.assign) {\n\t\treturn implementation;\n\t}\n\tif (lacksProperEnumerationOrder()) {\n\t\treturn implementation;\n\t}\n\tif (assignHasPendingExceptions()) {\n\t\treturn implementation;\n\t}\n\treturn Object.assign;\n};\n", "// Top level file is just a mixin of submodules & constants\n'use strict';\n\nconst { Deflate, deflate, deflateRaw, gzip } = require('./lib/deflate');\n\nconst { Inflate, inflate, inflateRaw, ungzip } = require('./lib/inflate');\n\nconst constants = require('./lib/zlib/constants');\n\nmodule.exports.Deflate = Deflate;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateRaw = deflateRaw;\nmodule.exports.gzip = gzip;\nmodule.exports.Inflate = Inflate;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateRaw = inflateRaw;\nmodule.exports.ungzip = ungzip;\nmodule.exports.constants = constants;\n", "'use strict';\n\n\nconst zlib_deflate = require('./zlib/deflate');\nconst utils = require('./utils/common');\nconst strings = require('./utils/strings');\nconst msg = require('./zlib/messages');\nconst ZStream = require('./zlib/zstream');\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END,\n Z_DEFAULT_COMPRESSION,\n Z_DEFAULT_STRATEGY,\n Z_DEFLATED\n} = require('./zlib/constants');\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n let status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = zlib_deflate.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n this.result = utils.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n const deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nmodule.exports.Deflate = Deflate;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateRaw = deflateRaw;\nmodule.exports.gzip = gzip;\nmodule.exports.constants = require('./zlib/constants');\n", "'use strict';\n\n\nconst zlib_inflate = require('./zlib/inflate');\nconst utils = require('./utils/common');\nconst strings = require('./utils/strings');\nconst msg = require('./zlib/messages');\nconst ZStream = require('./zlib/zstream');\nconst GZheader = require('./zlib/gzheader');\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n} = require('./zlib/constants');\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n this.options = utils.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n let status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = zlib_inflate.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n zlib_inflate.inflateReset(strm);\n status = zlib_inflate.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n const inflator = new Inflate(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || msg[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nmodule.exports.Inflate = Inflate;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateRaw = inflateRaw;\nmodule.exports.ungzip = inflate;\nmodule.exports.constants = require('./zlib/constants');\n", "'use strict';\n\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nmodule.exports.assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nmodule.exports.flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n", "// String encode/decode helpers\n'use strict';\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nmodule.exports.string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nmodule.exports.buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nmodule.exports.utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n", "'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nmodule.exports = adler32;\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n", "'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nmodule.exports = crc32;\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = require('./trees');\nconst adler32 = require('./adler32');\nconst crc32 = require('./crc32');\nconst msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_PARTIAL_FLUSH, Z_FULL_FLUSH, Z_FINISH, Z_BLOCK,\n Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_DATA_ERROR, Z_BUF_ERROR,\n Z_DEFAULT_COMPRESSION,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY,\n Z_UNKNOWN,\n Z_DEFLATED\n} = require('./constants');\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES = 30;\n/* number of distance codes */\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst EXTRA_STATE = 69;\nconst NAME_STATE = 73;\nconst COMMENT_STATE = 91;\nconst HCRC_STATE = 103;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = msg[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n let max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n const max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n};\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nconst deflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n _tr_init(s);\n return Z_OK;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n};\n\n\nconst deflate = (strm, flush) => {\n\n let beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n let bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n const status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n};\n\n\nmodule.exports.deflateInit = deflateInit;\nmodule.exports.deflateInit2 = deflateInit2;\nmodule.exports.deflateReset = deflateReset;\nmodule.exports.deflateResetKeep = deflateResetKeep;\nmodule.exports.deflateSetHeader = deflateSetHeader;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateEnd = deflateEnd;\nmodule.exports.deflateSetDictionary = deflateSetDictionary;\nmodule.exports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD = 30; /* got a data error -- remain here until reset */\nconst TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = require('./adler32');\nconst crc32 = require('./crc32');\nconst inflate_fast = require('./inffast');\nconst inflate_table = require('./inftrees');\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH, Z_BLOCK, Z_TREES,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR, Z_BUF_ERROR,\n Z_DEFLATED\n} = require('./constants');\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 1; /* i: waiting for magic header */\nconst FLAGS = 2; /* i: waiting for method and flags (gzip) */\nconst TIME = 3; /* i: waiting for modification time (gzip) */\nconst OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 5; /* i: waiting for extra length (gzip) */\nconst EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nconst NAME = 7; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 8; /* i: waiting for end of comment (gzip) */\nconst HCRC = 9; /* i: waiting for header crc (gzip) */\nconst DICTID = 10; /* i: waiting for dictionary check value */\nconst DICT = 11; /* waiting for inflateSetDictionary() call */\nconst TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 14; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 17; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 18; /* i: waiting for code length code lengths */\nconst CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 20; /* i: same as LEN below, but only first time in */\nconst LEN = 21; /* i: waiting for length/lit/eob code */\nconst LENEXT = 22; /* i: waiting for length extra bits */\nconst DIST = 23; /* i: waiting for distance code */\nconst DISTEXT = 24; /* i: waiting for distance extra bits */\nconst MATCH = 25; /* o: waiting for output space to copy string */\nconst LIT = 26; /* o: waiting for output space to write literal */\nconst CHECK = 27; /* i: waiting for 32-bit check value */\nconst LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 29; /* finished check, done -- remain here until reset */\nconst BAD = 30; /* got a data error -- remain here until reset */\nconst MEM = 31; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n};\n\n\nmodule.exports.inflateReset = inflateReset;\nmodule.exports.inflateReset2 = inflateReset2;\nmodule.exports.inflateResetKeep = inflateResetKeep;\nmodule.exports.inflateInit = inflateInit;\nmodule.exports.inflateInit2 = inflateInit2;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateEnd = inflateEnd;\nmodule.exports.inflateGetHeader = inflateGetHeader;\nmodule.exports.inflateSetDictionary = inflateSetDictionary;\nmodule.exports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\n*/\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n let base_index = 0;\n// let shoextra; /* extra bits table to use */\n let end; /* use base and extra for symbol > end */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n let extra_index = 0;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nmodule.exports = inflate_table;\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES = 30;\n/* number of distance codes */\n\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) =>\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n const next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nconst copy_block = (s, buf, len, header) =>\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n s.pending_buf.set(s.window.subarray(buf, buf + len), s.pending);\n s.pending += len;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) =>\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let lx = 0; /* running index in l_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) =>\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let black_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nconst _tr_flush_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally = (s, dist, lc) =>\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //let out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n};\n\nmodule.exports._tr_init = _tr_init;\nmodule.exports._tr_stored_block = _tr_stored_block;\nmodule.exports._tr_flush_block = _tr_flush_block;\nmodule.exports._tr_tally = _tr_tally;\nmodule.exports._tr_align = _tr_align;\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n", "exports.pbkdf2 = require('./lib/async')\nexports.pbkdf2Sync = require('./lib/sync')\n", "var Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar sync = require('./sync')\nvar toBuffer = require('./to-buffer')\n\nvar ZERO_BUF\nvar subtle = global.crypto && global.crypto.subtle\nvar toBrowser = {\n sha: 'SHA-1',\n 'sha-1': 'SHA-1',\n sha1: 'SHA-1',\n sha256: 'SHA-256',\n 'sha-256': 'SHA-256',\n sha384: 'SHA-384',\n 'sha-384': 'SHA-384',\n 'sha-512': 'SHA-512',\n sha512: 'SHA-512'\n}\nvar checks = []\nfunction checkNative (algo) {\n if (global.process && !global.process.browser) {\n return Promise.resolve(false)\n }\n if (!subtle || !subtle.importKey || !subtle.deriveBits) {\n return Promise.resolve(false)\n }\n if (checks[algo] !== undefined) {\n return checks[algo]\n }\n ZERO_BUF = ZERO_BUF || Buffer.alloc(8)\n var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)\n .then(function () {\n return true\n }).catch(function () {\n return false\n })\n checks[algo] = prom\n return prom\n}\nvar nextTick\nfunction getNextTick () {\n if (nextTick) {\n return nextTick\n }\n if (global.process && global.process.nextTick) {\n nextTick = global.process.nextTick\n } else if (global.queueMicrotask) {\n nextTick = global.queueMicrotask\n } else if (global.setImmediate) {\n nextTick = global.setImmediate\n } else {\n nextTick = global.setTimeout\n }\n return nextTick\n}\nfunction browserPbkdf2 (password, salt, iterations, length, algo) {\n return subtle.importKey(\n 'raw', password, { name: 'PBKDF2' }, false, ['deriveBits']\n ).then(function (key) {\n return subtle.deriveBits({\n name: 'PBKDF2',\n salt: salt,\n iterations: iterations,\n hash: {\n name: algo\n }\n }, key, length << 3)\n }).then(function (res) {\n return Buffer.from(res)\n })\n}\n\nfunction resolvePromise (promise, callback) {\n promise.then(function (out) {\n getNextTick()(function () {\n callback(null, out)\n })\n }, function (e) {\n getNextTick()(function () {\n callback(e)\n })\n })\n}\nmodule.exports = function (password, salt, iterations, keylen, digest, callback) {\n if (typeof digest === 'function') {\n callback = digest\n digest = undefined\n }\n\n digest = digest || 'sha1'\n var algo = toBrowser[digest.toLowerCase()]\n\n if (!algo || typeof global.Promise !== 'function') {\n getNextTick()(function () {\n var out\n try {\n out = sync(password, salt, iterations, keylen, digest)\n } catch (e) {\n return callback(e)\n }\n callback(null, out)\n })\n return\n }\n\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')\n\n resolvePromise(checkNative(algo).then(function (resp) {\n if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo)\n\n return sync(password, salt, iterations, keylen, digest)\n }), callback)\n}\n", "var defaultEncoding\n/* istanbul ignore next */\nif (global.process && global.process.browser) {\n defaultEncoding = 'utf-8'\n} else if (global.process && global.process.version) {\n var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)\n\n defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'\n} else {\n defaultEncoding = 'utf-8'\n}\nmodule.exports = defaultEncoding\n", "var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs\n\nmodule.exports = function (iterations, keylen) {\n if (typeof iterations !== 'number') {\n throw new TypeError('Iterations not a number')\n }\n\n if (iterations < 0) {\n throw new TypeError('Bad iterations')\n }\n\n if (typeof keylen !== 'number') {\n throw new TypeError('Key length not a number')\n }\n\n if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */\n throw new TypeError('Bad key length')\n }\n}\n", "var md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar toBuffer = require('./to-buffer')\n\nvar ZEROS = Buffer.alloc(128)\nvar sizes = {\n md5: 16,\n sha1: 20,\n sha224: 28,\n sha256: 32,\n sha384: 48,\n sha512: 64,\n rmd160: 20,\n ripemd160: 20\n}\n\nfunction Hmac (alg, key, saltLen) {\n var hash = getDigest(alg)\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n if (key.length > blocksize) {\n key = hash(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])\n var opad = Buffer.allocUnsafe(blocksize + sizes[alg])\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)\n ipad.copy(ipad1, 0, 0, blocksize)\n this.ipad1 = ipad1\n this.ipad2 = ipad\n this.opad = opad\n this.alg = alg\n this.blocksize = blocksize\n this.hash = hash\n this.size = sizes[alg]\n}\n\nHmac.prototype.run = function (data, ipad) {\n data.copy(ipad, this.blocksize)\n var h = this.hash(ipad)\n h.copy(this.opad, this.blocksize)\n return this.hash(this.opad)\n}\n\nfunction getDigest (alg) {\n function shaFunc (data) {\n return sha(alg).update(data).digest()\n }\n function rmd160Func (data) {\n return new RIPEMD160().update(data).digest()\n }\n\n if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func\n if (alg === 'md5') return md5\n return shaFunc\n}\n\nfunction pbkdf2 (password, salt, iterations, keylen, digest) {\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n\n digest = digest || 'sha1'\n\n var hmac = new Hmac(digest, password, salt.length)\n\n var DK = Buffer.allocUnsafe(keylen)\n var block1 = Buffer.allocUnsafe(salt.length + 4)\n salt.copy(block1, 0, 0, salt.length)\n\n var destPos = 0\n var hLen = sizes[digest]\n var l = Math.ceil(keylen / hLen)\n\n for (var i = 1; i <= l; i++) {\n block1.writeUInt32BE(i, salt.length)\n\n var T = hmac.run(block1, hmac.ipad1)\n var U = T\n\n for (var j = 1; j < iterations; j++) {\n U = hmac.run(U, hmac.ipad2)\n for (var k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n T.copy(DK, destPos)\n destPos += hLen\n }\n\n return DK\n}\n\nmodule.exports = pbkdf2\n", "var Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (thing, encoding, name) {\n if (Buffer.isBuffer(thing)) {\n return thing\n } else if (typeof thing === 'string') {\n return Buffer.from(thing, encoding)\n } else if (ArrayBuffer.isView(thing)) {\n return Buffer.from(thing.buffer)\n } else {\n throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView')\n }\n}\n", "// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n", "// minimal library entry point.\n\n\"use strict\";\nmodule.exports = require(\"./src/index-minimal\");\n", "\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(\"./writer\");\nprotobuf.BufferWriter = require(\"./writer_buffer\");\nprotobuf.Reader = require(\"./reader\");\nprotobuf.BufferReader = require(\"./reader_buffer\");\n\n// Utility\nprotobuf.util = require(\"./util/minimal\");\nprotobuf.rpc = require(\"./rpc\");\nprotobuf.roots = require(\"./roots\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n", "\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n", "\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(\"./reader\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n", "\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n", "\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(\"./rpc/service\");\n", "\"use strict\";\nmodule.exports = Service;\n\nvar util = require(\"../util/minimal\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n", "\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(\"../util/minimal\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n", "\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(\"@protobufjs/aspromise\");\n\n// converts to / from base64 encoded strings\nutil.base64 = require(\"@protobufjs/base64\");\n\n// base class of rpc.Service\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\n\n// float handling accross browsers\nutil.float = require(\"@protobufjs/float\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(\"@protobufjs/inquire\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(\"@protobufjs/utf8\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(\"@protobufjs/pool\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(\"./longbits\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n", "\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n", "\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(\"./writer\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n", "'use strict'\n\n// limit of Crypto.getRandomValues()\n// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues\nvar MAX_BYTES = 65536\n\n// Node supports requesting up to this number of bytes\n// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48\nvar MAX_UINT32 = 4294967295\n\nfunction oldBrowser () {\n throw new Error('Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11')\n}\n\nvar Buffer = require('safe-buffer').Buffer\nvar crypto = global.crypto || global.msCrypto\n\nif (crypto && crypto.getRandomValues) {\n module.exports = randomBytes\n} else {\n module.exports = oldBrowser\n}\n\nfunction randomBytes (size, cb) {\n // phantomjs needs to throw\n if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')\n\n var bytes = Buffer.allocUnsafe(size)\n\n if (size > 0) { // getRandomValues fails on IE if size == 0\n if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues\n // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues\n for (var generated = 0; generated < size; generated += MAX_BYTES) {\n // buffer.slice automatically checks if the end is past the end of\n // the buffer so we don't have to here\n crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))\n }\n } else {\n crypto.getRandomValues(bytes)\n }\n }\n\n if (typeof cb === 'function') {\n return process.nextTick(function () {\n cb(null, bytes)\n })\n }\n\n return bytes\n}\n", "'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/**/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\nrequire('inherits')(PassThrough, Transform);\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nmodule.exports = Readable;\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/buffer_list');\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n\n// Lazy loaded to improve the startup performance.\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\nrequire('inherits')(Readable, Stream);\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'end' (and potentially 'finish')\n this.autoDestroy = !!options.autoDestroy;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex);\n\n // legacy\n this.readable = true;\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n }\n\n // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n return er;\n}\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n // If setEncoding(null), decoder.encoding equals utf8\n this._readableState.encoding = this._readableState.decoder.encoding;\n\n // Iterate over current buffer to convert already stored Buffers:\n var p = this._readableState.buffer.head;\n var content = '';\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n};\n\n// Don't raise the hwm > 1GB\nvar MAX_HWM = 0x40000000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n }\n\n // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n return dest;\n};\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0;\n\n // Try start flowing on next tick if stream isn't explicitly paused\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true;\n\n // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n state.paused = false;\n return this;\n};\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n if (!state.reading) {\n stream.read(0);\n }\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n this._readableState.paused = true;\n return this;\n};\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null);\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n};\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n return createReadableStreamAsyncIterator(this);\n };\n}\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n});\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length);\n\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n return from(Readable, iterable, opts);\n };\n}\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\nvar Duplex = require('./_stream_duplex');\nrequire('inherits')(Transform, Duplex);\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n var _this = this;\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null)\n // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nrequire('inherits')(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'finish' (and potentially 'end')\n this.autoDestroy = !!options.autoDestroy;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n // TODO: defer error events consistently everywhere, not just the cb\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n return true;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};", "'use strict';\n\nvar _Object$setPrototypeO;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar finished = require('./end-of-stream');\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n if (resolve !== null) {\n var data = iter[kStream].read();\n // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n }\n\n // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject];\n // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve = iterator[kLastResolve];\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\nmodule.exports = createReadableStreamAsyncIterator;", "'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('util'),\n inspect = _require2.inspect;\nvar custom = inspect && inspect.custom || 'inspect';\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\nmodule.exports = /*#__PURE__*/function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) ret += s + p.data;\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread(_objectSpread({}, options), {}, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n}();", "'use strict';\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n}\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};", "// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;", "module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n", "// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar eos;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true;\n\n // request.destroy just do .end - .abort is what we want\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\nfunction call(fn) {\n fn();\n}\nfunction pipe(from, to) {\n return from.pipe(to);\n}\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\nmodule.exports = pipeline;", "'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n\n // Default value\n return state.objectMode ? 16 : 16 * 1024;\n}\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};", "module.exports = require('events').EventEmitter;\n", "exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n", "'use strict'\nvar Buffer = require('buffer').Buffer\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\n\nvar ARRAY16 = new Array(16)\n\nvar zl = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n]\n\nvar zr = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n]\n\nvar sl = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n]\n\nvar sr = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n]\n\nvar hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]\nvar hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]\n\nfunction RIPEMD160 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n}\n\ninherits(RIPEMD160, HashBase)\n\nRIPEMD160.prototype._update = function () {\n var words = ARRAY16\n for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)\n\n var al = this._a | 0\n var bl = this._b | 0\n var cl = this._c | 0\n var dl = this._d | 0\n var el = this._e | 0\n\n var ar = this._a | 0\n var br = this._b | 0\n var cr = this._c | 0\n var dr = this._d | 0\n var er = this._e | 0\n\n // computation\n for (var i = 0; i < 80; i += 1) {\n var tl\n var tr\n if (i < 16) {\n tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])\n tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])\n } else if (i < 32) {\n tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])\n tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])\n } else if (i < 48) {\n tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])\n tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])\n } else if (i < 64) {\n tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])\n tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])\n } else { // if (i<80) {\n tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])\n tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])\n }\n\n al = el\n el = dl\n dl = rotl(cl, 10)\n cl = bl\n bl = tl\n\n ar = er\n er = dr\n dr = rotl(cr, 10)\n cr = br\n br = tr\n }\n\n // update state\n var t = (this._b + cl + dr) | 0\n this._b = (this._c + dl + er) | 0\n this._c = (this._d + el + ar) | 0\n this._d = (this._e + al + br) | 0\n this._e = (this._a + bl + cr) | 0\n this._a = t\n}\n\nRIPEMD160.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n buffer.writeInt32LE(this._e, 16)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fn1 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn2 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn3 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn4 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn5 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0\n}\n\nmodule.exports = RIPEMD160\n", "/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n", "!function(globals){\n'use strict'\n\n//*** UMD BEGIN\nif (typeof define !== 'undefined' && define.amd) { //require.js / AMD\n define([], function() {\n return secureRandom\n })\n} else if (typeof module !== 'undefined' && module.exports) { //CommonJS\n module.exports = secureRandom\n} else { //script / browser\n globals.secureRandom = secureRandom\n}\n//*** UMD END\n\n//options.type is the only valid option\nfunction secureRandom(count, options) {\n options = options || {type: 'Array'}\n //we check for process.pid to prevent browserify from tricking us\n if (\n typeof process != 'undefined'\n && typeof process.pid == 'number'\n && process.versions\n && process.versions.node\n ) {\n return nodeRandom(count, options)\n } else {\n var crypto = window.crypto || window.msCrypto\n if (!crypto) throw new Error(\"Your browser does not support window.crypto.\")\n return browserRandom(count, options)\n }\n}\n\nfunction nodeRandom(count, options) {\n var crypto = require('crypto')\n var buf = crypto.randomBytes(count)\n\n switch (options.type) {\n case 'Array':\n return [].slice.call(buf)\n case 'Buffer':\n return buf\n case 'Uint8Array':\n var arr = new Uint8Array(count)\n for (var i = 0; i < count; ++i) { arr[i] = buf.readUInt8(i) }\n return arr\n default:\n throw new Error(options.type + \" is unsupported.\")\n }\n}\n\nfunction browserRandom(count, options) {\n var nativeArr = new Uint8Array(count)\n var crypto = window.crypto || window.msCrypto\n crypto.getRandomValues(nativeArr)\n\n switch (options.type) {\n case 'Array':\n return [].slice.call(nativeArr)\n case 'Buffer':\n try { var b = new Buffer(1) } catch(e) { throw new Error('Buffer not supported in this environment. Use Node.js or Browserify for browser support.')}\n return new Buffer(nativeArr)\n case 'Uint8Array':\n return nativeArr\n default:\n throw new Error(options.type + \" is unsupported.\")\n }\n}\n\nsecureRandom.randomArray = function(byteCount) {\n return secureRandom(byteCount, {type: 'Array'})\n}\n\nsecureRandom.randomUint8Array = function(byteCount) {\n return secureRandom(byteCount, {type: 'Uint8Array'})\n}\n\nsecureRandom.randomBuffer = function(byteCount) {\n return secureRandom(byteCount, {type: 'Buffer'})\n}\n\n\n}(this);\n", "var Buffer = require('safe-buffer').Buffer\n\n// prototype class for hash functions\nfunction Hash (blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize)\n this._finalSize = finalSize\n this._blockSize = blockSize\n this._len = 0\n}\n\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8'\n data = Buffer.from(data, enc)\n }\n\n var block = this._block\n var blockSize = this._blockSize\n var length = data.length\n var accum = this._len\n\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize\n var remainder = Math.min(length - offset, blockSize - assigned)\n\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i]\n }\n\n accum += remainder\n offset += remainder\n\n if ((accum % blockSize) === 0) {\n this._update(block)\n }\n }\n\n this._len += length\n return this\n}\n\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize\n\n this._block[rem] = 0x80\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1)\n\n if (rem >= this._finalSize) {\n this._update(this._block)\n this._block.fill(0)\n }\n\n var bits = this._len * 8\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4)\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0\n var highBits = (bits - lowBits) / 0x100000000\n\n this._block.writeUInt32BE(highBits, this._blockSize - 8)\n this._block.writeUInt32BE(lowBits, this._blockSize - 4)\n }\n\n this._update(this._block)\n var hash = this._hash()\n\n return enc ? hash.toString(enc) : hash\n}\n\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass')\n}\n\nmodule.exports = Hash\n", "var exports = module.exports = function SHA (algorithm) {\n algorithm = algorithm.toLowerCase()\n\n var Algorithm = exports[algorithm]\n if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')\n\n return new Algorithm()\n}\n\nexports.sha = require('./sha')\nexports.sha1 = require('./sha1')\nexports.sha224 = require('./sha224')\nexports.sha256 = require('./sha256')\nexports.sha384 = require('./sha384')\nexports.sha512 = require('./sha512')\n", "/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined\n * in FIPS PUB 180-1\n * This source code is derived from sha1.js of the same repository.\n * The difference between SHA-0 and SHA-1 is just a bitwise rotate left\n * operation was added.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha, Hash)\n\nSha.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha\n", "/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha1 () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha1, Hash)\n\nSha1.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl1 (num) {\n return (num << 1) | (num >>> 31)\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha1.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha1.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha1\n", "/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Sha256 = require('./sha256')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(64)\n\nfunction Sha224 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha224, Sha256)\n\nSha224.prototype.init = function () {\n this._a = 0xc1059ed8\n this._b = 0x367cd507\n this._c = 0x3070dd17\n this._d = 0xf70e5939\n this._e = 0xffc00b31\n this._f = 0x68581511\n this._g = 0x64f98fa7\n this._h = 0xbefa4fa4\n\n return this\n}\n\nSha224.prototype._hash = function () {\n var H = Buffer.allocUnsafe(28)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n\n return H\n}\n\nmodule.exports = Sha224\n", "/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,\n 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,\n 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,\n 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,\n 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,\n 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,\n 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,\n 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,\n 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,\n 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,\n 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,\n 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,\n 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,\n 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,\n 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,\n 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2\n]\n\nvar W = new Array(64)\n\nfunction Sha256 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha256, Hash)\n\nSha256.prototype.init = function () {\n this._a = 0x6a09e667\n this._b = 0xbb67ae85\n this._c = 0x3c6ef372\n this._d = 0xa54ff53a\n this._e = 0x510e527f\n this._f = 0x9b05688c\n this._g = 0x1f83d9ab\n this._h = 0x5be0cd19\n\n return this\n}\n\nfunction ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x) {\n return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)\n}\n\nfunction sigma1 (x) {\n return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)\n}\n\nfunction gamma0 (x) {\n return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)\n}\n\nfunction gamma1 (x) {\n return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)\n}\n\nSha256.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n var f = this._f | 0\n var g = this._g | 0\n var h = this._h | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0\n\n for (var j = 0; j < 64; ++j) {\n var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0\n var T2 = (sigma0(a) + maj(a, b, c)) | 0\n\n h = g\n g = f\n f = e\n e = (d + T1) | 0\n d = c\n c = b\n b = a\n a = (T1 + T2) | 0\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n this._f = (f + this._f) | 0\n this._g = (g + this._g) | 0\n this._h = (h + this._h) | 0\n}\n\nSha256.prototype._hash = function () {\n var H = Buffer.allocUnsafe(32)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n H.writeInt32BE(this._h, 28)\n\n return H\n}\n\nmodule.exports = Sha256\n", "var inherits = require('inherits')\nvar SHA512 = require('./sha512')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(160)\n\nfunction Sha384 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha384, SHA512)\n\nSha384.prototype.init = function () {\n this._ah = 0xcbbb9d5d\n this._bh = 0x629a292a\n this._ch = 0x9159015a\n this._dh = 0x152fecd8\n this._eh = 0x67332667\n this._fh = 0x8eb44a87\n this._gh = 0xdb0c2e0d\n this._hh = 0x47b5481d\n\n this._al = 0xc1059ed8\n this._bl = 0x367cd507\n this._cl = 0x3070dd17\n this._dl = 0xf70e5939\n this._el = 0xffc00b31\n this._fl = 0x68581511\n this._gl = 0x64f98fa7\n this._hl = 0xbefa4fa4\n\n return this\n}\n\nSha384.prototype._hash = function () {\n var H = Buffer.allocUnsafe(48)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n\n return H\n}\n\nmodule.exports = Sha384\n", "var inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]\n\nvar W = new Array(160)\n\nfunction Sha512 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha512, Hash)\n\nSha512.prototype.init = function () {\n this._ah = 0x6a09e667\n this._bh = 0xbb67ae85\n this._ch = 0x3c6ef372\n this._dh = 0xa54ff53a\n this._eh = 0x510e527f\n this._fh = 0x9b05688c\n this._gh = 0x1f83d9ab\n this._hh = 0x5be0cd19\n\n this._al = 0xf3bcc908\n this._bl = 0x84caa73b\n this._cl = 0xfe94f82b\n this._dl = 0x5f1d36f1\n this._el = 0xade682d1\n this._fl = 0x2b3e6c1f\n this._gl = 0xfb41bd6b\n this._hl = 0x137e2179\n\n return this\n}\n\nfunction Ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x, xl) {\n return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)\n}\n\nfunction sigma1 (x, xl) {\n return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)\n}\n\nfunction Gamma0 (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)\n}\n\nfunction Gamma0l (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)\n}\n\nfunction Gamma1 (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)\n}\n\nfunction Gamma1l (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)\n}\n\nfunction getCarry (a, b) {\n return (a >>> 0) < (b >>> 0) ? 1 : 0\n}\n\nSha512.prototype._update = function (M) {\n var W = this._w\n\n var ah = this._ah | 0\n var bh = this._bh | 0\n var ch = this._ch | 0\n var dh = this._dh | 0\n var eh = this._eh | 0\n var fh = this._fh | 0\n var gh = this._gh | 0\n var hh = this._hh | 0\n\n var al = this._al | 0\n var bl = this._bl | 0\n var cl = this._cl | 0\n var dl = this._dl | 0\n var el = this._el | 0\n var fl = this._fl | 0\n var gl = this._gl | 0\n var hl = this._hl | 0\n\n for (var i = 0; i < 32; i += 2) {\n W[i] = M.readInt32BE(i * 4)\n W[i + 1] = M.readInt32BE(i * 4 + 4)\n }\n for (; i < 160; i += 2) {\n var xh = W[i - 15 * 2]\n var xl = W[i - 15 * 2 + 1]\n var gamma0 = Gamma0(xh, xl)\n var gamma0l = Gamma0l(xl, xh)\n\n xh = W[i - 2 * 2]\n xl = W[i - 2 * 2 + 1]\n var gamma1 = Gamma1(xh, xl)\n var gamma1l = Gamma1l(xl, xh)\n\n // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n var Wi7h = W[i - 7 * 2]\n var Wi7l = W[i - 7 * 2 + 1]\n\n var Wi16h = W[i - 16 * 2]\n var Wi16l = W[i - 16 * 2 + 1]\n\n var Wil = (gamma0l + Wi7l) | 0\n var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0\n Wil = (Wil + gamma1l) | 0\n Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0\n Wil = (Wil + Wi16l) | 0\n Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0\n\n W[i] = Wih\n W[i + 1] = Wil\n }\n\n for (var j = 0; j < 160; j += 2) {\n Wih = W[j]\n Wil = W[j + 1]\n\n var majh = maj(ah, bh, ch)\n var majl = maj(al, bl, cl)\n\n var sigma0h = sigma0(ah, al)\n var sigma0l = sigma0(al, ah)\n var sigma1h = sigma1(eh, el)\n var sigma1l = sigma1(el, eh)\n\n // t1 = h + sigma1 + ch + K[j] + W[j]\n var Kih = K[j]\n var Kil = K[j + 1]\n\n var chh = Ch(eh, fh, gh)\n var chl = Ch(el, fl, gl)\n\n var t1l = (hl + sigma1l) | 0\n var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0\n t1l = (t1l + chl) | 0\n t1h = (t1h + chh + getCarry(t1l, chl)) | 0\n t1l = (t1l + Kil) | 0\n t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0\n t1l = (t1l + Wil) | 0\n t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0\n\n // t2 = sigma0 + maj\n var t2l = (sigma0l + majl) | 0\n var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0\n\n hh = gh\n hl = gl\n gh = fh\n gl = fl\n fh = eh\n fl = el\n el = (dl + t1l) | 0\n eh = (dh + t1h + getCarry(el, dl)) | 0\n dh = ch\n dl = cl\n ch = bh\n cl = bl\n bh = ah\n bl = al\n al = (t1l + t2l) | 0\n ah = (t1h + t2h + getCarry(al, t1l)) | 0\n }\n\n this._al = (this._al + al) | 0\n this._bl = (this._bl + bl) | 0\n this._cl = (this._cl + cl) | 0\n this._dl = (this._dl + dl) | 0\n this._el = (this._el + el) | 0\n this._fl = (this._fl + fl) | 0\n this._gl = (this._gl + gl) | 0\n this._hl = (this._hl + hl) | 0\n\n this._ah = (this._ah + ah + getCarry(this._al, al)) | 0\n this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0\n this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0\n this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0\n this._eh = (this._eh + eh + getCarry(this._el, el)) | 0\n this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0\n this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0\n this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0\n}\n\nSha512.prototype._hash = function () {\n var H = Buffer.allocUnsafe(64)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n writeInt64BE(this._gh, this._gl, 48)\n writeInt64BE(this._hh, this._hl, 56)\n\n return H\n}\n\nmodule.exports = Sha512\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/lib/_stream_readable.js');\nStream.Writable = require('readable-stream/lib/_stream_writable.js');\nStream.Duplex = require('readable-stream/lib/_stream_duplex.js');\nStream.Transform = require('readable-stream/lib/_stream_transform.js');\nStream.PassThrough = require('readable-stream/lib/_stream_passthrough.js');\nStream.finished = require('readable-stream/lib/internal/streams/end-of-stream.js')\nStream.pipeline = require('readable-stream/lib/internal/streams/pipeline.js')\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}", "const BN = require('bn.js')\nconst EC = require('elliptic').ec\nconst secp256k1 = new EC('secp256k1')\nconst deterministicGenerateK = require('./rfc6979')\n\nconst ZERO32 = Buffer.alloc(32, 0)\nconst EC_GROUP_ORDER = Buffer.from('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 'hex')\nconst EC_P = Buffer.from('fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f', 'hex')\n\nconst n = secp256k1.curve.n\nconst nDiv2 = n.shrn(1)\nconst G = secp256k1.curve.g\n\nconst THROW_BAD_PRIVATE = 'Expected Private'\nconst THROW_BAD_POINT = 'Expected Point'\nconst THROW_BAD_TWEAK = 'Expected Tweak'\nconst THROW_BAD_HASH = 'Expected Hash'\nconst THROW_BAD_SIGNATURE = 'Expected Signature'\nconst THROW_BAD_EXTRA_DATA = 'Expected Extra Data (32 bytes)'\n\nfunction isScalar (x) {\n return Buffer.isBuffer(x) && x.length === 32\n}\n\nfunction isOrderScalar (x) {\n if (!isScalar(x)) return false\n return x.compare(EC_GROUP_ORDER) < 0 // < G\n}\n\nfunction isPoint (p) {\n if (!Buffer.isBuffer(p)) return false\n if (p.length < 33) return false\n\n const t = p[0]\n const x = p.slice(1, 33)\n if (x.compare(ZERO32) === 0) return false\n if (x.compare(EC_P) >= 0) return false\n if ((t === 0x02 || t === 0x03) && p.length === 33) {\n try { decodeFrom(p) } catch (e) { return false } // TODO: temporary\n return true\n }\n\n const y = p.slice(33)\n if (y.compare(ZERO32) === 0) return false\n if (y.compare(EC_P) >= 0) return false\n if (t === 0x04 && p.length === 65) return true\n return false\n}\n\nfunction __isPointCompressed (p) {\n return p[0] !== 0x04\n}\n\nfunction isPointCompressed (p) {\n if (!isPoint(p)) return false\n return __isPointCompressed(p)\n}\n\nfunction isPrivate (x) {\n if (!isScalar(x)) return false\n return x.compare(ZERO32) > 0 && // > 0\n x.compare(EC_GROUP_ORDER) < 0 // < G\n}\n\nfunction isSignature (value) {\n const r = value.slice(0, 32)\n const s = value.slice(32, 64)\n return Buffer.isBuffer(value) && value.length === 64 &&\n r.compare(EC_GROUP_ORDER) < 0 &&\n s.compare(EC_GROUP_ORDER) < 0\n}\n\nfunction assumeCompression (value, pubkey) {\n if (value === undefined && pubkey !== undefined) return __isPointCompressed(pubkey)\n if (value === undefined) return true\n return value\n}\n\nfunction fromBuffer (d) { return new BN(d) }\nfunction toBuffer (d) { return d.toArrayLike(Buffer, 'be', 32) }\nfunction decodeFrom (P) { return secp256k1.curve.decodePoint(P) }\nfunction getEncoded (P, compressed) { return Buffer.from(P._encode(compressed)) }\n\nfunction pointAdd (pA, pB, __compressed) {\n if (!isPoint(pA)) throw new TypeError(THROW_BAD_POINT)\n if (!isPoint(pB)) throw new TypeError(THROW_BAD_POINT)\n\n const a = decodeFrom(pA)\n const b = decodeFrom(pB)\n const pp = a.add(b)\n if (pp.isInfinity()) return null\n\n const compressed = assumeCompression(__compressed, pA)\n return getEncoded(pp, compressed)\n}\n\nfunction pointAddScalar (p, tweak, __compressed) {\n if (!isPoint(p)) throw new TypeError(THROW_BAD_POINT)\n if (!isOrderScalar(tweak)) throw new TypeError(THROW_BAD_TWEAK)\n\n const compressed = assumeCompression(__compressed, p)\n const pp = decodeFrom(p)\n if (tweak.compare(ZERO32) === 0) return getEncoded(pp, compressed)\n\n const tt = fromBuffer(tweak)\n const qq = G.mul(tt)\n const uu = pp.add(qq)\n if (uu.isInfinity()) return null\n\n return getEncoded(uu, compressed)\n}\n\nfunction pointCompress (p, __compressed) {\n if (!isPoint(p)) throw new TypeError(THROW_BAD_POINT)\n\n const pp = decodeFrom(p)\n if (pp.isInfinity()) throw new TypeError(THROW_BAD_POINT)\n\n const compressed = assumeCompression(__compressed, p)\n\n return getEncoded(pp, compressed)\n}\n\nfunction pointFromScalar (d, __compressed) {\n if (!isPrivate(d)) throw new TypeError(THROW_BAD_PRIVATE)\n\n const dd = fromBuffer(d)\n const pp = G.mul(dd)\n if (pp.isInfinity()) return null\n\n const compressed = assumeCompression(__compressed)\n return getEncoded(pp, compressed)\n}\n\nfunction pointMultiply (p, tweak, __compressed) {\n if (!isPoint(p)) throw new TypeError(THROW_BAD_POINT)\n if (!isOrderScalar(tweak)) throw new TypeError(THROW_BAD_TWEAK)\n\n const compressed = assumeCompression(__compressed, p)\n const pp = decodeFrom(p)\n const tt = fromBuffer(tweak)\n const qq = pp.mul(tt)\n if (qq.isInfinity()) return null\n\n return getEncoded(qq, compressed)\n}\n\nfunction privateAdd (d, tweak) {\n if (!isPrivate(d)) throw new TypeError(THROW_BAD_PRIVATE)\n if (!isOrderScalar(tweak)) throw new TypeError(THROW_BAD_TWEAK)\n\n const dd = fromBuffer(d)\n const tt = fromBuffer(tweak)\n const dt = toBuffer(dd.add(tt).umod(n))\n if (!isPrivate(dt)) return null\n\n return dt\n}\n\nfunction privateSub (d, tweak) {\n if (!isPrivate(d)) throw new TypeError(THROW_BAD_PRIVATE)\n if (!isOrderScalar(tweak)) throw new TypeError(THROW_BAD_TWEAK)\n\n const dd = fromBuffer(d)\n const tt = fromBuffer(tweak)\n const dt = toBuffer(dd.sub(tt).umod(n))\n if (!isPrivate(dt)) return null\n\n return dt\n}\n\nfunction sign (hash, x) {\n return __sign(hash, x)\n}\n\nfunction signWithEntropy (hash, x, addData) {\n return __sign(hash, x, addData)\n}\n\nfunction __sign (hash, x, addData) {\n if (!isScalar(hash)) throw new TypeError(THROW_BAD_HASH)\n if (!isPrivate(x)) throw new TypeError(THROW_BAD_PRIVATE)\n if (addData !== undefined && !isScalar(addData)) throw new TypeError(THROW_BAD_EXTRA_DATA)\n\n const d = fromBuffer(x)\n const e = fromBuffer(hash)\n\n let r, s\n const checkSig = function (k) {\n const kI = fromBuffer(k)\n const Q = G.mul(kI)\n\n if (Q.isInfinity()) return false\n\n r = Q.x.umod(n)\n if (r.isZero() === 0) return false\n\n s = kI\n .invm(n)\n .mul(e.add(d.mul(r)))\n .umod(n)\n if (s.isZero() === 0) return false\n\n return true\n }\n\n deterministicGenerateK(hash, x, checkSig, isPrivate, addData)\n\n // enforce low S values, see bip62: 'low s values in signatures'\n if (s.cmp(nDiv2) > 0) {\n s = n.sub(s)\n }\n\n const buffer = Buffer.allocUnsafe(64)\n toBuffer(r).copy(buffer, 0)\n toBuffer(s).copy(buffer, 32)\n return buffer\n}\n\nfunction verify (hash, q, signature, strict) {\n if (!isScalar(hash)) throw new TypeError(THROW_BAD_HASH)\n if (!isPoint(q)) throw new TypeError(THROW_BAD_POINT)\n\n // 1.4.1 Enforce r and s are both integers in the interval [1, n − 1] (1, isSignature enforces '< n - 1')\n if (!isSignature(signature)) throw new TypeError(THROW_BAD_SIGNATURE)\n\n const Q = decodeFrom(q)\n const r = fromBuffer(signature.slice(0, 32))\n const s = fromBuffer(signature.slice(32, 64))\n\n if (strict && s.cmp(nDiv2) > 0) {\n return false\n }\n\n // 1.4.1 Enforce r and s are both integers in the interval [1, n − 1] (2, enforces '> 0')\n if (r.gtn(0) <= 0 /* || r.compareTo(n) >= 0 */) return false\n if (s.gtn(0) <= 0 /* || s.compareTo(n) >= 0 */) return false\n\n // 1.4.2 H = Hash(M), already done by the user\n // 1.4.3 e = H\n const e = fromBuffer(hash)\n\n // Compute s^-1\n const sInv = s.invm(n)\n\n // 1.4.4 Compute u1 = es^−1 mod n\n // u2 = rs^−1 mod n\n const u1 = e.mul(sInv).umod(n)\n const u2 = r.mul(sInv).umod(n)\n\n // 1.4.5 Compute R = (xR, yR)\n // R = u1G + u2Q\n const R = G.mulAdd(u1, Q, u2)\n\n // 1.4.5 (cont.) Enforce R is not at infinity\n if (R.isInfinity()) return false\n\n // 1.4.6 Convert the field element R.x to an integer\n const xR = R.x\n\n // 1.4.7 Set v = xR mod n\n const v = xR.umod(n)\n\n // 1.4.8 If v = r, output \"valid\", and if v != r, output \"invalid\"\n return v.eq(r)\n}\n\nmodule.exports = {\n isPoint,\n isPointCompressed,\n isPrivate,\n pointAdd,\n pointAddScalar,\n pointCompress,\n pointFromScalar,\n pointMultiply,\n privateAdd,\n privateSub,\n sign,\n signWithEntropy,\n verify\n}\n", "const createHmac = require('create-hmac')\n\nconst ONE1 = Buffer.alloc(1, 1)\nconst ZERO1 = Buffer.alloc(1, 0)\n\n// https://tools.ietf.org/html/rfc6979#section-3.2\nfunction deterministicGenerateK (hash, x, checkSig, isPrivate, extraEntropy) {\n // Step A, ignored as hash already provided\n // Step B\n // Step C\n let k = Buffer.alloc(32, 0)\n let v = Buffer.alloc(32, 1)\n\n // Step D\n k = createHmac('sha256', k)\n .update(v)\n .update(ZERO1)\n .update(x)\n .update(hash)\n .update(extraEntropy || '')\n .digest()\n\n // Step E\n v = createHmac('sha256', k).update(v).digest()\n\n // Step F\n k = createHmac('sha256', k)\n .update(v)\n .update(ONE1)\n .update(x)\n .update(hash)\n .update(extraEntropy || '')\n .digest()\n\n // Step G\n v = createHmac('sha256', k).update(v).digest()\n\n // Step H1/H2a, ignored as tlen === qlen (256 bit)\n // Step H2b\n v = createHmac('sha256', k).update(v).digest()\n\n let T = v\n\n // Step H3, repeat until T is within the interval [1, n - 1] and is suitable for ECDSA\n while (!isPrivate(T) || !checkSig(T)) {\n k = createHmac('sha256', k)\n .update(v)\n .update(ZERO1)\n .digest()\n\n v = createHmac('sha256', k).update(v).digest()\n\n // Step H1/H2a, again, ignored as tlen === qlen (256 bit)\n // Step H2b again\n v = createHmac('sha256', k).update(v).digest()\n T = v\n }\n\n return T\n}\n\nmodule.exports = deterministicGenerateK\n", "import { fromBase64, fromHex, toUtf8 } from \"@cosmjs/encoding\";\nimport { hkdf } from \"@noble/hashes/hkdf\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { generateKeyPair, sharedKey as x25519 } from \"curve25519-js\";\nimport * as miscreant from \"miscreant\";\nimport secureRandom from \"secure-random\";\nimport { Query } from \"./grpc_gateway/secret/registration/v1beta1/query.pb\";\n\nconst cryptoProvider = new miscreant.PolyfillCryptoProvider();\n\nexport interface EncryptionUtils {\n getPubkey: () => Promise;\n decrypt: (ciphertext: Uint8Array, nonce: Uint8Array) => Promise;\n encrypt: (contractCodeHash: string, msg: object) => Promise;\n getTxEncryptionKey: (nonce: Uint8Array) => Promise;\n}\n\nconst hkdfSalt: Uint8Array = fromHex(\n \"000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d\",\n);\nconst mainnetConsensusIoPubKey = fromBase64(\n \"79++5YOHfm0SwhlpUDClv7cuCjq9xBZlWqSjDJWkRG8=\",\n);\nconst mainnetChainIds = new Set([\"secret-2\", \"secret-3\", \"secret-4\"]);\n\nexport class EncryptionUtilsImpl implements EncryptionUtils {\n private readonly seed: Uint8Array;\n private readonly privkey: Uint8Array;\n public readonly pubkey: Uint8Array;\n private consensusIoPubKey: Uint8Array = new Uint8Array(); // cache\n\n public constructor(private url: string, seed?: Uint8Array, chainId?: string) {\n if (!seed) {\n this.seed = EncryptionUtilsImpl.GenerateNewSeed();\n } else {\n if (seed.length !== 32) {\n throw new Error(\"encryptionSeed must be a Uint8Array of length 32\");\n }\n this.seed = seed;\n }\n\n const { privkey, pubkey } = EncryptionUtilsImpl.GenerateNewKeyPairFromSeed(\n this.seed,\n );\n this.privkey = privkey;\n this.pubkey = pubkey;\n\n // todo: add this again post upgrade\n if (chainId && mainnetChainIds.has(chainId)) {\n // Major speedup\n // TODO: not sure if this is the best approach for detecting mainnet\n this.consensusIoPubKey = mainnetConsensusIoPubKey;\n }\n }\n\n public static GenerateNewKeyPair(): {\n privkey: Uint8Array;\n pubkey: Uint8Array;\n } {\n return EncryptionUtilsImpl.GenerateNewKeyPairFromSeed(\n EncryptionUtilsImpl.GenerateNewSeed(),\n );\n }\n\n public static GenerateNewSeed(): Uint8Array {\n return secureRandom(32, { type: \"Uint8Array\" });\n }\n\n public static GenerateNewKeyPairFromSeed(seed: Uint8Array): {\n privkey: Uint8Array;\n pubkey: Uint8Array;\n } {\n const { private: privkey, public: pubkey } = generateKeyPair(seed);\n return { privkey, pubkey };\n }\n\n private async getConsensusIoPubKey(): Promise {\n if (this.consensusIoPubKey.length === 32) {\n return this.consensusIoPubKey;\n }\n\n const { key } = await Query.TxKey({}, { pathPrefix: this.url });\n this.consensusIoPubKey = fromBase64(key as unknown as string);\n\n return this.consensusIoPubKey;\n }\n\n public async getTxEncryptionKey(nonce: Uint8Array): Promise {\n const consensusIoPubKey = await this.getConsensusIoPubKey();\n\n const txEncryptionIkm = x25519(this.privkey, consensusIoPubKey);\n const txEncryptionKey = hkdf(\n sha256,\n Uint8Array.from([...txEncryptionIkm, ...nonce]),\n hkdfSalt,\n \"\",\n 32,\n );\n return txEncryptionKey;\n }\n\n public async encrypt(\n contractCodeHash: string,\n msg: object,\n ): Promise {\n const nonce = secureRandom(32, { type: \"Uint8Array\" });\n\n const txEncryptionKey = await this.getTxEncryptionKey(nonce);\n\n const siv = await miscreant.SIV.importKey(\n txEncryptionKey,\n \"AES-SIV\",\n cryptoProvider,\n );\n\n const plaintext = toUtf8(contractCodeHash + JSON.stringify(msg));\n\n const ciphertext = await siv.seal(plaintext, [new Uint8Array()]);\n\n // ciphertext = nonce(32) || wallet_pubkey(32) || ciphertext\n return Uint8Array.from([...nonce, ...this.pubkey, ...ciphertext]);\n }\n\n public async decrypt(\n ciphertext: Uint8Array,\n nonce: Uint8Array,\n ): Promise {\n if (!ciphertext?.length) {\n return new Uint8Array();\n }\n\n const txEncryptionKey = await this.getTxEncryptionKey(nonce);\n\n const siv = await miscreant.SIV.importKey(\n txEncryptionKey,\n \"AES-SIV\",\n cryptoProvider,\n );\n\n const plaintext = await siv.open(ciphertext, [new Uint8Array()]);\n return plaintext;\n }\n\n getPubkey(): Promise {\n return Promise.resolve(this.pubkey);\n }\n}\n", "export * from \"./permit\";\nexport * from \"./viewing_key\";\n", "import { fromBase64 } from \"@cosmjs/encoding\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport * as secp256k1 from \"@noble/secp256k1\";\nimport { bech32 } from \"bech32\";\nimport { base64PubkeyToAddress, stringToCoins } from \"../../../index\";\nimport {\n AminoSigner,\n serializeStdSignDoc,\n StdSignDoc,\n} from \"../../../wallet_amino\";\n\nexport class PermitError extends Error {\n readonly type = \"PermitError\";\n constructor(message: string) {\n super(message);\n this.name = \"PermitError\";\n }\n}\n\nexport class ContractNotInPermit extends PermitError {\n contract: string;\n allowed_contracts: string[];\n\n constructor(contract: string, allowed_contracts: string[]) {\n super(`Contract ${contract} is not allowed for this permit`);\n this.name = \"ContractNotInPermit\";\n this.contract = contract;\n this.allowed_contracts = allowed_contracts;\n }\n}\n\nexport class SignatureInvalid extends PermitError {\n signature: string;\n key: string;\n\n constructor(signature: string, key: string) {\n super(`Signature invalid`);\n this.name = \"SignatureInvalid\";\n this.key = key;\n this.signature = signature;\n }\n}\n\nexport class SignerIsNotAddress extends PermitError {\n publicKey: PubKey;\n address: string;\n\n constructor(publicKey: PubKey, address: string) {\n super(`Address ${address} is not the permit signer`);\n this.name = \"SignerIsNotAddress\";\n this.address = address;\n this.publicKey = publicKey;\n }\n}\n\nexport class PermissionNotInPermit extends PermitError {\n permission: Permission[];\n permissionsInContract: Permission[];\n\n constructor(permission: Permission[], permissionsInContract: Permission[]) {\n super(\"Permit does not contain required the permissions\");\n this.name = \"PermissionNotInPermit\";\n this.permission = permission;\n this.permissionsInContract = permissionsInContract;\n }\n}\n\nexport type Permission = \"owner\" | \"history\" | \"balance\" | \"allowance\";\n\nexport interface StdSignature {\n readonly pub_key: PubKey;\n readonly signature: string;\n}\n\nexport interface PubKey {\n readonly type: string;\n readonly value: string;\n}\n\nexport interface Permit {\n params: {\n permit_name: string;\n allowed_tokens: string[];\n chain_id: string;\n permissions: Permission[];\n };\n signature: StdSignature;\n}\n\nexport const newSignDoc = (\n chainId: string,\n permit_name: string,\n allowed_tokens: string[],\n permissions: Permission[],\n): StdSignDoc => {\n return {\n chain_id: chainId,\n account_number: \"0\", // Must be 0\n sequence: \"0\", // Must be 0\n fee: {\n amount: stringToCoins(\"0uscrt\"), // Must be 0 uscrt\n gas: \"1\", // Must be 1\n },\n msgs: [\n {\n type: \"query_permit\", // Must be \"query_permit\"\n value: {\n permit_name,\n allowed_tokens,\n permissions,\n },\n },\n ],\n memo: \"\", // Must be empty\n };\n};\n//\nexport const newPermit = async (\n signer: AminoSigner,\n owner: string,\n chainId: string,\n permitName: string,\n allowedTokens: string[],\n permissions: Permission[],\n keplr: boolean,\n): Promise => {\n let signature;\n if (!keplr) {\n // Check if the signer has \"signPermit\" function and use it instead\n signature = typeof signer.signPermit === 'function' ? \n (await signer.signPermit(\n owner,\n newSignDoc(chainId, permitName, allowedTokens, permissions))\n ).signature : \n\n (await signer.signAmino(\n owner,\n newSignDoc(chainId, permitName, allowedTokens, permissions))\n ).signature;\n }\n //@ts-ignore\n else if (!window?.keplr) {\n throw new Error(\n \"Cannot sign with Keplr - extension not enabled; enable Keplr or change signing mode\",\n );\n } else {\n //@ts-ignore\n ({ signature } = await window.keplr.signAmino(\n chainId,\n owner,\n {\n chain_id: chainId,\n account_number: \"0\", // Must be 0\n sequence: \"0\", // Must be 0\n fee: {\n amount: stringToCoins(\"0uscrt\"), // Must be 0 uscrt\n gas: \"1\", // Must be 1\n },\n msgs: [\n {\n type: \"query_permit\", // Must be \"query_permit\"\n value: {\n permit_name: permitName,\n allowed_tokens: allowedTokens,\n permissions: permissions,\n },\n },\n ],\n memo: \"\", // Must be empty\n },\n {\n preferNoSetFee: true, // Fee must be 0, so hide it from the user\n preferNoSetMemo: true, // Memo must be empty, so hide it from the user\n },\n ));\n }\n\n return {\n params: {\n chain_id: chainId,\n permit_name: permitName,\n allowed_tokens: allowedTokens,\n permissions,\n },\n signature: signature,\n };\n};\n\nexport const validatePermit = (\n permit: Permit,\n address: string,\n contract: string,\n permissions: Permission[],\n exceptions: boolean = true,\n): boolean => {\n // check if contract is valid\n let contractInPermit = permit.params.allowed_tokens.includes(contract);\n\n if (!contractInPermit) {\n if (!exceptions) {\n return false;\n }\n throw new ContractNotInPermit(contract, permit.params.allowed_tokens);\n }\n\n let permissionInPermit = permit.params.permissions.find((p) =>\n permissions.includes(p),\n );\n\n if (!permissionInPermit) {\n if (!exceptions) {\n return false;\n }\n throw new PermissionNotInPermit(permissions, permit.params.permissions);\n }\n\n let hrp = \"\";\n try {\n hrp = bech32.decode(address).prefix;\n } catch {\n throw new Error(\n `Address address=${address} must be a valid bech32 address`,\n );\n }\n\n let permitAcc = \"\";\n try {\n permitAcc = base64PubkeyToAddress(permit.signature.pub_key.value, hrp);\n } catch (e) {\n throw new PermitError(\"Pubkey invalid\");\n }\n\n if (permitAcc !== address) {\n if (!exceptions) {\n return false;\n }\n throw new SignerIsNotAddress(permit.signature.pub_key, address);\n }\n\n let sigIsValid = false;\n try {\n sigIsValid = _validate_sig(permit);\n } catch (e) {\n if (!exceptions) {\n return false;\n }\n // validation can fail if signature is malformed\n throw new SignatureInvalid(\n permit.signature.signature,\n permit.signature.pub_key.value,\n );\n }\n\n if (!sigIsValid) {\n if (!exceptions) {\n return false;\n }\n throw new SignatureInvalid(\n permit.signature.signature,\n permit.signature.pub_key.value,\n );\n }\n\n return true;\n};\n\nconst _validate_sig = (permit: Permit): boolean => {\n let signDoc = newSignDoc(\n permit.params.chain_id,\n permit.params.permit_name,\n permit.params.allowed_tokens,\n permit.params.permissions,\n );\n const messageHash = sha256(serializeStdSignDoc(signDoc));\n let sig = secp256k1.Signature.fromCompact(\n fromBase64(permit.signature.signature),\n );\n\n return secp256k1.verify(\n sig,\n messageHash,\n fromBase64(permit.signature.pub_key.value),\n );\n};\n", "import {\n AminoEip191Signer,\n AminoSigner,\n DirectSigner\n} from \"../../../wallet_amino\";\nimport {\n newPermit,\n Permission,\n Permit,\n PermitError,\n validatePermit\n} from \"./index\";\n\nexport class DirectSignerUnsupported extends PermitError {\n constructor() {\n super(\"Only amino signer is supported for permits\");\n }\n}\n\nexport class PermitSigner {\n signer: AminoSigner | DirectSigner | AminoEip191Signer;\n\n constructor(signer: AminoSigner | DirectSigner | AminoEip191Signer) {\n this.signer = signer;\n }\n\n private isAminoSigner = (\n signer: AminoSigner | DirectSigner | AminoEip191Signer,\n ): boolean => {\n return \"signAmino\" in signer;\n };\n\n _checkSigner() {\n if (!this.isAminoSigner(this.signer)) {\n throw new DirectSignerUnsupported();\n }\n }\n\n /**\n *\n * Signs a new permit based on the input parameters.\n *\n * @param owner\n * @param chainId\n * @param permitName\n * @param allowedContracts\n * @param permissions\n * @param keplr - are we signing with keplr or not?\n * @returns Permit\n */\n sign(\n owner: string,\n chainId: string,\n permitName: string,\n allowedContracts: string[],\n permissions: Permission[],\n keplr: boolean = true,\n ): Promise {\n this._checkSigner();\n\n return newPermit(\n //@ts-ignore\n this.signer,\n owner,\n chainId,\n permitName,\n allowedContracts,\n permissions,\n keplr,\n );\n }\n\n /**\n *\n * This method will verify a permit according to a contract address and a submitting address (and a set of permissions)\n * On failure an appropriate error will be thrown according to the type of error.\n *\n * @throws PermitError on any error or verification failure\n *\n * @param permit\n * @param forAddress\n * @param forContract\n * @param permissions\n */\n verify(\n permit: Permit,\n forAddress: string,\n forContract: string,\n permissions: Permission[],\n ): boolean {\n return validatePermit(permit, forAddress, forContract, permissions);\n }\n\n /**\n * Variant of the verify method that returns a boolean value instead of throwing exceptions\n *\n * @param permit\n * @param forAddress\n * @param forContract\n * @param permissions\n *\n * @returns boolean - true on success, false on verification failure\n */\n verifyNoExcept(\n permit: Permit,\n forAddress: string,\n forContract: string,\n permissions: Permission[],\n ): boolean {\n return validatePermit(permit, forAddress, forContract, permissions, false);\n }\n}\n", "import { MsgExecuteContract } from \"../../../tx\";\n\nexport interface SetViewingKeyOptions {\n set_viewing_key: {\n key: string;\n padding?: string;\n };\n}\n\nexport interface CreateViewingKeyOptions {\n create_viewing_key: {\n entropy: string;\n padding?: string;\n };\n}\n\nexport class MsgSetViewingKey extends MsgExecuteContract {}\n\nexport class MsgCreateViewingKey extends MsgExecuteContract {}\n", "import { ComputeQuerier } from \"../../query\";\nimport { Permit, ViewingKey } from \"../access_control\";\nimport {\n QueryAllBalancesResponse,\n QueryAllBalancesWithPermit,\n QueryAllBalancesWithViewingKey,\n QueryBalanceResponse,\n QueryBalanceWithPermit,\n QueryBalanceWithViewingKey,\n} from \"./msg/getBalance\";\nimport {\n QueryPrivateTokenInfoResponse,\n QueryPrivateTokenInfoWithPermit,\n QueryPrivateTokenInfoWithViewingKey,\n} from \"./msg/getPrivateTokenInfo\";\nimport {\n QueryTokenIdPublicInfo,\n QueryTokenIdPublicInfoResponse,\n} from \"./msg/getPublicTokenInfo\";\nimport {\n QueryTransactionHistoryResponse,\n QueryTransactionHistoryWithPermit,\n QueryTransactionHistoryWithViewingKey,\n} from \"./msg/getTransactionHistory\";\n\ninterface Auth {\n permit?: Permit;\n viewer?: {\n viewing_key: ViewingKey;\n address: string;\n };\n}\n\ninterface SecretContract {\n address: string;\n // switch this to optional after we enable automatic code hash\n code_hash?: string;\n}\n\nexport class Snip1155Querier extends ComputeQuerier {\n getBalance = async ({\n contract,\n token_id,\n owner,\n auth,\n }: {\n contract: SecretContract;\n token_id: string;\n owner: string;\n auth: Auth;\n }): Promise => {\n if (auth.viewer) {\n return await this.queryContract<\n QueryBalanceWithViewingKey,\n QueryBalanceResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n balance: {\n token_id,\n owner,\n viewer: auth.viewer.address,\n key: auth.viewer.viewing_key,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n QueryBalanceWithPermit,\n QueryBalanceResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n balance: {\n token_id,\n owner,\n },\n },\n },\n },\n });\n }\n throw new Error(\"Empty auth parameter for authenticated query: GetBalance\");\n };\n\n getAllBalances = async ({\n contract,\n auth,\n owner,\n tx_history_page,\n tx_history_page_size,\n }: {\n contract: SecretContract;\n auth: Auth;\n owner?: string;\n tx_history_page?: number;\n tx_history_page_size?: number;\n }): Promise => {\n if (auth.viewer && owner) {\n if (auth.viewer.address !== owner) {\n throw new Error(\"only owner can query all balances\")\n }\n return await this.queryContract<\n QueryAllBalancesWithViewingKey,\n QueryAllBalancesResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n all_balances: {\n owner,\n key: auth.viewer.viewing_key,\n tx_history_page,\n tx_history_page_size,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n QueryAllBalancesWithPermit,\n QueryAllBalancesResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n all_balances: {\n tx_history_page,\n tx_history_page_size,\n },\n },\n },\n },\n });\n }\n throw new Error(\n \"Empty auth parameter for authenticated query: GetAllBalances\",\n );\n };\n\n getTransactionHistory = async ({\n contract,\n auth,\n page_size,\n page,\n }: {\n contract: SecretContract;\n auth: Auth;\n page_size: number;\n page?: number;\n }): Promise => {\n if (auth.viewer) {\n return this.queryContract<\n QueryTransactionHistoryWithViewingKey,\n QueryTransactionHistoryResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n transaction_history: {\n key: auth.viewer.viewing_key,\n address: auth.viewer.address,\n page_size,\n page,\n },\n },\n });\n } else if (auth.permit) {\n return this.queryContract<\n QueryTransactionHistoryWithPermit,\n QueryTransactionHistoryResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n transaction_history: {\n page_size,\n page,\n },\n },\n },\n },\n });\n }\n throw new Error(\n \"Empty auth parameter for authenticated query: getTransactionHistory\",\n );\n };\n\n getPublicTokenInfo = async ({\n contract,\n token_id,\n }: {\n contract: SecretContract;\n token_id: string;\n }): Promise => {\n return await this.queryContract<\n QueryTokenIdPublicInfo,\n QueryTokenIdPublicInfoResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n token_id_public_info: {\n token_id,\n },\n },\n });\n };\n\n getPrivateTokenInfo = async ({\n contract,\n token_id,\n auth,\n }: {\n contract: SecretContract;\n token_id: string;\n auth: Auth;\n }): Promise => {\n if (auth.viewer) {\n return await this.queryContract<\n QueryPrivateTokenInfoWithViewingKey,\n QueryPrivateTokenInfoResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n token_id_private_info: {\n token_id,\n address: auth.viewer.address,\n key: auth.viewer.viewing_key,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n QueryPrivateTokenInfoWithPermit,\n QueryPrivateTokenInfoResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n token_id_private_info: {\n token_id,\n },\n },\n },\n },\n });\n }\n\n throw new Error(\n \"Empty auth parameter for authenticated query: getTransactionHistory\",\n );\n };\n}\n", "import { MsgExecuteContract } from \"../../tx\";\nimport {\n Snip1155AddCuratorOptions,\n Snip1155AddMinterOptions,\n Snip1155BatchSendOptions,\n Snip1155BatchTransferOptions,\n Snip1155BurnTokensOptions,\n Snip1155ChangeAdminOptions,\n Snip1155ChangeMetaDataOptions,\n Snip1155CurateTokensOptions,\n Snip1155MintTokensOptions,\n Snip1155RemoveAdminOptions,\n Snip1155RemoveCuratorOptions,\n Snip1155RemoveMinterOptions,\n Snip1155SendOptions,\n} from \"./types\";\n\nexport class MsgSnip1155ChangeAdmin extends MsgExecuteContract {}\nexport class MsgSnip1155RemoveAdmin extends MsgExecuteContract {}\n\nexport class MsgSnip1155CurateTokens extends MsgExecuteContract {}\n\nexport class MsgSnip1155AddCurator extends MsgExecuteContract {}\nexport class MsgSnip1155RemoveCurator extends MsgExecuteContract {}\n\nexport class MsgSnip1155Send extends MsgExecuteContract {}\nexport class MsgSnip1155BatchSend extends MsgExecuteContract {}\n\nexport class MsgSnip1155Mint extends MsgExecuteContract {}\nexport class MsgSnip1155Burn extends MsgExecuteContract {}\n\nexport class MsgSnip1155Transfer extends MsgExecuteContract {}\nexport class MsgSnip1155BatchTransfer extends MsgExecuteContract {}\n\nexport class MsgSnipAddMinter extends MsgExecuteContract {}\nexport class MsgSnip1155RemoveMinter extends MsgExecuteContract {}\n\nexport class MsgSnip1155ChangeMetadata extends MsgExecuteContract {}\n", "export * from \"./query\";\nexport * from \"./tx\";\n", "import { ComputeQuerier } from \"../../\";\nimport { Permit, ViewingKey } from \"../access_control\";\nimport {\n GetAllowanceRequest,\n GetAllowanceRequestWithPermit,\n GetAllowanceResponse,\n GetBalanceRequest,\n GetBalanceRequestWithPermit,\n GetBalanceResponse,\n GetTokenParamsRequest,\n GetTokenParamsResponse,\n GetTransactionHistoryRequest,\n GetTransactionHistoryRequestWithPermit,\n GetTransferHistoryRequest,\n GetTransferHistoryRequestWithPermit,\n TransactionHistoryResponse,\n TransferHistoryResponse,\n} from \"./types\";\n\ninterface SecretContract {\n address: string;\n // switch this to optional after we enable automatic code hash\n code_hash: string;\n}\n\nexport class Snip20Querier extends ComputeQuerier {\n getSnip20Params = async ({\n contract,\n }: {\n contract: SecretContract;\n }): Promise => {\n return await this.queryContract<\n GetTokenParamsRequest,\n GetTokenParamsResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n token_info: {},\n },\n });\n };\n\n getBalance = async ({\n contract,\n address,\n auth,\n }: {\n contract: SecretContract;\n address: string;\n auth: {\n permit?: Permit;\n key?: ViewingKey;\n };\n }): Promise => {\n if (auth.key) {\n return await this.queryContract({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n balance: {\n address,\n key: auth.key,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n GetBalanceRequestWithPermit,\n GetBalanceResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n balance: {},\n },\n },\n },\n });\n }\n\n throw new Error(\"Empty auth parameter for authenticated query: GetBalance\");\n };\n\n getTransferHistory = async ({\n contract,\n address,\n auth,\n page,\n page_size,\n should_filter_decoys,\n }: {\n contract: SecretContract;\n address: string;\n auth: {\n permit?: Permit;\n key?: ViewingKey;\n };\n page?: number;\n page_size: number;\n should_filter_decoys?: boolean;\n }): Promise => {\n if (auth.key) {\n return await this.queryContract<\n GetTransferHistoryRequest,\n TransferHistoryResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n transfer_history: {\n address,\n key: auth.key,\n page,\n page_size,\n should_filter_decoys,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n GetTransferHistoryRequestWithPermit,\n TransferHistoryResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n transfer_history: {\n page,\n page_size,\n should_filter_decoys,\n },\n },\n },\n },\n });\n }\n\n throw new Error(\n \"Empty auth parameter for authenticated query: getTransferHistory\",\n );\n };\n\n getTransactionHistory = async ({\n contract,\n address,\n auth,\n page,\n page_size,\n should_filter_decoys,\n }: {\n contract: SecretContract;\n address: string;\n auth: {\n permit?: Permit;\n key?: ViewingKey;\n };\n page?: number;\n page_size: number;\n should_filter_decoys?: boolean;\n }): Promise => {\n if (auth.key) {\n return await this.queryContract<\n GetTransactionHistoryRequest,\n TransactionHistoryResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n transaction_history: {\n address,\n key: auth.key,\n page,\n page_size,\n should_filter_decoys,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n GetTransactionHistoryRequestWithPermit,\n TransactionHistoryResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n transaction_history: {\n page,\n page_size,\n should_filter_decoys,\n },\n },\n },\n },\n });\n }\n\n throw new Error(\n \"Empty auth parameter for authenticated query: getTransactionHistory\",\n );\n };\n\n GetAllowance = async ({\n contract,\n owner,\n spender,\n auth,\n }: {\n contract: SecretContract;\n owner: string;\n spender: string;\n auth: {\n permit?: Permit;\n key?: ViewingKey;\n };\n }): Promise => {\n if (auth.key) {\n return await this.queryContract<\n GetAllowanceRequest,\n GetAllowanceResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n allowance: {\n owner,\n spender,\n key: auth.key,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n GetAllowanceRequestWithPermit,\n GetAllowanceResponse\n >({\n contract_address: contract.address,\n code_hash: contract.code_hash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n allowance: {\n owner,\n spender,\n },\n },\n },\n },\n });\n }\n throw new Error(\n \"Empty auth parameter for authenticated query: GetAllowance\",\n );\n };\n}\n", "import { MsgExecuteContract } from \"../../tx\";\nimport {\n Snip20DecreaseAllowanceOptions,\n Snip20IncreaseAllowanceOptions,\n Snip20SendOptions,\n Snip20SetViewingKeyOptions,\n Snip20TransferOptions\n} from \"./types\";\n\nexport class MsgSnip20Send extends MsgExecuteContract {}\n\nexport class MsgSnip20Transfer extends MsgExecuteContract {}\n\nexport class MsgSnip20IncreaseAllowance extends MsgExecuteContract {}\n\nexport class MsgSnip20DecreaseAllowance extends MsgExecuteContract {}\n\nexport class MsgSnip20SetViewingKey extends MsgExecuteContract {}\n", "export * from \"./query\";\nexport * from \"./tx\";\n", "import { ComputeQuerier } from \"../../query\";\nimport { Permit, ViewingKey } from \"../access_control\";\nimport {\n GetTokenInfoRequest,\n GetTokenInfoRequestWithPermit,\n GetTokenInfoResponse,\n} from \"./msg/GetTokenInfo\";\n\nimport {\n Snip721GetTokensRequest,\n Snip721GetTokensRequestWithPermit,\n Snip721GetTokensResponse,\n} from \"./msg/GetTokens\";\n\ninterface SecretContract {\n address: string;\n // switch this to optional after we enable automatic code hash\n codeHash: string;\n}\n\ninterface Auth {\n permit?: Permit;\n viewer?: {\n viewing_key: ViewingKey;\n address: string;\n };\n}\n\nexport class Snip721Querier extends ComputeQuerier {\n GetTokenInfo = async ({\n contract,\n auth,\n token_id,\n }: {\n contract: SecretContract;\n auth: Auth;\n token_id: string;\n }): Promise => {\n if (auth.viewer) {\n return await this.queryContract<\n GetTokenInfoRequest,\n GetTokenInfoResponse\n >({\n contract_address: contract.address,\n code_hash: contract.codeHash,\n query: {\n all_nft_info: {\n token_id,\n viewer: auth.viewer,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n GetTokenInfoRequestWithPermit,\n GetTokenInfoResponse\n >({\n contract_address: contract.address,\n code_hash: contract.codeHash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n all_nft_info: {\n token_id,\n },\n },\n },\n },\n });\n }\n\n throw new Error(\n \"Empty auth parameter for authenticated query: GetTokenInfo\",\n );\n };\n\n GetOwnedTokens = async ({\n contract,\n auth,\n owner,\n }: {\n contract: SecretContract;\n auth: Auth;\n owner: string;\n }): Promise => {\n if (auth.viewer) {\n return await this.queryContract<\n Snip721GetTokensRequest,\n Snip721GetTokensResponse\n >({\n contract_address: contract.address,\n code_hash: contract.codeHash,\n query: {\n tokens: {\n owner,\n viewing_key: auth.viewer.viewing_key,\n },\n },\n });\n } else if (auth.permit) {\n return await this.queryContract<\n Snip721GetTokensRequestWithPermit,\n Snip721GetTokensResponse\n >({\n contract_address: contract.address,\n code_hash: contract.codeHash,\n query: {\n with_permit: {\n permit: auth.permit,\n query: {\n tokens: {\n owner,\n },\n },\n },\n },\n });\n }\n\n throw new Error(\n \"Empty auth parameter for authenticated query: GetOwnedTokens\",\n );\n };\n}\n", "import { MsgExecuteContract } from \"../../tx\";\nimport {\n Snip721AddMinterOptions,\n Snip721MintOptions,\n Snip721SendOptions,\n} from \"./types\";\n\nexport class MsgSnip721Send extends MsgExecuteContract {}\nexport class MsgSnip721AddMinter extends MsgExecuteContract {}\nexport class MsgSnip721Mint extends MsgExecuteContract {}\n", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as GoogleProtobufAny from \"../../../google/protobuf/any.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosAuthV1beta1Auth from \"./auth.pb\"\nexport type QueryAccountsRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryAccountsResponse = {\n accounts?: GoogleProtobufAny.Any[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryAccountRequest = {\n address?: string\n}\n\nexport type QueryAccountResponse = {\n account?: GoogleProtobufAny.Any\n}\n\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: CosmosAuthV1beta1Auth.Params\n}\n\nexport type QueryModuleAccountByNameRequest = {\n name?: string\n}\n\nexport type QueryModuleAccountByNameResponse = {\n account?: GoogleProtobufAny.Any\n}\n\nexport class Query {\n static Accounts(req: QueryAccountsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/auth/v1beta1/accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static Account(req: QueryAccountRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/auth/v1beta1/accounts/${req[\"address\"]}?${fm.renderURLSearchParams(req, [\"address\"])}`, {...initReq, method: \"GET\"})\n }\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/auth/v1beta1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static ModuleAccountByName(req: QueryModuleAccountByNameRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/auth/v1beta1/module_accounts/${req[\"name\"]}?${fm.renderURLSearchParams(req, [\"name\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosAuthzV1beta1Authz from \"./authz.pb\"\nexport type QueryGrantsRequest = {\n granter?: string\n grantee?: string\n msg_type_url?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryGrantsResponse = {\n grants?: CosmosAuthzV1beta1Authz.Grant[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryGranterGrantsRequest = {\n granter?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryGranterGrantsResponse = {\n grants?: CosmosAuthzV1beta1Authz.GrantAuthorization[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryGranteeGrantsRequest = {\n grantee?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryGranteeGrantsResponse = {\n grants?: CosmosAuthzV1beta1Authz.GrantAuthorization[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport class Query {\n static Grants(req: QueryGrantsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/authz/v1beta1/grants?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static GranterGrants(req: QueryGranterGrantsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/authz/v1beta1/grants/granter/${req[\"granter\"]}?${fm.renderURLSearchParams(req, [\"granter\"])}`, {...initReq, method: \"GET\"})\n }\n static GranteeGrants(req: QueryGranteeGrantsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/authz/v1beta1/grants/grantee/${req[\"grantee\"]}?${fm.renderURLSearchParams(req, [\"grantee\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosBaseV1beta1Coin from \"../../base/v1beta1/coin.pb\"\nimport * as CosmosBankV1beta1Bank from \"./bank.pb\"\nexport type QueryBalanceRequest = {\n address?: string\n denom?: string\n}\n\nexport type QueryBalanceResponse = {\n balance?: CosmosBaseV1beta1Coin.Coin\n}\n\nexport type QueryAllBalancesRequest = {\n address?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryAllBalancesResponse = {\n balances?: CosmosBaseV1beta1Coin.Coin[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QuerySpendableBalancesRequest = {\n address?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QuerySpendableBalancesResponse = {\n balances?: CosmosBaseV1beta1Coin.Coin[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryTotalSupplyRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryTotalSupplyResponse = {\n supply?: CosmosBaseV1beta1Coin.Coin[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QuerySupplyOfRequest = {\n denom?: string\n}\n\nexport type QuerySupplyOfResponse = {\n amount?: CosmosBaseV1beta1Coin.Coin\n}\n\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: CosmosBankV1beta1Bank.Params\n}\n\nexport type QueryDenomsMetadataRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryDenomsMetadataResponse = {\n metadatas?: CosmosBankV1beta1Bank.Metadata[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryDenomMetadataRequest = {\n denom?: string\n}\n\nexport type QueryDenomMetadataResponse = {\n metadata?: CosmosBankV1beta1Bank.Metadata\n}\n\nexport class Query {\n static Balance(req: QueryBalanceRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/bank/v1beta1/balances/${req[\"address\"]}/by_denom?${fm.renderURLSearchParams(req, [\"address\"])}`, {...initReq, method: \"GET\"})\n }\n static AllBalances(req: QueryAllBalancesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/bank/v1beta1/balances/${req[\"address\"]}?${fm.renderURLSearchParams(req, [\"address\"])}`, {...initReq, method: \"GET\"})\n }\n static SpendableBalances(req: QuerySpendableBalancesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/bank/v1beta1/spendable_balances/${req[\"address\"]}?${fm.renderURLSearchParams(req, [\"address\"])}`, {...initReq, method: \"GET\"})\n }\n static TotalSupply(req: QueryTotalSupplyRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/bank/v1beta1/supply?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static SupplyOf(req: QuerySupplyOfRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/bank/v1beta1/supply/${req[\"denom\"]}?${fm.renderURLSearchParams(req, [\"denom\"])}`, {...initReq, method: \"GET\"})\n }\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/bank/v1beta1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static DenomMetadata(req: QueryDenomMetadataRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/bank/v1beta1/denoms_metadata/${req[\"denom\"]}?${fm.renderURLSearchParams(req, [\"denom\"])}`, {...initReq, method: \"GET\"})\n }\n static DenomsMetadata(req: QueryDenomsMetadataRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/bank/v1beta1/denoms_metadata?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../../fetch.pb\"\nexport type ConfigRequest = {\n}\n\nexport type ConfigResponse = {\n minimum_gas_price?: string\n}\n\nexport class Service {\n static Config(req: ConfigRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/base/node/v1beta1/config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../../fetch.pb\"\nimport * as GoogleProtobufAny from \"../../../../google/protobuf/any.pb\"\nimport * as TendermintP2pTypes from \"../../../../tendermint/p2p/types.pb\"\nimport * as TendermintTypesBlock from \"../../../../tendermint/types/block.pb\"\nimport * as TendermintTypesTypes from \"../../../../tendermint/types/types.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../query/v1beta1/pagination.pb\"\nexport type GetValidatorSetByHeightRequest = {\n height?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type GetValidatorSetByHeightResponse = {\n block_height?: string\n validators?: Validator[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type GetLatestValidatorSetRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type GetLatestValidatorSetResponse = {\n block_height?: string\n validators?: Validator[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type Validator = {\n address?: string\n pub_key?: GoogleProtobufAny.Any\n voting_power?: string\n proposer_priority?: string\n}\n\nexport type GetBlockByHeightRequest = {\n height?: string\n}\n\nexport type GetBlockByHeightResponse = {\n block_id?: TendermintTypesTypes.BlockID\n block?: TendermintTypesBlock.Block\n}\n\nexport type GetLatestBlockRequest = {\n}\n\nexport type GetLatestBlockResponse = {\n block_id?: TendermintTypesTypes.BlockID\n block?: TendermintTypesBlock.Block\n}\n\nexport type GetSyncingRequest = {\n}\n\nexport type GetSyncingResponse = {\n syncing?: boolean\n}\n\nexport type GetNodeInfoRequest = {\n}\n\nexport type GetNodeInfoResponse = {\n default_node_info?: TendermintP2pTypes.DefaultNodeInfo\n application_version?: VersionInfo\n}\n\nexport type VersionInfo = {\n name?: string\n app_name?: string\n version?: string\n git_commit?: string\n build_tags?: string\n go_version?: string\n build_deps?: Module[]\n cosmos_sdk_version?: string\n}\n\nexport type Module = {\n path?: string\n version?: string\n sum?: string\n}\n\nexport class Service {\n static GetNodeInfo(req: GetNodeInfoRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/base/tendermint/v1beta1/node_info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static GetSyncing(req: GetSyncingRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/base/tendermint/v1beta1/syncing?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static GetLatestBlock(req: GetLatestBlockRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/base/tendermint/v1beta1/blocks/latest?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static GetBlockByHeight(req: GetBlockByHeightRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/base/tendermint/v1beta1/blocks/${req[\"height\"]}?${fm.renderURLSearchParams(req, [\"height\"])}`, {...initReq, method: \"GET\"})\n }\n static GetLatestValidatorSet(req: GetLatestValidatorSetRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/base/tendermint/v1beta1/validatorsets/latest?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static GetValidatorSetByHeight(req: GetValidatorSetByHeightRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/base/tendermint/v1beta1/validatorsets/${req[\"height\"]}?${fm.renderURLSearchParams(req, [\"height\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosBaseV1beta1Coin from \"../../base/v1beta1/coin.pb\"\nimport * as CosmosDistributionV1beta1Distribution from \"./distribution.pb\"\nexport type QueryRestakeEntriesRequest = {\n delegator?: string\n}\n\nexport type QueryRestakingEntriesResponse = {\n validators?: string[]\n}\n\nexport type QueryRestakeThresholdRequest = {\n}\n\nexport type QueryRestakeThresholdResponse = {\n threshold?: string\n}\n\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: CosmosDistributionV1beta1Distribution.Params\n}\n\nexport type QueryValidatorOutstandingRewardsRequest = {\n validator_address?: string\n}\n\nexport type QueryValidatorOutstandingRewardsResponse = {\n rewards?: CosmosDistributionV1beta1Distribution.ValidatorOutstandingRewards\n}\n\nexport type QueryValidatorCommissionRequest = {\n validator_address?: string\n}\n\nexport type QueryValidatorCommissionResponse = {\n commission?: CosmosDistributionV1beta1Distribution.ValidatorAccumulatedCommission\n}\n\nexport type QueryValidatorSlashesRequest = {\n validator_address?: string\n starting_height?: string\n ending_height?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryValidatorSlashesResponse = {\n slashes?: CosmosDistributionV1beta1Distribution.ValidatorSlashEvent[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryDelegationRewardsRequest = {\n delegator_address?: string\n validator_address?: string\n}\n\nexport type QueryDelegationRewardsResponse = {\n rewards?: CosmosBaseV1beta1Coin.DecCoin[]\n}\n\nexport type QueryDelegationTotalRewardsRequest = {\n delegator_address?: string\n}\n\nexport type QueryDelegationTotalRewardsResponse = {\n rewards?: CosmosDistributionV1beta1Distribution.DelegationDelegatorReward[]\n total?: CosmosBaseV1beta1Coin.DecCoin[]\n}\n\nexport type QueryDelegatorValidatorsRequest = {\n delegator_address?: string\n}\n\nexport type QueryDelegatorValidatorsResponse = {\n validators?: string[]\n}\n\nexport type QueryDelegatorWithdrawAddressRequest = {\n delegator_address?: string\n}\n\nexport type QueryDelegatorWithdrawAddressResponse = {\n withdraw_address?: string\n}\n\nexport type QueryFoundationTaxRequest = {\n}\n\nexport type QueryFoundationTaxResponse = {\n tax?: string\n foundation_address?: string\n}\n\nexport type QueryCommunityPoolRequest = {\n}\n\nexport type QueryCommunityPoolResponse = {\n pool?: CosmosBaseV1beta1Coin.DecCoin[]\n}\n\nexport class Query {\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static ValidatorOutstandingRewards(req: QueryValidatorOutstandingRewardsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/validators/${req[\"validator_address\"]}/outstanding_rewards?${fm.renderURLSearchParams(req, [\"validator_address\"])}`, {...initReq, method: \"GET\"})\n }\n static ValidatorCommission(req: QueryValidatorCommissionRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/validators/${req[\"validator_address\"]}/commission?${fm.renderURLSearchParams(req, [\"validator_address\"])}`, {...initReq, method: \"GET\"})\n }\n static ValidatorSlashes(req: QueryValidatorSlashesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/validators/${req[\"validator_address\"]}/slashes?${fm.renderURLSearchParams(req, [\"validator_address\"])}`, {...initReq, method: \"GET\"})\n }\n static DelegationRewards(req: QueryDelegationRewardsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/delegators/${req[\"delegator_address\"]}/rewards/${req[\"validator_address\"]}?${fm.renderURLSearchParams(req, [\"delegator_address\", \"validator_address\"])}`, {...initReq, method: \"GET\"})\n }\n static DelegationTotalRewards(req: QueryDelegationTotalRewardsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/delegators/${req[\"delegator_address\"]}/rewards?${fm.renderURLSearchParams(req, [\"delegator_address\"])}`, {...initReq, method: \"GET\"})\n }\n static DelegatorValidators(req: QueryDelegatorValidatorsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/delegators/${req[\"delegator_address\"]}/validators?${fm.renderURLSearchParams(req, [\"delegator_address\"])}`, {...initReq, method: \"GET\"})\n }\n static DelegatorWithdrawAddress(req: QueryDelegatorWithdrawAddressRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/delegators/${req[\"delegator_address\"]}/withdraw_address?${fm.renderURLSearchParams(req, [\"delegator_address\"])}`, {...initReq, method: \"GET\"})\n }\n static CommunityPool(req: QueryCommunityPoolRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/community_pool?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static FoundationTax(req: QueryFoundationTaxRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/foundation_tax?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static RestakeThreshold(req: QueryRestakeThresholdRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/restake_threshold?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static RestakingEntries(req: QueryRestakeEntriesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/distribution/v1beta1/restake_entries?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as GoogleProtobufAny from \"../../../google/protobuf/any.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nexport type QueryEvidenceRequest = {\n evidence_hash?: Uint8Array\n}\n\nexport type QueryEvidenceResponse = {\n evidence?: GoogleProtobufAny.Any\n}\n\nexport type QueryAllEvidenceRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryAllEvidenceResponse = {\n evidence?: GoogleProtobufAny.Any[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport class Query {\n static Evidence(req: QueryEvidenceRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/evidence/v1beta1/evidence/${req[\"evidence_hash\"]}?${fm.renderURLSearchParams(req, [\"evidence_hash\"])}`, {...initReq, method: \"GET\"})\n }\n static AllEvidence(req: QueryAllEvidenceRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/evidence/v1beta1/evidence?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosFeegrantV1beta1Feegrant from \"./feegrant.pb\"\nexport type QueryAllowanceRequest = {\n granter?: string\n grantee?: string\n}\n\nexport type QueryAllowanceResponse = {\n allowance?: CosmosFeegrantV1beta1Feegrant.Grant\n}\n\nexport type QueryAllowancesRequest = {\n grantee?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryAllowancesResponse = {\n allowances?: CosmosFeegrantV1beta1Feegrant.Grant[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryAllowancesByGranterRequest = {\n granter?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryAllowancesByGranterResponse = {\n allowances?: CosmosFeegrantV1beta1Feegrant.Grant[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport class Query {\n static Allowance(req: QueryAllowanceRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/feegrant/v1beta1/allowance/${req[\"granter\"]}/${req[\"grantee\"]}?${fm.renderURLSearchParams(req, [\"granter\", \"grantee\"])}`, {...initReq, method: \"GET\"})\n }\n static Allowances(req: QueryAllowancesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/feegrant/v1beta1/allowances/${req[\"grantee\"]}?${fm.renderURLSearchParams(req, [\"grantee\"])}`, {...initReq, method: \"GET\"})\n }\n static AllowancesByGranter(req: QueryAllowancesByGranterRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/feegrant/v1beta1/issued/${req[\"granter\"]}?${fm.renderURLSearchParams(req, [\"granter\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosGovV1beta1Gov from \"./gov.pb\"\nexport type QueryProposalRequest = {\n proposal_id?: string\n}\n\nexport type QueryProposalResponse = {\n proposal?: CosmosGovV1beta1Gov.Proposal\n}\n\nexport type QueryProposalsRequest = {\n proposal_status?: CosmosGovV1beta1Gov.ProposalStatus\n voter?: string\n depositor?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryProposalsResponse = {\n proposals?: CosmosGovV1beta1Gov.Proposal[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryVoteRequest = {\n proposal_id?: string\n voter?: string\n}\n\nexport type QueryVoteResponse = {\n vote?: CosmosGovV1beta1Gov.Vote\n}\n\nexport type QueryVotesRequest = {\n proposal_id?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryVotesResponse = {\n votes?: CosmosGovV1beta1Gov.Vote[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryParamsRequest = {\n params_type?: string\n}\n\nexport type QueryParamsResponse = {\n voting_params?: CosmosGovV1beta1Gov.VotingParams\n deposit_params?: CosmosGovV1beta1Gov.DepositParams\n tally_params?: CosmosGovV1beta1Gov.TallyParams\n}\n\nexport type QueryDepositRequest = {\n proposal_id?: string\n depositor?: string\n}\n\nexport type QueryDepositResponse = {\n deposit?: CosmosGovV1beta1Gov.Deposit\n}\n\nexport type QueryDepositsRequest = {\n proposal_id?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryDepositsResponse = {\n deposits?: CosmosGovV1beta1Gov.Deposit[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryTallyResultRequest = {\n proposal_id?: string\n}\n\nexport type QueryTallyResultResponse = {\n tally?: CosmosGovV1beta1Gov.TallyResult\n}\n\nexport class Query {\n static Proposal(req: QueryProposalRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/gov/v1beta1/proposals/${req[\"proposal_id\"]}?${fm.renderURLSearchParams(req, [\"proposal_id\"])}`, {...initReq, method: \"GET\"})\n }\n static Proposals(req: QueryProposalsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/gov/v1beta1/proposals?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static Vote(req: QueryVoteRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/gov/v1beta1/proposals/${req[\"proposal_id\"]}/votes/${req[\"voter\"]}?${fm.renderURLSearchParams(req, [\"proposal_id\", \"voter\"])}`, {...initReq, method: \"GET\"})\n }\n static Votes(req: QueryVotesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/gov/v1beta1/proposals/${req[\"proposal_id\"]}/votes?${fm.renderURLSearchParams(req, [\"proposal_id\"])}`, {...initReq, method: \"GET\"})\n }\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/gov/v1beta1/params/${req[\"params_type\"]}?${fm.renderURLSearchParams(req, [\"params_type\"])}`, {...initReq, method: \"GET\"})\n }\n static Deposit(req: QueryDepositRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/gov/v1beta1/proposals/${req[\"proposal_id\"]}/deposits/${req[\"depositor\"]}?${fm.renderURLSearchParams(req, [\"proposal_id\", \"depositor\"])}`, {...initReq, method: \"GET\"})\n }\n static Deposits(req: QueryDepositsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/gov/v1beta1/proposals/${req[\"proposal_id\"]}/deposits?${fm.renderURLSearchParams(req, [\"proposal_id\"])}`, {...initReq, method: \"GET\"})\n }\n static TallyResult(req: QueryTallyResultRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/gov/v1beta1/proposals/${req[\"proposal_id\"]}/tally?${fm.renderURLSearchParams(req, [\"proposal_id\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosMintV1beta1Mint from \"./mint.pb\"\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: CosmosMintV1beta1Mint.Params\n}\n\nexport type QueryInflationRequest = {\n}\n\nexport type QueryInflationResponse = {\n inflation?: Uint8Array\n}\n\nexport type QueryAnnualProvisionsRequest = {\n}\n\nexport type QueryAnnualProvisionsResponse = {\n annual_provisions?: Uint8Array\n}\n\nexport class Query {\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/mint/v1beta1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static Inflation(req: QueryInflationRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/mint/v1beta1/inflation?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static AnnualProvisions(req: QueryAnnualProvisionsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/mint/v1beta1/annual_provisions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosParamsV1beta1Params from \"./params.pb\"\nexport type QueryParamsRequest = {\n subspace?: string\n key?: string\n}\n\nexport type QueryParamsResponse = {\n param?: CosmosParamsV1beta1Params.ParamChange\n}\n\nexport class Query {\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/params/v1beta1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosSlashingV1beta1Slashing from \"./slashing.pb\"\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: CosmosSlashingV1beta1Slashing.Params\n}\n\nexport type QuerySigningInfoRequest = {\n cons_address?: string\n}\n\nexport type QuerySigningInfoResponse = {\n val_signing_info?: CosmosSlashingV1beta1Slashing.ValidatorSigningInfo\n}\n\nexport type QuerySigningInfosRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QuerySigningInfosResponse = {\n info?: CosmosSlashingV1beta1Slashing.ValidatorSigningInfo[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport class Query {\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/slashing/v1beta1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static SigningInfo(req: QuerySigningInfoRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/slashing/v1beta1/signing_infos/${req[\"cons_address\"]}?${fm.renderURLSearchParams(req, [\"cons_address\"])}`, {...initReq, method: \"GET\"})\n }\n static SigningInfos(req: QuerySigningInfosRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/slashing/v1beta1/signing_infos?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosStakingV1beta1Staking from \"./staking.pb\"\nexport type QueryValidatorsRequest = {\n status?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryValidatorsResponse = {\n validators?: CosmosStakingV1beta1Staking.Validator[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryValidatorRequest = {\n validator_addr?: string\n}\n\nexport type QueryValidatorResponse = {\n validator?: CosmosStakingV1beta1Staking.Validator\n}\n\nexport type QueryValidatorDelegationsRequest = {\n validator_addr?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryValidatorDelegationsResponse = {\n delegation_responses?: CosmosStakingV1beta1Staking.DelegationResponse[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryValidatorUnbondingDelegationsRequest = {\n validator_addr?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryValidatorUnbondingDelegationsResponse = {\n unbonding_responses?: CosmosStakingV1beta1Staking.UnbondingDelegation[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryDelegationRequest = {\n delegator_addr?: string\n validator_addr?: string\n}\n\nexport type QueryDelegationResponse = {\n delegation_response?: CosmosStakingV1beta1Staking.DelegationResponse\n}\n\nexport type QueryUnbondingDelegationRequest = {\n delegator_addr?: string\n validator_addr?: string\n}\n\nexport type QueryUnbondingDelegationResponse = {\n unbond?: CosmosStakingV1beta1Staking.UnbondingDelegation\n}\n\nexport type QueryDelegatorDelegationsRequest = {\n delegator_addr?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryDelegatorDelegationsResponse = {\n delegation_responses?: CosmosStakingV1beta1Staking.DelegationResponse[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryDelegatorUnbondingDelegationsRequest = {\n delegator_addr?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryDelegatorUnbondingDelegationsResponse = {\n unbonding_responses?: CosmosStakingV1beta1Staking.UnbondingDelegation[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryRedelegationsRequest = {\n delegator_addr?: string\n src_validator_addr?: string\n dst_validator_addr?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryRedelegationsResponse = {\n redelegation_responses?: CosmosStakingV1beta1Staking.RedelegationResponse[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryDelegatorValidatorsRequest = {\n delegator_addr?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryDelegatorValidatorsResponse = {\n validators?: CosmosStakingV1beta1Staking.Validator[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryDelegatorValidatorRequest = {\n delegator_addr?: string\n validator_addr?: string\n}\n\nexport type QueryDelegatorValidatorResponse = {\n validator?: CosmosStakingV1beta1Staking.Validator\n}\n\nexport type QueryHistoricalInfoRequest = {\n height?: string\n}\n\nexport type QueryHistoricalInfoResponse = {\n hist?: CosmosStakingV1beta1Staking.HistoricalInfo\n}\n\nexport type QueryPoolRequest = {\n}\n\nexport type QueryPoolResponse = {\n pool?: CosmosStakingV1beta1Staking.Pool\n}\n\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: CosmosStakingV1beta1Staking.Params\n}\n\nexport class Query {\n static Validators(req: QueryValidatorsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/validators?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static Validator(req: QueryValidatorRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/validators/${req[\"validator_addr\"]}?${fm.renderURLSearchParams(req, [\"validator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static ValidatorDelegations(req: QueryValidatorDelegationsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/validators/${req[\"validator_addr\"]}/delegations?${fm.renderURLSearchParams(req, [\"validator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static ValidatorUnbondingDelegations(req: QueryValidatorUnbondingDelegationsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/validators/${req[\"validator_addr\"]}/unbonding_delegations?${fm.renderURLSearchParams(req, [\"validator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static Delegation(req: QueryDelegationRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/validators/${req[\"validator_addr\"]}/delegations/${req[\"delegator_addr\"]}?${fm.renderURLSearchParams(req, [\"validator_addr\", \"delegator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static UnbondingDelegation(req: QueryUnbondingDelegationRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/validators/${req[\"validator_addr\"]}/delegations/${req[\"delegator_addr\"]}/unbonding_delegation?${fm.renderURLSearchParams(req, [\"validator_addr\", \"delegator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static DelegatorDelegations(req: QueryDelegatorDelegationsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/delegations/${req[\"delegator_addr\"]}?${fm.renderURLSearchParams(req, [\"delegator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static DelegatorUnbondingDelegations(req: QueryDelegatorUnbondingDelegationsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/delegators/${req[\"delegator_addr\"]}/unbonding_delegations?${fm.renderURLSearchParams(req, [\"delegator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static Redelegations(req: QueryRedelegationsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/delegators/${req[\"delegator_addr\"]}/redelegations?${fm.renderURLSearchParams(req, [\"delegator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static DelegatorValidators(req: QueryDelegatorValidatorsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/delegators/${req[\"delegator_addr\"]}/validators?${fm.renderURLSearchParams(req, [\"delegator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static DelegatorValidator(req: QueryDelegatorValidatorRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/delegators/${req[\"delegator_addr\"]}/validators/${req[\"validator_addr\"]}?${fm.renderURLSearchParams(req, [\"delegator_addr\", \"validator_addr\"])}`, {...initReq, method: \"GET\"})\n }\n static HistoricalInfo(req: QueryHistoricalInfoRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/historical_info/${req[\"height\"]}?${fm.renderURLSearchParams(req, [\"height\"])}`, {...initReq, method: \"GET\"})\n }\n static Pool(req: QueryPoolRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/pool?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/staking/v1beta1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as TendermintTypesBlock from \"../../../tendermint/types/block.pb\"\nimport * as TendermintTypesTypes from \"../../../tendermint/types/types.pb\"\nimport * as CosmosBaseAbciV1beta1Abci from \"../../base/abci/v1beta1/abci.pb\"\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../base/query/v1beta1/pagination.pb\"\nimport * as CosmosTxV1beta1Tx from \"./tx.pb\"\n\nexport enum OrderBy {\n ORDER_BY_UNSPECIFIED = \"ORDER_BY_UNSPECIFIED\",\n ORDER_BY_ASC = \"ORDER_BY_ASC\",\n ORDER_BY_DESC = \"ORDER_BY_DESC\",\n}\n\nexport enum BroadcastMode {\n BROADCAST_MODE_UNSPECIFIED = \"BROADCAST_MODE_UNSPECIFIED\",\n BROADCAST_MODE_BLOCK = \"BROADCAST_MODE_BLOCK\",\n BROADCAST_MODE_SYNC = \"BROADCAST_MODE_SYNC\",\n BROADCAST_MODE_ASYNC = \"BROADCAST_MODE_ASYNC\",\n}\n\nexport type GetTxsEventRequest = {\n events?: string[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n order_by?: OrderBy\n}\n\nexport type GetTxsEventResponse = {\n txs?: CosmosTxV1beta1Tx.Tx[]\n tx_responses?: CosmosBaseAbciV1beta1Abci.TxResponse[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type BroadcastTxRequest = {\n tx_bytes?: Uint8Array\n mode?: BroadcastMode\n}\n\nexport type BroadcastTxResponse = {\n tx_response?: CosmosBaseAbciV1beta1Abci.TxResponse\n}\n\nexport type SimulateRequest = {\n tx?: CosmosTxV1beta1Tx.Tx\n tx_bytes?: Uint8Array\n}\n\nexport type SimulateResponse = {\n gas_info?: CosmosBaseAbciV1beta1Abci.GasInfo\n result?: CosmosBaseAbciV1beta1Abci.Result\n}\n\nexport type GetTxRequest = {\n hash?: string\n}\n\nexport type GetTxResponse = {\n tx?: CosmosTxV1beta1Tx.Tx\n tx_response?: CosmosBaseAbciV1beta1Abci.TxResponse\n}\n\nexport type GetBlockWithTxsRequest = {\n height?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type GetBlockWithTxsResponse = {\n txs?: CosmosTxV1beta1Tx.Tx[]\n block_id?: TendermintTypesTypes.BlockID\n block?: TendermintTypesBlock.Block\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport class Service {\n static Simulate(req: SimulateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/tx/v1beta1/simulate`, {...initReq, method: \"POST\", body: JSON.stringify(req, fm.replacer)})\n }\n static GetTx(req: GetTxRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/tx/v1beta1/txs/${req[\"hash\"]}?${fm.renderURLSearchParams(req, [\"hash\"])}`, {...initReq, method: \"GET\"})\n }\n static BroadcastTx(req: BroadcastTxRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/tx/v1beta1/txs`, {...initReq, method: \"POST\", body: JSON.stringify(req, fm.replacer)})\n }\n static GetTxsEvent(req: GetTxsEventRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/tx/v1beta1/txs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static GetBlockWithTxs(req: GetBlockWithTxsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/tx/v1beta1/txs/block/${req[\"height\"]}?${fm.renderURLSearchParams(req, [\"height\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as CosmosUpgradeV1beta1Upgrade from \"./upgrade.pb\"\nexport type QueryCurrentPlanRequest = {\n}\n\nexport type QueryCurrentPlanResponse = {\n plan?: CosmosUpgradeV1beta1Upgrade.Plan\n}\n\nexport type QueryAppliedPlanRequest = {\n name?: string\n}\n\nexport type QueryAppliedPlanResponse = {\n height?: string\n}\n\nexport type QueryUpgradedConsensusStateRequest = {\n last_height?: string\n}\n\nexport type QueryUpgradedConsensusStateResponse = {\n upgraded_consensus_state?: Uint8Array\n}\n\nexport type QueryModuleVersionsRequest = {\n module_name?: string\n}\n\nexport type QueryModuleVersionsResponse = {\n module_versions?: CosmosUpgradeV1beta1Upgrade.ModuleVersion[]\n}\n\nexport class Query {\n static CurrentPlan(req: QueryCurrentPlanRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/upgrade/v1beta1/current_plan?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static AppliedPlan(req: QueryAppliedPlanRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/upgrade/v1beta1/applied_plan/${req[\"name\"]}?${fm.renderURLSearchParams(req, [\"name\"])}`, {...initReq, method: \"GET\"})\n }\n static UpgradedConsensusState(req: QueryUpgradedConsensusStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/upgrade/v1beta1/upgraded_consensus_state/${req[\"last_height\"]}?${fm.renderURLSearchParams(req, [\"last_height\"])}`, {...initReq, method: \"GET\"})\n }\n static ModuleVersions(req: QueryModuleVersionsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/cosmos/upgrade/v1beta1/module_versions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\n/**\n * base64 encoder and decoder\n * Copied and adapted from https://github.com/protobufjs/protobuf.js/blob/master/lib/base64/index.js\n */\n// Base64 encoding table\nconst b64 = new Array(64);\n\n// Base64 decoding table\nconst s64 = new Array(123);\n\n// 65..90, 97..122, 48..57, 43, 47\nfor (let i = 0; i < 64;)\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\n\nexport function b64Encode(buffer: Uint8Array, start: number, end: number): string {\n\tlet parts: string[] = null;\n const chunk = [];\n let i = 0, // output index\n j = 0, // goto index\n t; // temporary\n while (start < end) {\n const b = buffer[start++];\n switch (j) {\n case 0:\n chunk[i++] = b64[b >> 2];\n t = (b & 3) << 4;\n j = 1;\n break;\n case 1:\n chunk[i++] = b64[t | b >> 4];\n t = (b & 15) << 2;\n j = 2;\n break;\n case 2:\n chunk[i++] = b64[t | b >> 6];\n chunk[i++] = b64[b & 63];\n j = 0;\n break;\n }\n if (i > 8191) {\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\n i = 0;\n }\n }\n if (j) {\n chunk[i++] = b64[t];\n chunk[i++] = 61;\n if (j === 1)\n chunk[i++] = 61;\n }\n if (parts) {\n if (i)\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\n return parts.join(\"\");\n }\n return String.fromCharCode.apply(String, chunk.slice(0, i));\n}\n\nconst invalidEncoding = \"invalid encoding\";\n\nexport function b64Decode(s: string): Uint8Array {\n\tconst buffer = [];\n\tlet offset = 0;\n let j = 0, // goto index\n t; // temporary\n for (let i = 0; i < s.length;) {\n let c = s.charCodeAt(i++);\n if (c === 61 && j > 1)\n break;\n if ((c = s64[c]) === undefined)\n throw Error(invalidEncoding);\n switch (j) {\n case 0:\n t = c;\n j = 1;\n break;\n case 1:\n buffer[offset++] = t << 2 | (c & 48) >> 4;\n t = c;\n j = 2;\n break;\n case 2:\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\n t = c;\n j = 3;\n break;\n case 3:\n buffer[offset++] = (t & 3) << 6 | c;\n j = 0;\n break;\n }\n }\n if (j === 1)\n throw Error(invalidEncoding);\n return new Uint8Array(buffer);\n}\n\nfunction b64Test(s: string): boolean {\n\treturn /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);\n}\n\nexport interface InitReq extends RequestInit {\n pathPrefix?: string\n}\n\nexport function replacer(key: any, value: any): any {\n if(value && value.constructor === Uint8Array) {\n return b64Encode(value, 0, value.length);\n }\n\n return value;\n}\n\nexport function fetchReq(path: string, init?: InitReq): Promise {\n const {pathPrefix, ...req} = init || {}\n\n const url = pathPrefix ? `${pathPrefix}${path}` : path\n\n return fetch(url, req).then(r => r.json().then((body: O) => {\n if (!r.ok) { throw body; }\n return body;\n })) as Promise\n}\n\n// NotifyStreamEntityArrival is a callback that will be called on streaming entity arrival\nexport type NotifyStreamEntityArrival = (resp: T) => void\n\n/**\n * fetchStreamingRequest is able to handle grpc-gateway server side streaming call\n * it takes NotifyStreamEntityArrival that lets users respond to entity arrival during the call\n * all entities will be returned as an array after the call finishes.\n **/\nexport async function fetchStreamingRequest(path: string, callback?: NotifyStreamEntityArrival, init?: InitReq) {\n const {pathPrefix, ...req} = init || {}\n const url = pathPrefix ?`${pathPrefix}${path}` : path\n const result = await fetch(url, req)\n // needs to use the .ok to check the status of HTTP status code\n // http other than 200 will not throw an error, instead the .ok will become false.\n // see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#\n if (!result.ok) {\n const resp = await result.json()\n const errMsg = resp.error && resp.error.message ? resp.error.message : \"\"\n throw new Error(errMsg)\n }\n\n if (!result.body) {\n throw new Error(\"response doesnt have a body\")\n }\n\n await result.body\n .pipeThrough(new TextDecoderStream())\n .pipeThrough(getNewLineDelimitedJSONDecodingStream())\n .pipeTo(getNotifyEntityArrivalSink((e: R) => {\n if (callback) {\n callback(e)\n }\n }))\n\n // wait for the streaming to finish and return the success respond\n return\n}\n\n/**\n * JSONStringStreamController represents the transform controller that's able to transform the incoming\n * new line delimited json content stream into entities and able to push the entity to the down stream\n */\ninterface JSONStringStreamController extends TransformStreamDefaultController {\n buf?: string\n pos?: number\n enqueue: (s: T) => void\n}\n\n/**\n * getNewLineDelimitedJSONDecodingStream returns a TransformStream that's able to handle new line delimited json stream content into parsed entities\n */\nfunction getNewLineDelimitedJSONDecodingStream(): TransformStream {\n return new TransformStream({\n start(controller: JSONStringStreamController) {\n controller.buf = ''\n controller.pos = 0\n },\n\n transform(chunk: string, controller: JSONStringStreamController) {\n if (controller.buf === undefined) {\n controller.buf = ''\n }\n if (controller.pos === undefined) {\n controller.pos = 0\n }\n controller.buf += chunk\n while (controller.pos < controller.buf.length) {\n if (controller.buf[controller.pos] === '\\n') {\n const line = controller.buf.substring(0, controller.pos)\n const response = JSON.parse(line)\n controller.enqueue(response.result)\n controller.buf = controller.buf.substring(controller.pos + 1)\n controller.pos = 0\n } else {\n ++controller.pos\n }\n }\n }\n })\n\n}\n\n/**\n * getNotifyEntityArrivalSink takes the NotifyStreamEntityArrival callback and return\n * a sink that will call the callback on entity arrival\n * @param notifyCallback\n */\nfunction getNotifyEntityArrivalSink(notifyCallback: NotifyStreamEntityArrival) {\n return new WritableStream({\n write(entity: T) {\n notifyCallback(entity)\n }\n })\n}\n\ntype Primitive = string | boolean | number;\ntype RequestPayload = Record;\ntype FlattenedRequestPayload = Record>;\n\n/**\n * Checks if given value is a plain object\n * Logic copied and adapted from below source: \n * https://github.com/char0n/ramda-adjunct/blob/master/src/isPlainObj.js\n * @param {unknown} value\n * @return {boolean}\n */\nfunction isPlainObject(value: unknown): boolean {\n const isObject =\n Object.prototype.toString.call(value).slice(8, -1) === \"Object\";\n const isObjLike = value !== null && isObject;\n\n if (!isObjLike || !isObject) {\n return false;\n }\n\n const proto = Object.getPrototypeOf(value);\n\n const hasObjectConstructor =\n typeof proto === \"object\" &&\n proto.constructor === Object.prototype.constructor;\n\n return hasObjectConstructor;\n}\n\n/**\n * Checks if given value is of a primitive type\n * @param {unknown} value\n * @return {boolean}\n */\nfunction isPrimitive(value: unknown): boolean {\n return [\"string\", \"number\", \"boolean\"].some(t => typeof value === t);\n}\n\n/**\n * Checks if given primitive is zero-value\n * @param {Primitive} value\n * @return {boolean}\n */\nfunction isZeroValuePrimitive(value: Primitive): boolean {\n return value === false || value === 0 || value === \"\";\n}\n\n/**\n * Flattens a deeply nested request payload and returns an object\n * with only primitive values and non-empty array of primitive values\n * as per https://github.com/googleapis/googleapis/blob/master/google/api/http.proto\n * @param {RequestPayload} requestPayload\n * @param {String} path\n * @return {FlattenedRequestPayload>}\n */\nfunction flattenRequestPayload(\n requestPayload: T,\n path: string = \"\"\n): FlattenedRequestPayload {\n return Object.keys(requestPayload).reduce(\n (acc: T, key: string): T => {\n const value = requestPayload[key];\n const newPath = path ? [path, key].join(\".\") : key;\n\n const isNonEmptyPrimitiveArray =\n Array.isArray(value) &&\n value.every(v => isPrimitive(v)) &&\n value.length > 0;\n\n const isNonZeroValuePrimitive =\n isPrimitive(value) && !isZeroValuePrimitive(value as Primitive);\n\n let objectToMerge = {};\n\n if (isPlainObject(value)) {\n objectToMerge = flattenRequestPayload(value as RequestPayload, newPath);\n } else if (value && value.constructor === Uint8Array) {\n objectToMerge = {\n [newPath]: b64Encode(value, 0, value.length),\n };\n } else if (isNonZeroValuePrimitive || isNonEmptyPrimitiveArray) {\n objectToMerge = { [newPath]: value };\n }\n\n return { ...acc, ...objectToMerge };\n },\n {} as T\n ) as FlattenedRequestPayload;\n}\n\n/**\n * Renders a deeply nested request payload into a string of URL search\n * parameters by first flattening the request payload and then removing keys\n * which are already present in the URL path.\n * @param {RequestPayload} requestPayload\n * @param {string[]} urlPathParams\n * @return {string}\n */\nexport function renderURLSearchParams(\n requestPayload: T,\n urlPathParams: string[] = []\n): string {\n const flattenedRequestPayload = flattenRequestPayload(requestPayload);\n\n const urlSearchParams = Object.keys(flattenedRequestPayload).reduce(\n (acc: string[][], key: string): string[][] => {\n // key should not be present in the url path as a parameter\n const value = flattenedRequestPayload[key];\n if (urlPathParams.find(f => f === key)) {\n return acc;\n }\n return Array.isArray(value)\n ? [...acc, ...value.map(m => [key, m.toString()])]\n : (acc = [...acc, [key, value.toString()]]);\n },\n [] as string[][]\n );\n\n // react-native's URLSearchParams doesn't like working with array of arrays\n return urlSearchParams\n .map((x) => new URLSearchParams({ [x[0]]: x[1] }).toString())\n .join(\"&\");\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../../../cosmos/base/query/v1beta1/pagination.pb\"\nimport * as CosmosBaseV1beta1Coin from \"../../../../cosmos/base/v1beta1/coin.pb\"\nimport * as fm from \"../../../../fetch.pb\"\nimport * as IbcCoreChannelV1Channel from \"../../../core/channel/v1/channel.pb\"\nimport * as IbcApplicationsFeeV1Fee from \"./fee.pb\"\nimport * as IbcApplicationsFeeV1Genesis from \"./genesis.pb\"\nexport type QueryIncentivizedPacketsRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n query_height?: string\n}\n\nexport type QueryIncentivizedPacketsResponse = {\n incentivized_packets?: IbcApplicationsFeeV1Fee.IdentifiedPacketFees[]\n}\n\nexport type QueryIncentivizedPacketRequest = {\n packet_id?: IbcCoreChannelV1Channel.PacketId\n query_height?: string\n}\n\nexport type QueryIncentivizedPacketResponse = {\n incentivized_packet?: IbcApplicationsFeeV1Fee.IdentifiedPacketFees\n}\n\nexport type QueryIncentivizedPacketsForChannelRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n port_id?: string\n channel_id?: string\n query_height?: string\n}\n\nexport type QueryIncentivizedPacketsForChannelResponse = {\n incentivized_packets?: IbcApplicationsFeeV1Fee.IdentifiedPacketFees[]\n}\n\nexport type QueryTotalRecvFeesRequest = {\n packet_id?: IbcCoreChannelV1Channel.PacketId\n}\n\nexport type QueryTotalRecvFeesResponse = {\n recv_fees?: CosmosBaseV1beta1Coin.Coin[]\n}\n\nexport type QueryTotalAckFeesRequest = {\n packet_id?: IbcCoreChannelV1Channel.PacketId\n}\n\nexport type QueryTotalAckFeesResponse = {\n ack_fees?: CosmosBaseV1beta1Coin.Coin[]\n}\n\nexport type QueryTotalTimeoutFeesRequest = {\n packet_id?: IbcCoreChannelV1Channel.PacketId\n}\n\nexport type QueryTotalTimeoutFeesResponse = {\n timeout_fees?: CosmosBaseV1beta1Coin.Coin[]\n}\n\nexport type QueryPayeeRequest = {\n channel_id?: string\n relayer?: string\n}\n\nexport type QueryPayeeResponse = {\n payee_address?: string\n}\n\nexport type QueryCounterpartyPayeeRequest = {\n channel_id?: string\n relayer?: string\n}\n\nexport type QueryCounterpartyPayeeResponse = {\n counterparty_payee?: string\n}\n\nexport type QueryFeeEnabledChannelsRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n query_height?: string\n}\n\nexport type QueryFeeEnabledChannelsResponse = {\n fee_enabled_channels?: IbcApplicationsFeeV1Genesis.FeeEnabledChannel[]\n}\n\nexport type QueryFeeEnabledChannelRequest = {\n port_id?: string\n channel_id?: string\n}\n\nexport type QueryFeeEnabledChannelResponse = {\n fee_enabled?: boolean\n}\n\nexport class Query {\n static IncentivizedPackets(req: QueryIncentivizedPacketsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/incentivized_packets?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static IncentivizedPacket(req: QueryIncentivizedPacketRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/channels/${req[\"packet_id.channel_id\"]}/ports/${req[\"packet_id.port_id\"]}/sequences/${req[\"packet_id.sequence\"]}/incentivized_packet?${fm.renderURLSearchParams(req, [\"packet_id.channel_id\", \"packet_id.port_id\", \"packet_id.sequence\"])}`, {...initReq, method: \"GET\"})\n }\n static IncentivizedPacketsForChannel(req: QueryIncentivizedPacketsForChannelRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/incentivized_packets?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\"])}`, {...initReq, method: \"GET\"})\n }\n static TotalRecvFees(req: QueryTotalRecvFeesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/channels/${req[\"packet_id.channel_id\"]}/ports/${req[\"packet_id.port_id\"]}/sequences/${req[\"packet_id.sequence\"]}/total_recv_fees?${fm.renderURLSearchParams(req, [\"packet_id.channel_id\", \"packet_id.port_id\", \"packet_id.sequence\"])}`, {...initReq, method: \"GET\"})\n }\n static TotalAckFees(req: QueryTotalAckFeesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/channels/${req[\"packet_id.channel_id\"]}/ports/${req[\"packet_id.port_id\"]}/sequences/${req[\"packet_id.sequence\"]}/total_ack_fees?${fm.renderURLSearchParams(req, [\"packet_id.channel_id\", \"packet_id.port_id\", \"packet_id.sequence\"])}`, {...initReq, method: \"GET\"})\n }\n static TotalTimeoutFees(req: QueryTotalTimeoutFeesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/channels/${req[\"packet_id.channel_id\"]}/ports/${req[\"packet_id.port_id\"]}/sequences/${req[\"packet_id.sequence\"]}/total_timeout_fees?${fm.renderURLSearchParams(req, [\"packet_id.channel_id\", \"packet_id.port_id\", \"packet_id.sequence\"])}`, {...initReq, method: \"GET\"})\n }\n static Payee(req: QueryPayeeRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/channels/${req[\"channel_id\"]}/relayers/${req[\"relayer\"]}/payee?${fm.renderURLSearchParams(req, [\"channel_id\", \"relayer\"])}`, {...initReq, method: \"GET\"})\n }\n static CounterpartyPayee(req: QueryCounterpartyPayeeRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/channels/${req[\"channel_id\"]}/relayers/${req[\"relayer\"]}/counterparty_payee?${fm.renderURLSearchParams(req, [\"channel_id\", \"relayer\"])}`, {...initReq, method: \"GET\"})\n }\n static FeeEnabledChannels(req: QueryFeeEnabledChannelsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/fee_enabled?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static FeeEnabledChannel(req: QueryFeeEnabledChannelRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/fee/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/fee_enabled?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../../../fetch.pb\"\nimport * as IbcApplicationsInterchain_accountsControllerV1Controller from \"./controller.pb\"\nexport type QueryInterchainAccountRequest = {\n owner?: string\n connection_id?: string\n}\n\nexport type QueryInterchainAccountResponse = {\n address?: string\n}\n\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: IbcApplicationsInterchain_accountsControllerV1Controller.Params\n}\n\nexport class Query {\n static InterchainAccount(req: QueryInterchainAccountRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/interchain_accounts/controller/v1/owners/${req[\"owner\"]}/connections/${req[\"connection_id\"]}?${fm.renderURLSearchParams(req, [\"owner\", \"connection_id\"])}`, {...initReq, method: \"GET\"})\n }\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/interchain_accounts/controller/v1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../../../fetch.pb\"\nimport * as IbcApplicationsInterchain_accountsHostV1Host from \"./host.pb\"\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: IbcApplicationsInterchain_accountsHostV1Host.Params\n}\n\nexport class Query {\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/interchain_accounts/host/v1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../../fetch.pb\"\nimport * as PacketforwardV1Genesis from \"./genesis.pb\"\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: PacketforwardV1Genesis.Params\n}\n\nexport class Query {\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/router/v1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../../../cosmos/base/query/v1beta1/pagination.pb\"\nimport * as fm from \"../../../../fetch.pb\"\nimport * as IbcApplicationsTransferV1Transfer from \"./transfer.pb\"\nexport type QueryDenomTraceRequest = {\n hash?: string\n}\n\nexport type QueryDenomTraceResponse = {\n denom_trace?: IbcApplicationsTransferV1Transfer.DenomTrace\n}\n\nexport type QueryDenomTracesRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryDenomTracesResponse = {\n denom_traces?: IbcApplicationsTransferV1Transfer.DenomTrace[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryParamsRequest = {\n}\n\nexport type QueryParamsResponse = {\n params?: IbcApplicationsTransferV1Transfer.Params\n}\n\nexport type QueryDenomHashRequest = {\n trace?: string\n}\n\nexport type QueryDenomHashResponse = {\n hash?: string\n}\n\nexport type QueryEscrowAddressRequest = {\n port_id?: string\n channel_id?: string\n}\n\nexport type QueryEscrowAddressResponse = {\n escrow_address?: string\n}\n\nexport class Query {\n static DenomTrace(req: QueryDenomTraceRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/transfer/v1/denom_traces/${req[\"hash\"]}?${fm.renderURLSearchParams(req, [\"hash\"])}`, {...initReq, method: \"GET\"})\n }\n static DenomTraces(req: QueryDenomTracesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/transfer/v1/denom_traces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static Params(req: QueryParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/transfer/v1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static DenomHash(req: QueryDenomHashRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/transfer/v1/denom_hashes/${req[\"trace\"]}?${fm.renderURLSearchParams(req, [\"trace\"])}`, {...initReq, method: \"GET\"})\n }\n static EscrowAddress(req: QueryEscrowAddressRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/apps/transfer/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/escrow_address?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../../../cosmos/base/query/v1beta1/pagination.pb\"\nimport * as fm from \"../../../../fetch.pb\"\nimport * as GoogleProtobufAny from \"../../../../google/protobuf/any.pb\"\nimport * as IbcCoreClientV1Client from \"../../client/v1/client.pb\"\nimport * as IbcCoreChannelV1Channel from \"./channel.pb\"\nexport type QueryChannelRequest = {\n port_id?: string\n channel_id?: string\n}\n\nexport type QueryChannelResponse = {\n channel?: IbcCoreChannelV1Channel.Channel\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryChannelsRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryChannelsResponse = {\n channels?: IbcCoreChannelV1Channel.IdentifiedChannel[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryConnectionChannelsRequest = {\n connection?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryConnectionChannelsResponse = {\n channels?: IbcCoreChannelV1Channel.IdentifiedChannel[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryChannelClientStateRequest = {\n port_id?: string\n channel_id?: string\n}\n\nexport type QueryChannelClientStateResponse = {\n identified_client_state?: IbcCoreClientV1Client.IdentifiedClientState\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryChannelConsensusStateRequest = {\n port_id?: string\n channel_id?: string\n revision_number?: string\n revision_height?: string\n}\n\nexport type QueryChannelConsensusStateResponse = {\n consensus_state?: GoogleProtobufAny.Any\n client_id?: string\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryPacketCommitmentRequest = {\n port_id?: string\n channel_id?: string\n sequence?: string\n}\n\nexport type QueryPacketCommitmentResponse = {\n commitment?: Uint8Array\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryPacketCommitmentsRequest = {\n port_id?: string\n channel_id?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryPacketCommitmentsResponse = {\n commitments?: IbcCoreChannelV1Channel.PacketState[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryPacketReceiptRequest = {\n port_id?: string\n channel_id?: string\n sequence?: string\n}\n\nexport type QueryPacketReceiptResponse = {\n received?: boolean\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryPacketAcknowledgementRequest = {\n port_id?: string\n channel_id?: string\n sequence?: string\n}\n\nexport type QueryPacketAcknowledgementResponse = {\n acknowledgement?: Uint8Array\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryPacketAcknowledgementsRequest = {\n port_id?: string\n channel_id?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n packet_commitment_sequences?: string[]\n}\n\nexport type QueryPacketAcknowledgementsResponse = {\n acknowledgements?: IbcCoreChannelV1Channel.PacketState[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryUnreceivedPacketsRequest = {\n port_id?: string\n channel_id?: string\n packet_commitment_sequences?: string[]\n}\n\nexport type QueryUnreceivedPacketsResponse = {\n sequences?: string[]\n height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryUnreceivedAcksRequest = {\n port_id?: string\n channel_id?: string\n packet_ack_sequences?: string[]\n}\n\nexport type QueryUnreceivedAcksResponse = {\n sequences?: string[]\n height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryNextSequenceReceiveRequest = {\n port_id?: string\n channel_id?: string\n}\n\nexport type QueryNextSequenceReceiveResponse = {\n next_sequence_receive?: string\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport class Query {\n static Channel(req: QueryChannelRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\"])}`, {...initReq, method: \"GET\"})\n }\n static Channels(req: QueryChannelsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static ConnectionChannels(req: QueryConnectionChannelsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/connections/${req[\"connection\"]}/channels?${fm.renderURLSearchParams(req, [\"connection\"])}`, {...initReq, method: \"GET\"})\n }\n static ChannelClientState(req: QueryChannelClientStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/client_state?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\"])}`, {...initReq, method: \"GET\"})\n }\n static ChannelConsensusState(req: QueryChannelConsensusStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/consensus_state/revision/${req[\"revision_number\"]}/height/${req[\"revision_height\"]}?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\", \"revision_number\", \"revision_height\"])}`, {...initReq, method: \"GET\"})\n }\n static PacketCommitment(req: QueryPacketCommitmentRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/packet_commitments/${req[\"sequence\"]}?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\", \"sequence\"])}`, {...initReq, method: \"GET\"})\n }\n static PacketCommitments(req: QueryPacketCommitmentsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/packet_commitments?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\"])}`, {...initReq, method: \"GET\"})\n }\n static PacketReceipt(req: QueryPacketReceiptRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/packet_receipts/${req[\"sequence\"]}?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\", \"sequence\"])}`, {...initReq, method: \"GET\"})\n }\n static PacketAcknowledgement(req: QueryPacketAcknowledgementRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/packet_acks/${req[\"sequence\"]}?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\", \"sequence\"])}`, {...initReq, method: \"GET\"})\n }\n static PacketAcknowledgements(req: QueryPacketAcknowledgementsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/packet_acknowledgements?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\"])}`, {...initReq, method: \"GET\"})\n }\n static UnreceivedPackets(req: QueryUnreceivedPacketsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/packet_commitments/${req[\"packet_commitment_sequences\"]}/unreceived_packets?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\", \"packet_commitment_sequences\"])}`, {...initReq, method: \"GET\"})\n }\n static UnreceivedAcks(req: QueryUnreceivedAcksRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/packet_commitments/${req[\"packet_ack_sequences\"]}/unreceived_acks?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\", \"packet_ack_sequences\"])}`, {...initReq, method: \"GET\"})\n }\n static NextSequenceReceive(req: QueryNextSequenceReceiveRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/channel/v1/channels/${req[\"channel_id\"]}/ports/${req[\"port_id\"]}/next_sequence?${fm.renderURLSearchParams(req, [\"channel_id\", \"port_id\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../../../cosmos/base/query/v1beta1/pagination.pb\"\nimport * as fm from \"../../../../fetch.pb\"\nimport * as GoogleProtobufAny from \"../../../../google/protobuf/any.pb\"\nimport * as IbcCoreClientV1Client from \"./client.pb\"\nexport type QueryClientStateRequest = {\n client_id?: string\n}\n\nexport type QueryClientStateResponse = {\n client_state?: GoogleProtobufAny.Any\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryClientStatesRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryClientStatesResponse = {\n client_states?: IbcCoreClientV1Client.IdentifiedClientState[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryConsensusStateRequest = {\n client_id?: string\n revision_number?: string\n revision_height?: string\n latest_height?: boolean\n}\n\nexport type QueryConsensusStateResponse = {\n consensus_state?: GoogleProtobufAny.Any\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryConsensusStatesRequest = {\n client_id?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryConsensusStatesResponse = {\n consensus_states?: IbcCoreClientV1Client.ConsensusStateWithHeight[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryConsensusStateHeightsRequest = {\n client_id?: string\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryConsensusStateHeightsResponse = {\n consensus_state_heights?: IbcCoreClientV1Client.Height[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n}\n\nexport type QueryClientStatusRequest = {\n client_id?: string\n}\n\nexport type QueryClientStatusResponse = {\n status?: string\n}\n\nexport type QueryClientParamsRequest = {\n}\n\nexport type QueryClientParamsResponse = {\n params?: IbcCoreClientV1Client.Params\n}\n\nexport type QueryUpgradedClientStateRequest = {\n}\n\nexport type QueryUpgradedClientStateResponse = {\n upgraded_client_state?: GoogleProtobufAny.Any\n}\n\nexport type QueryUpgradedConsensusStateRequest = {\n}\n\nexport type QueryUpgradedConsensusStateResponse = {\n upgraded_consensus_state?: GoogleProtobufAny.Any\n}\n\nexport class Query {\n static ClientState(req: QueryClientStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/client/v1/client_states/${req[\"client_id\"]}?${fm.renderURLSearchParams(req, [\"client_id\"])}`, {...initReq, method: \"GET\"})\n }\n static ClientStates(req: QueryClientStatesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/client/v1/client_states?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static ConsensusState(req: QueryConsensusStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/client/v1/consensus_states/${req[\"client_id\"]}/revision/${req[\"revision_number\"]}/height/${req[\"revision_height\"]}?${fm.renderURLSearchParams(req, [\"client_id\", \"revision_number\", \"revision_height\"])}`, {...initReq, method: \"GET\"})\n }\n static ConsensusStates(req: QueryConsensusStatesRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/client/v1/consensus_states/${req[\"client_id\"]}?${fm.renderURLSearchParams(req, [\"client_id\"])}`, {...initReq, method: \"GET\"})\n }\n static ConsensusStateHeights(req: QueryConsensusStateHeightsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/client/v1/consensus_states/${req[\"client_id\"]}/heights?${fm.renderURLSearchParams(req, [\"client_id\"])}`, {...initReq, method: \"GET\"})\n }\n static ClientStatus(req: QueryClientStatusRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/client/v1/client_status/${req[\"client_id\"]}?${fm.renderURLSearchParams(req, [\"client_id\"])}`, {...initReq, method: \"GET\"})\n }\n static ClientParams(req: QueryClientParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/client/v1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static UpgradedClientState(req: QueryUpgradedClientStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/client/v1/upgraded_client_states?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static UpgradedConsensusState(req: QueryUpgradedConsensusStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/client/v1/upgraded_consensus_states?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as CosmosBaseQueryV1beta1Pagination from \"../../../../cosmos/base/query/v1beta1/pagination.pb\"\nimport * as fm from \"../../../../fetch.pb\"\nimport * as GoogleProtobufAny from \"../../../../google/protobuf/any.pb\"\nimport * as IbcCoreClientV1Client from \"../../client/v1/client.pb\"\nimport * as IbcCoreConnectionV1Connection from \"./connection.pb\"\nexport type QueryConnectionRequest = {\n connection_id?: string\n}\n\nexport type QueryConnectionResponse = {\n connection?: IbcCoreConnectionV1Connection.ConnectionEnd\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryConnectionsRequest = {\n pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest\n}\n\nexport type QueryConnectionsResponse = {\n connections?: IbcCoreConnectionV1Connection.IdentifiedConnection[]\n pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse\n height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryClientConnectionsRequest = {\n client_id?: string\n}\n\nexport type QueryClientConnectionsResponse = {\n connection_paths?: string[]\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryConnectionClientStateRequest = {\n connection_id?: string\n}\n\nexport type QueryConnectionClientStateResponse = {\n identified_client_state?: IbcCoreClientV1Client.IdentifiedClientState\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport type QueryConnectionConsensusStateRequest = {\n connection_id?: string\n revision_number?: string\n revision_height?: string\n}\n\nexport type QueryConnectionConsensusStateResponse = {\n consensus_state?: GoogleProtobufAny.Any\n client_id?: string\n proof?: Uint8Array\n proof_height?: IbcCoreClientV1Client.Height\n}\n\nexport class Query {\n static Connection(req: QueryConnectionRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/connection/v1/connections/${req[\"connection_id\"]}?${fm.renderURLSearchParams(req, [\"connection_id\"])}`, {...initReq, method: \"GET\"})\n }\n static Connections(req: QueryConnectionsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/connection/v1/connections?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static ClientConnections(req: QueryClientConnectionsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/connection/v1/client_connections/${req[\"client_id\"]}?${fm.renderURLSearchParams(req, [\"client_id\"])}`, {...initReq, method: \"GET\"})\n }\n static ConnectionClientState(req: QueryConnectionClientStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/connection/v1/connections/${req[\"connection_id\"]}/client_state?${fm.renderURLSearchParams(req, [\"connection_id\"])}`, {...initReq, method: \"GET\"})\n }\n static ConnectionConsensusState(req: QueryConnectionConsensusStateRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/ibc/core/connection/v1/connections/${req[\"connection_id\"]}/consensus_state/revision/${req[\"revision_number\"]}/height/${req[\"revision_height\"]}?${fm.renderURLSearchParams(req, [\"connection_id\", \"revision_number\", \"revision_height\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as CosmosBaseAbciV1beta1Abci from \"../../../cosmos/base/abci/v1beta1/abci.pb\"\nimport * as fm from \"../../../fetch.pb\"\nimport * as GoogleProtobufEmpty from \"../../../google/protobuf/empty.pb\"\nimport * as SecretComputeV1beta1Types from \"./types.pb\"\nexport type QuerySecretContractRequest = {\n contract_address?: string\n query?: Uint8Array\n}\n\nexport type QueryByLabelRequest = {\n label?: string\n}\n\nexport type QueryByContractAddressRequest = {\n contract_address?: string\n}\n\nexport type QueryByCodeIdRequest = {\n code_id?: string\n}\n\nexport type QuerySecretContractResponse = {\n data?: Uint8Array\n}\n\nexport type QueryContractInfoResponse = {\n contract_address?: string\n contract_info?: SecretComputeV1beta1Types.ContractInfo\n}\n\nexport type ContractInfoWithAddress = {\n contract_address?: string\n contract_info?: SecretComputeV1beta1Types.ContractInfo\n}\n\nexport type QueryContractsByCodeIdResponse = {\n contract_infos?: ContractInfoWithAddress[]\n}\n\nexport type CodeInfoResponse = {\n code_id?: string\n creator?: string\n code_hash?: string\n source?: string\n builder?: string\n}\n\nexport type QueryCodeResponse = {\n code_info?: CodeInfoResponse\n wasm?: Uint8Array\n}\n\nexport type QueryCodesResponse = {\n code_infos?: CodeInfoResponse[]\n}\n\nexport type QueryContractAddressResponse = {\n contract_address?: string\n}\n\nexport type QueryContractLabelResponse = {\n label?: string\n}\n\nexport type QueryCodeHashResponse = {\n code_hash?: string\n}\n\nexport type DecryptedAnswer = {\n type?: string\n input?: string\n output_data?: string\n output_data_as_string?: string\n}\n\nexport type DecryptedAnswers = {\n answers?: DecryptedAnswer[]\n output_logs?: CosmosBaseAbciV1beta1Abci.StringEvent[]\n output_error?: string\n plaintext_error?: string\n}\n\nexport type QueryContractHistoryRequest = {\n contract_address?: string\n}\n\nexport type QueryContractHistoryResponse = {\n entries?: SecretComputeV1beta1Types.ContractCodeHistoryEntry[]\n}\n\nexport class Query {\n static ContractInfo(req: QueryByContractAddressRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/info/${req[\"contract_address\"]}?${fm.renderURLSearchParams(req, [\"contract_address\"])}`, {...initReq, method: \"GET\"})\n }\n static ContractsByCodeId(req: QueryByCodeIdRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/contracts/${req[\"code_id\"]}?${fm.renderURLSearchParams(req, [\"code_id\"])}`, {...initReq, method: \"GET\"})\n }\n static QuerySecretContract(req: QuerySecretContractRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/query/${req[\"contract_address\"]}?${fm.renderURLSearchParams(req, [\"contract_address\"])}`, {...initReq, method: \"GET\"})\n }\n static Code(req: QueryByCodeIdRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/code/${req[\"code_id\"]}?${fm.renderURLSearchParams(req, [\"code_id\"])}`, {...initReq, method: \"GET\"})\n }\n static Codes(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/codes?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static CodeHashByContractAddress(req: QueryByContractAddressRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/code_hash/by_contract_address/${req[\"contract_address\"]}?${fm.renderURLSearchParams(req, [\"contract_address\"])}`, {...initReq, method: \"GET\"})\n }\n static CodeHashByCodeId(req: QueryByCodeIdRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/code_hash/by_code_id/${req[\"code_id\"]}?${fm.renderURLSearchParams(req, [\"code_id\"])}`, {...initReq, method: \"GET\"})\n }\n static LabelByAddress(req: QueryByContractAddressRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/label/${req[\"contract_address\"]}?${fm.renderURLSearchParams(req, [\"contract_address\"])}`, {...initReq, method: \"GET\"})\n }\n static AddressByLabel(req: QueryByLabelRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/contract_address/${req[\"label\"]}?${fm.renderURLSearchParams(req, [\"label\"])}`, {...initReq, method: \"GET\"})\n }\n static ContractHistory(req: QueryContractHistoryRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/compute/v1beta1/contract_history/${req[\"contract_address\"]}?${fm.renderURLSearchParams(req, [\"contract_address\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as SecretEmergencybuttonV1beta1Params from \"./params.pb\"\nexport type ParamsRequest = {\n}\n\nexport type ParamsResponse = {\n params?: SecretEmergencybuttonV1beta1Params.Params\n}\n\nexport class Query {\n static Params(req: ParamsRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/emergencybutton/v1beta1/params?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nexport type QueryInterchainAccountFromAddressRequest = {\n owner?: string\n connection_id?: string\n}\n\nexport type QueryInterchainAccountFromAddressResponse = {\n interchain_account_address?: string\n}\n\nexport class Query {\n static InterchainAccountFromAddress(req: QueryInterchainAccountFromAddressRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/mauth/interchain_account/owner/${req[\"owner\"]}/connection/${req[\"connection_id\"]}?${fm.renderURLSearchParams(req, [\"owner\", \"connection_id\"])}`, {...initReq, method: \"GET\"})\n }\n}", "/* eslint-disable */\n// @ts-nocheck\n/*\n* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY\n*/\n\nimport * as fm from \"../../../fetch.pb\"\nimport * as GoogleProtobufEmpty from \"../../../google/protobuf/empty.pb\"\nimport * as SecretRegistrationV1beta1Msg from \"./msg.pb\"\nexport type QueryEncryptedSeedRequest = {\n pub_key?: Uint8Array\n}\n\nexport type QueryEncryptedSeedResponse = {\n encrypted_seed?: Uint8Array\n}\n\nexport class Query {\n static TxKey(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/registration/v1beta1/tx-key?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static RegistrationKey(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/registration/v1beta1/registration-key?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: \"GET\"})\n }\n static EncryptedSeed(req: QueryEncryptedSeedRequest, initReq?: fm.InitReq): Promise {\n return fm.fetchReq(`/registration/v1beta1/encrypted-seed/${req[\"pub_key\"]}?${fm.renderURLSearchParams(req, [\"pub_key\"])}`, {...initReq, method: \"GET\"})\n }\n}", "if (typeof BigInt === \"undefined\") {\n global.BigInt = require(\"big-integer\");\n}\n\n// Note: the order of exports is important here\nexport * from \"@cosmjs/encoding\";\nexport * from \"./encryption\";\nexport * from \"./query\";\nexport * from \"./secret_network_client\";\nexport * from \"./tx\";\nexport * from \"./utils\";\nexport { WalletOptions } from \"./wallet_amino\";\nexport { Wallet } from \"./wallet_proto\";\nexport { MetaMaskWallet } from \"./wallet_metamask\";\n\nexport * from \"./extensions/snip20\";\nexport * from \"./extensions/snip721\";\nexport * from \"./extensions/access_control\";\nexport {\n MsgStoreCodeResponse,\n MsgInstantiateContractResponse,\n MsgExecuteContractResponse,\n} from \"./protobuf/secret/compute/v1beta1/msg\";\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"ics23\";\n\nexport enum HashOp {\n /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */\n NO_HASH = 0,\n SHA256 = 1,\n SHA512 = 2,\n KECCAK = 3,\n RIPEMD160 = 4,\n /** BITCOIN - ripemd160(sha256(x)) */\n BITCOIN = 5,\n UNRECOGNIZED = -1,\n}\n\nexport function hashOpFromJSON(object: any): HashOp {\n switch (object) {\n case 0:\n case \"NO_HASH\":\n return HashOp.NO_HASH;\n case 1:\n case \"SHA256\":\n return HashOp.SHA256;\n case 2:\n case \"SHA512\":\n return HashOp.SHA512;\n case 3:\n case \"KECCAK\":\n return HashOp.KECCAK;\n case 4:\n case \"RIPEMD160\":\n return HashOp.RIPEMD160;\n case 5:\n case \"BITCOIN\":\n return HashOp.BITCOIN;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return HashOp.UNRECOGNIZED;\n }\n}\n\nexport function hashOpToJSON(object: HashOp): string {\n switch (object) {\n case HashOp.NO_HASH:\n return \"NO_HASH\";\n case HashOp.SHA256:\n return \"SHA256\";\n case HashOp.SHA512:\n return \"SHA512\";\n case HashOp.KECCAK:\n return \"KECCAK\";\n case HashOp.RIPEMD160:\n return \"RIPEMD160\";\n case HashOp.BITCOIN:\n return \"BITCOIN\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * LengthOp defines how to process the key and value of the LeafOp\n * to include length information. After encoding the length with the given\n * algorithm, the length will be prepended to the key and value bytes.\n * (Each one with it's own encoded length)\n */\nexport enum LengthOp {\n /** NO_PREFIX - NO_PREFIX don't include any length info */\n NO_PREFIX = 0,\n /** VAR_PROTO - VAR_PROTO uses protobuf (and go-amino) varint encoding of the length */\n VAR_PROTO = 1,\n /** VAR_RLP - VAR_RLP uses rlp int encoding of the length */\n VAR_RLP = 2,\n /** FIXED32_BIG - FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer */\n FIXED32_BIG = 3,\n /** FIXED32_LITTLE - FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer */\n FIXED32_LITTLE = 4,\n /** FIXED64_BIG - FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer */\n FIXED64_BIG = 5,\n /** FIXED64_LITTLE - FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer */\n FIXED64_LITTLE = 6,\n /** REQUIRE_32_BYTES - REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) */\n REQUIRE_32_BYTES = 7,\n /** REQUIRE_64_BYTES - REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) */\n REQUIRE_64_BYTES = 8,\n UNRECOGNIZED = -1,\n}\n\nexport function lengthOpFromJSON(object: any): LengthOp {\n switch (object) {\n case 0:\n case \"NO_PREFIX\":\n return LengthOp.NO_PREFIX;\n case 1:\n case \"VAR_PROTO\":\n return LengthOp.VAR_PROTO;\n case 2:\n case \"VAR_RLP\":\n return LengthOp.VAR_RLP;\n case 3:\n case \"FIXED32_BIG\":\n return LengthOp.FIXED32_BIG;\n case 4:\n case \"FIXED32_LITTLE\":\n return LengthOp.FIXED32_LITTLE;\n case 5:\n case \"FIXED64_BIG\":\n return LengthOp.FIXED64_BIG;\n case 6:\n case \"FIXED64_LITTLE\":\n return LengthOp.FIXED64_LITTLE;\n case 7:\n case \"REQUIRE_32_BYTES\":\n return LengthOp.REQUIRE_32_BYTES;\n case 8:\n case \"REQUIRE_64_BYTES\":\n return LengthOp.REQUIRE_64_BYTES;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return LengthOp.UNRECOGNIZED;\n }\n}\n\nexport function lengthOpToJSON(object: LengthOp): string {\n switch (object) {\n case LengthOp.NO_PREFIX:\n return \"NO_PREFIX\";\n case LengthOp.VAR_PROTO:\n return \"VAR_PROTO\";\n case LengthOp.VAR_RLP:\n return \"VAR_RLP\";\n case LengthOp.FIXED32_BIG:\n return \"FIXED32_BIG\";\n case LengthOp.FIXED32_LITTLE:\n return \"FIXED32_LITTLE\";\n case LengthOp.FIXED64_BIG:\n return \"FIXED64_BIG\";\n case LengthOp.FIXED64_LITTLE:\n return \"FIXED64_LITTLE\";\n case LengthOp.REQUIRE_32_BYTES:\n return \"REQUIRE_32_BYTES\";\n case LengthOp.REQUIRE_64_BYTES:\n return \"REQUIRE_64_BYTES\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * ExistenceProof takes a key and a value and a set of steps to perform on it.\n * The result of peforming all these steps will provide a \"root hash\", which can\n * be compared to the value in a header.\n *\n * Since it is computationally infeasible to produce a hash collission for any of the used\n * cryptographic hash functions, if someone can provide a series of operations to transform\n * a given key and value into a root hash that matches some trusted root, these key and values\n * must be in the referenced merkle tree.\n *\n * The only possible issue is maliablity in LeafOp, such as providing extra prefix data,\n * which should be controlled by a spec. Eg. with lengthOp as NONE,\n * prefix = FOO, key = BAR, value = CHOICE\n * and\n * prefix = F, key = OOBAR, value = CHOICE\n * would produce the same value.\n *\n * With LengthOp this is tricker but not impossible. Which is why the \"leafPrefixEqual\" field\n * in the ProofSpec is valuable to prevent this mutability. And why all trees should\n * length-prefix the data before hashing it.\n */\nexport interface ExistenceProof {\n key: Uint8Array;\n value: Uint8Array;\n leaf?: LeafOp;\n path: InnerOp[];\n}\n\n/**\n * NonExistenceProof takes a proof of two neighbors, one left of the desired key,\n * one right of the desired key. If both proofs are valid AND they are neighbors,\n * then there is no valid proof for the given key.\n */\nexport interface NonExistenceProof {\n /** TODO: remove this as unnecessary??? we prove a range */\n key: Uint8Array;\n left?: ExistenceProof;\n right?: ExistenceProof;\n}\n\n/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */\nexport interface CommitmentProof {\n exist?: ExistenceProof | undefined;\n nonexist?: NonExistenceProof | undefined;\n batch?: BatchProof | undefined;\n compressed?: CompressedBatchProof | undefined;\n}\n\n/**\n * LeafOp represents the raw key-value data we wish to prove, and\n * must be flexible to represent the internal transformation from\n * the original key-value pairs into the basis hash, for many existing\n * merkle trees.\n *\n * key and value are passed in. So that the signature of this operation is:\n * leafOp(key, value) -> output\n *\n * To process this, first prehash the keys and values if needed (ANY means no hash in this case):\n * hkey = prehashKey(key)\n * hvalue = prehashValue(value)\n *\n * Then combine the bytes, and hash it\n * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)\n */\nexport interface LeafOp {\n hash: HashOp;\n prehash_key: HashOp;\n prehash_value: HashOp;\n length: LengthOp;\n /**\n * prefix is a fixed bytes that may optionally be included at the beginning to differentiate\n * a leaf node from an inner node.\n */\n prefix: Uint8Array;\n}\n\n/**\n * InnerOp represents a merkle-proof step that is not a leaf.\n * It represents concatenating two children and hashing them to provide the next result.\n *\n * The result of the previous step is passed in, so the signature of this op is:\n * innerOp(child) -> output\n *\n * The result of applying InnerOp should be:\n * output = op.hash(op.prefix || child || op.suffix)\n *\n * where the || operator is concatenation of binary data,\n * and child is the result of hashing all the tree below this step.\n *\n * Any special data, like prepending child with the length, or prepending the entire operation with\n * some value to differentiate from leaf nodes, should be included in prefix and suffix.\n * If either of prefix or suffix is empty, we just treat it as an empty string\n */\nexport interface InnerOp {\n hash: HashOp;\n prefix: Uint8Array;\n suffix: Uint8Array;\n}\n\n/**\n * ProofSpec defines what the expected parameters are for a given proof type.\n * This can be stored in the client and used to validate any incoming proofs.\n *\n * verify(ProofSpec, Proof) -> Proof | Error\n *\n * As demonstrated in tests, if we don't fix the algorithm used to calculate the\n * LeafHash for a given tree, there are many possible key-value pairs that can\n * generate a given hash (by interpretting the preimage differently).\n * We need this for proper security, requires client knows a priori what\n * tree format server uses. But not in code, rather a configuration object.\n */\nexport interface ProofSpec {\n /**\n * any field in the ExistenceProof must be the same as in this spec.\n * except Prefix, which is just the first bytes of prefix (spec can be longer)\n */\n leaf_spec?: LeafOp;\n inner_spec?: InnerSpec;\n /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */\n max_depth: number;\n /** min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) */\n min_depth: number;\n}\n\n/**\n * InnerSpec contains all store-specific structure info to determine if two proofs from a\n * given store are neighbors.\n *\n * This enables:\n *\n * isLeftMost(spec: InnerSpec, op: InnerOp)\n * isRightMost(spec: InnerSpec, op: InnerOp)\n * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)\n */\nexport interface InnerSpec {\n /**\n * Child order is the ordering of the children node, must count from 0\n * iavl tree is [0, 1] (left then right)\n * merk is [0, 2, 1] (left, right, here)\n */\n child_order: number[];\n child_size: number;\n min_prefix_length: number;\n max_prefix_length: number;\n /** empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) */\n empty_child: Uint8Array;\n /** hash is the algorithm that must be used for each InnerOp */\n hash: HashOp;\n}\n\n/** BatchProof is a group of multiple proof types than can be compressed */\nexport interface BatchProof {\n entries: BatchEntry[];\n}\n\n/** Use BatchEntry not CommitmentProof, to avoid recursion */\nexport interface BatchEntry {\n exist?: ExistenceProof | undefined;\n nonexist?: NonExistenceProof | undefined;\n}\n\nexport interface CompressedBatchProof {\n entries: CompressedBatchEntry[];\n lookup_inners: InnerOp[];\n}\n\n/** Use BatchEntry not CommitmentProof, to avoid recursion */\nexport interface CompressedBatchEntry {\n exist?: CompressedExistenceProof | undefined;\n nonexist?: CompressedNonExistenceProof | undefined;\n}\n\nexport interface CompressedExistenceProof {\n key: Uint8Array;\n value: Uint8Array;\n leaf?: LeafOp;\n /** these are indexes into the lookup_inners table in CompressedBatchProof */\n path: number[];\n}\n\nexport interface CompressedNonExistenceProof {\n /** TODO: remove this as unnecessary??? we prove a range */\n key: Uint8Array;\n left?: CompressedExistenceProof;\n right?: CompressedExistenceProof;\n}\n\nfunction createBaseExistenceProof(): ExistenceProof {\n return {\n key: new Uint8Array(),\n value: new Uint8Array(),\n leaf: undefined,\n path: [],\n };\n}\n\nexport const ExistenceProof = {\n encode(\n message: ExistenceProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n if (message.value.length !== 0) {\n writer.uint32(18).bytes(message.value);\n }\n if (message.leaf !== undefined) {\n LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim();\n }\n for (const v of message.path) {\n InnerOp.encode(v!, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ExistenceProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseExistenceProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n case 2:\n message.value = reader.bytes();\n break;\n case 3:\n message.leaf = LeafOp.decode(reader, reader.uint32());\n break;\n case 4:\n message.path.push(InnerOp.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ExistenceProof {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n value: isSet(object.value)\n ? bytesFromBase64(object.value)\n : new Uint8Array(),\n leaf: isSet(object.leaf) ? LeafOp.fromJSON(object.leaf) : undefined,\n path: Array.isArray(object?.path)\n ? object.path.map((e: any) => InnerOp.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ExistenceProof): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n message.value !== undefined &&\n (obj.value = base64FromBytes(\n message.value !== undefined ? message.value : new Uint8Array(),\n ));\n message.leaf !== undefined &&\n (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined);\n if (message.path) {\n obj.path = message.path.map((e) => (e ? InnerOp.toJSON(e) : undefined));\n } else {\n obj.path = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ExistenceProof {\n const message = createBaseExistenceProof();\n message.key = object.key ?? new Uint8Array();\n message.value = object.value ?? new Uint8Array();\n message.leaf =\n object.leaf !== undefined && object.leaf !== null\n ? LeafOp.fromPartial(object.leaf)\n : undefined;\n message.path = object.path?.map((e) => InnerOp.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseNonExistenceProof(): NonExistenceProof {\n return { key: new Uint8Array(), left: undefined, right: undefined };\n}\n\nexport const NonExistenceProof = {\n encode(\n message: NonExistenceProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n if (message.left !== undefined) {\n ExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim();\n }\n if (message.right !== undefined) {\n ExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): NonExistenceProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseNonExistenceProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n case 2:\n message.left = ExistenceProof.decode(reader, reader.uint32());\n break;\n case 3:\n message.right = ExistenceProof.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): NonExistenceProof {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n left: isSet(object.left)\n ? ExistenceProof.fromJSON(object.left)\n : undefined,\n right: isSet(object.right)\n ? ExistenceProof.fromJSON(object.right)\n : undefined,\n };\n },\n\n toJSON(message: NonExistenceProof): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n message.left !== undefined &&\n (obj.left = message.left\n ? ExistenceProof.toJSON(message.left)\n : undefined);\n message.right !== undefined &&\n (obj.right = message.right\n ? ExistenceProof.toJSON(message.right)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): NonExistenceProof {\n const message = createBaseNonExistenceProof();\n message.key = object.key ?? new Uint8Array();\n message.left =\n object.left !== undefined && object.left !== null\n ? ExistenceProof.fromPartial(object.left)\n : undefined;\n message.right =\n object.right !== undefined && object.right !== null\n ? ExistenceProof.fromPartial(object.right)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseCommitmentProof(): CommitmentProof {\n return {\n exist: undefined,\n nonexist: undefined,\n batch: undefined,\n compressed: undefined,\n };\n}\n\nexport const CommitmentProof = {\n encode(\n message: CommitmentProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.exist !== undefined) {\n ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim();\n }\n if (message.nonexist !== undefined) {\n NonExistenceProof.encode(\n message.nonexist,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.batch !== undefined) {\n BatchProof.encode(message.batch, writer.uint32(26).fork()).ldelim();\n }\n if (message.compressed !== undefined) {\n CompressedBatchProof.encode(\n message.compressed,\n writer.uint32(34).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): CommitmentProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCommitmentProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.exist = ExistenceProof.decode(reader, reader.uint32());\n break;\n case 2:\n message.nonexist = NonExistenceProof.decode(reader, reader.uint32());\n break;\n case 3:\n message.batch = BatchProof.decode(reader, reader.uint32());\n break;\n case 4:\n message.compressed = CompressedBatchProof.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CommitmentProof {\n return {\n exist: isSet(object.exist)\n ? ExistenceProof.fromJSON(object.exist)\n : undefined,\n nonexist: isSet(object.nonexist)\n ? NonExistenceProof.fromJSON(object.nonexist)\n : undefined,\n batch: isSet(object.batch)\n ? BatchProof.fromJSON(object.batch)\n : undefined,\n compressed: isSet(object.compressed)\n ? CompressedBatchProof.fromJSON(object.compressed)\n : undefined,\n };\n },\n\n toJSON(message: CommitmentProof): unknown {\n const obj: any = {};\n message.exist !== undefined &&\n (obj.exist = message.exist\n ? ExistenceProof.toJSON(message.exist)\n : undefined);\n message.nonexist !== undefined &&\n (obj.nonexist = message.nonexist\n ? NonExistenceProof.toJSON(message.nonexist)\n : undefined);\n message.batch !== undefined &&\n (obj.batch = message.batch\n ? BatchProof.toJSON(message.batch)\n : undefined);\n message.compressed !== undefined &&\n (obj.compressed = message.compressed\n ? CompressedBatchProof.toJSON(message.compressed)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CommitmentProof {\n const message = createBaseCommitmentProof();\n message.exist =\n object.exist !== undefined && object.exist !== null\n ? ExistenceProof.fromPartial(object.exist)\n : undefined;\n message.nonexist =\n object.nonexist !== undefined && object.nonexist !== null\n ? NonExistenceProof.fromPartial(object.nonexist)\n : undefined;\n message.batch =\n object.batch !== undefined && object.batch !== null\n ? BatchProof.fromPartial(object.batch)\n : undefined;\n message.compressed =\n object.compressed !== undefined && object.compressed !== null\n ? CompressedBatchProof.fromPartial(object.compressed)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseLeafOp(): LeafOp {\n return {\n hash: 0,\n prehash_key: 0,\n prehash_value: 0,\n length: 0,\n prefix: new Uint8Array(),\n };\n}\n\nexport const LeafOp = {\n encode(\n message: LeafOp,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.hash !== 0) {\n writer.uint32(8).int32(message.hash);\n }\n if (message.prehash_key !== 0) {\n writer.uint32(16).int32(message.prehash_key);\n }\n if (message.prehash_value !== 0) {\n writer.uint32(24).int32(message.prehash_value);\n }\n if (message.length !== 0) {\n writer.uint32(32).int32(message.length);\n }\n if (message.prefix.length !== 0) {\n writer.uint32(42).bytes(message.prefix);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): LeafOp {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseLeafOp();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.hash = reader.int32() as any;\n break;\n case 2:\n message.prehash_key = reader.int32() as any;\n break;\n case 3:\n message.prehash_value = reader.int32() as any;\n break;\n case 4:\n message.length = reader.int32() as any;\n break;\n case 5:\n message.prefix = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): LeafOp {\n return {\n hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : 0,\n prehash_key: isSet(object.prehash_key)\n ? hashOpFromJSON(object.prehash_key)\n : 0,\n prehash_value: isSet(object.prehash_value)\n ? hashOpFromJSON(object.prehash_value)\n : 0,\n length: isSet(object.length) ? lengthOpFromJSON(object.length) : 0,\n prefix: isSet(object.prefix)\n ? bytesFromBase64(object.prefix)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: LeafOp): unknown {\n const obj: any = {};\n message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));\n message.prehash_key !== undefined &&\n (obj.prehash_key = hashOpToJSON(message.prehash_key));\n message.prehash_value !== undefined &&\n (obj.prehash_value = hashOpToJSON(message.prehash_value));\n message.length !== undefined &&\n (obj.length = lengthOpToJSON(message.length));\n message.prefix !== undefined &&\n (obj.prefix = base64FromBytes(\n message.prefix !== undefined ? message.prefix : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): LeafOp {\n const message = createBaseLeafOp();\n message.hash = object.hash ?? 0;\n message.prehash_key = object.prehash_key ?? 0;\n message.prehash_value = object.prehash_value ?? 0;\n message.length = object.length ?? 0;\n message.prefix = object.prefix ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseInnerOp(): InnerOp {\n return { hash: 0, prefix: new Uint8Array(), suffix: new Uint8Array() };\n}\n\nexport const InnerOp = {\n encode(\n message: InnerOp,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.hash !== 0) {\n writer.uint32(8).int32(message.hash);\n }\n if (message.prefix.length !== 0) {\n writer.uint32(18).bytes(message.prefix);\n }\n if (message.suffix.length !== 0) {\n writer.uint32(26).bytes(message.suffix);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): InnerOp {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseInnerOp();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.hash = reader.int32() as any;\n break;\n case 2:\n message.prefix = reader.bytes();\n break;\n case 3:\n message.suffix = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): InnerOp {\n return {\n hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : 0,\n prefix: isSet(object.prefix)\n ? bytesFromBase64(object.prefix)\n : new Uint8Array(),\n suffix: isSet(object.suffix)\n ? bytesFromBase64(object.suffix)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: InnerOp): unknown {\n const obj: any = {};\n message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));\n message.prefix !== undefined &&\n (obj.prefix = base64FromBytes(\n message.prefix !== undefined ? message.prefix : new Uint8Array(),\n ));\n message.suffix !== undefined &&\n (obj.suffix = base64FromBytes(\n message.suffix !== undefined ? message.suffix : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): InnerOp {\n const message = createBaseInnerOp();\n message.hash = object.hash ?? 0;\n message.prefix = object.prefix ?? new Uint8Array();\n message.suffix = object.suffix ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseProofSpec(): ProofSpec {\n return {\n leaf_spec: undefined,\n inner_spec: undefined,\n max_depth: 0,\n min_depth: 0,\n };\n}\n\nexport const ProofSpec = {\n encode(\n message: ProofSpec,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.leaf_spec !== undefined) {\n LeafOp.encode(message.leaf_spec, writer.uint32(10).fork()).ldelim();\n }\n if (message.inner_spec !== undefined) {\n InnerSpec.encode(message.inner_spec, writer.uint32(18).fork()).ldelim();\n }\n if (message.max_depth !== 0) {\n writer.uint32(24).int32(message.max_depth);\n }\n if (message.min_depth !== 0) {\n writer.uint32(32).int32(message.min_depth);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ProofSpec {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseProofSpec();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.leaf_spec = LeafOp.decode(reader, reader.uint32());\n break;\n case 2:\n message.inner_spec = InnerSpec.decode(reader, reader.uint32());\n break;\n case 3:\n message.max_depth = reader.int32();\n break;\n case 4:\n message.min_depth = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ProofSpec {\n return {\n leaf_spec: isSet(object.leaf_spec)\n ? LeafOp.fromJSON(object.leaf_spec)\n : undefined,\n inner_spec: isSet(object.inner_spec)\n ? InnerSpec.fromJSON(object.inner_spec)\n : undefined,\n max_depth: isSet(object.max_depth) ? Number(object.max_depth) : 0,\n min_depth: isSet(object.min_depth) ? Number(object.min_depth) : 0,\n };\n },\n\n toJSON(message: ProofSpec): unknown {\n const obj: any = {};\n message.leaf_spec !== undefined &&\n (obj.leaf_spec = message.leaf_spec\n ? LeafOp.toJSON(message.leaf_spec)\n : undefined);\n message.inner_spec !== undefined &&\n (obj.inner_spec = message.inner_spec\n ? InnerSpec.toJSON(message.inner_spec)\n : undefined);\n message.max_depth !== undefined &&\n (obj.max_depth = Math.round(message.max_depth));\n message.min_depth !== undefined &&\n (obj.min_depth = Math.round(message.min_depth));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ProofSpec {\n const message = createBaseProofSpec();\n message.leaf_spec =\n object.leaf_spec !== undefined && object.leaf_spec !== null\n ? LeafOp.fromPartial(object.leaf_spec)\n : undefined;\n message.inner_spec =\n object.inner_spec !== undefined && object.inner_spec !== null\n ? InnerSpec.fromPartial(object.inner_spec)\n : undefined;\n message.max_depth = object.max_depth ?? 0;\n message.min_depth = object.min_depth ?? 0;\n return message;\n },\n};\n\nfunction createBaseInnerSpec(): InnerSpec {\n return {\n child_order: [],\n child_size: 0,\n min_prefix_length: 0,\n max_prefix_length: 0,\n empty_child: new Uint8Array(),\n hash: 0,\n };\n}\n\nexport const InnerSpec = {\n encode(\n message: InnerSpec,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n writer.uint32(10).fork();\n for (const v of message.child_order) {\n writer.int32(v);\n }\n writer.ldelim();\n if (message.child_size !== 0) {\n writer.uint32(16).int32(message.child_size);\n }\n if (message.min_prefix_length !== 0) {\n writer.uint32(24).int32(message.min_prefix_length);\n }\n if (message.max_prefix_length !== 0) {\n writer.uint32(32).int32(message.max_prefix_length);\n }\n if (message.empty_child.length !== 0) {\n writer.uint32(42).bytes(message.empty_child);\n }\n if (message.hash !== 0) {\n writer.uint32(48).int32(message.hash);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): InnerSpec {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseInnerSpec();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if ((tag & 7) === 2) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.child_order.push(reader.int32());\n }\n } else {\n message.child_order.push(reader.int32());\n }\n break;\n case 2:\n message.child_size = reader.int32();\n break;\n case 3:\n message.min_prefix_length = reader.int32();\n break;\n case 4:\n message.max_prefix_length = reader.int32();\n break;\n case 5:\n message.empty_child = reader.bytes();\n break;\n case 6:\n message.hash = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): InnerSpec {\n return {\n child_order: Array.isArray(object?.child_order)\n ? object.child_order.map((e: any) => Number(e))\n : [],\n child_size: isSet(object.child_size) ? Number(object.child_size) : 0,\n min_prefix_length: isSet(object.min_prefix_length)\n ? Number(object.min_prefix_length)\n : 0,\n max_prefix_length: isSet(object.max_prefix_length)\n ? Number(object.max_prefix_length)\n : 0,\n empty_child: isSet(object.empty_child)\n ? bytesFromBase64(object.empty_child)\n : new Uint8Array(),\n hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : 0,\n };\n },\n\n toJSON(message: InnerSpec): unknown {\n const obj: any = {};\n if (message.child_order) {\n obj.child_order = message.child_order.map((e) => Math.round(e));\n } else {\n obj.child_order = [];\n }\n message.child_size !== undefined &&\n (obj.child_size = Math.round(message.child_size));\n message.min_prefix_length !== undefined &&\n (obj.min_prefix_length = Math.round(message.min_prefix_length));\n message.max_prefix_length !== undefined &&\n (obj.max_prefix_length = Math.round(message.max_prefix_length));\n message.empty_child !== undefined &&\n (obj.empty_child = base64FromBytes(\n message.empty_child !== undefined\n ? message.empty_child\n : new Uint8Array(),\n ));\n message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): InnerSpec {\n const message = createBaseInnerSpec();\n message.child_order = object.child_order?.map((e) => e) || [];\n message.child_size = object.child_size ?? 0;\n message.min_prefix_length = object.min_prefix_length ?? 0;\n message.max_prefix_length = object.max_prefix_length ?? 0;\n message.empty_child = object.empty_child ?? new Uint8Array();\n message.hash = object.hash ?? 0;\n return message;\n },\n};\n\nfunction createBaseBatchProof(): BatchProof {\n return { entries: [] };\n}\n\nexport const BatchProof = {\n encode(\n message: BatchProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.entries) {\n BatchEntry.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): BatchProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBatchProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.entries.push(BatchEntry.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): BatchProof {\n return {\n entries: Array.isArray(object?.entries)\n ? object.entries.map((e: any) => BatchEntry.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: BatchProof): unknown {\n const obj: any = {};\n if (message.entries) {\n obj.entries = message.entries.map((e) =>\n e ? BatchEntry.toJSON(e) : undefined,\n );\n } else {\n obj.entries = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): BatchProof {\n const message = createBaseBatchProof();\n message.entries =\n object.entries?.map((e) => BatchEntry.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseBatchEntry(): BatchEntry {\n return { exist: undefined, nonexist: undefined };\n}\n\nexport const BatchEntry = {\n encode(\n message: BatchEntry,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.exist !== undefined) {\n ExistenceProof.encode(message.exist, writer.uint32(10).fork()).ldelim();\n }\n if (message.nonexist !== undefined) {\n NonExistenceProof.encode(\n message.nonexist,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): BatchEntry {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBatchEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.exist = ExistenceProof.decode(reader, reader.uint32());\n break;\n case 2:\n message.nonexist = NonExistenceProof.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): BatchEntry {\n return {\n exist: isSet(object.exist)\n ? ExistenceProof.fromJSON(object.exist)\n : undefined,\n nonexist: isSet(object.nonexist)\n ? NonExistenceProof.fromJSON(object.nonexist)\n : undefined,\n };\n },\n\n toJSON(message: BatchEntry): unknown {\n const obj: any = {};\n message.exist !== undefined &&\n (obj.exist = message.exist\n ? ExistenceProof.toJSON(message.exist)\n : undefined);\n message.nonexist !== undefined &&\n (obj.nonexist = message.nonexist\n ? NonExistenceProof.toJSON(message.nonexist)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): BatchEntry {\n const message = createBaseBatchEntry();\n message.exist =\n object.exist !== undefined && object.exist !== null\n ? ExistenceProof.fromPartial(object.exist)\n : undefined;\n message.nonexist =\n object.nonexist !== undefined && object.nonexist !== null\n ? NonExistenceProof.fromPartial(object.nonexist)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseCompressedBatchProof(): CompressedBatchProof {\n return { entries: [], lookup_inners: [] };\n}\n\nexport const CompressedBatchProof = {\n encode(\n message: CompressedBatchProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.entries) {\n CompressedBatchEntry.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.lookup_inners) {\n InnerOp.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): CompressedBatchProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompressedBatchProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.entries.push(\n CompressedBatchEntry.decode(reader, reader.uint32()),\n );\n break;\n case 2:\n message.lookup_inners.push(InnerOp.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CompressedBatchProof {\n return {\n entries: Array.isArray(object?.entries)\n ? object.entries.map((e: any) => CompressedBatchEntry.fromJSON(e))\n : [],\n lookup_inners: Array.isArray(object?.lookup_inners)\n ? object.lookup_inners.map((e: any) => InnerOp.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: CompressedBatchProof): unknown {\n const obj: any = {};\n if (message.entries) {\n obj.entries = message.entries.map((e) =>\n e ? CompressedBatchEntry.toJSON(e) : undefined,\n );\n } else {\n obj.entries = [];\n }\n if (message.lookup_inners) {\n obj.lookup_inners = message.lookup_inners.map((e) =>\n e ? InnerOp.toJSON(e) : undefined,\n );\n } else {\n obj.lookup_inners = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CompressedBatchProof {\n const message = createBaseCompressedBatchProof();\n message.entries =\n object.entries?.map((e) => CompressedBatchEntry.fromPartial(e)) || [];\n message.lookup_inners =\n object.lookup_inners?.map((e) => InnerOp.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseCompressedBatchEntry(): CompressedBatchEntry {\n return { exist: undefined, nonexist: undefined };\n}\n\nexport const CompressedBatchEntry = {\n encode(\n message: CompressedBatchEntry,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.exist !== undefined) {\n CompressedExistenceProof.encode(\n message.exist,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.nonexist !== undefined) {\n CompressedNonExistenceProof.encode(\n message.nonexist,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): CompressedBatchEntry {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompressedBatchEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.exist = CompressedExistenceProof.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 2:\n message.nonexist = CompressedNonExistenceProof.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CompressedBatchEntry {\n return {\n exist: isSet(object.exist)\n ? CompressedExistenceProof.fromJSON(object.exist)\n : undefined,\n nonexist: isSet(object.nonexist)\n ? CompressedNonExistenceProof.fromJSON(object.nonexist)\n : undefined,\n };\n },\n\n toJSON(message: CompressedBatchEntry): unknown {\n const obj: any = {};\n message.exist !== undefined &&\n (obj.exist = message.exist\n ? CompressedExistenceProof.toJSON(message.exist)\n : undefined);\n message.nonexist !== undefined &&\n (obj.nonexist = message.nonexist\n ? CompressedNonExistenceProof.toJSON(message.nonexist)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CompressedBatchEntry {\n const message = createBaseCompressedBatchEntry();\n message.exist =\n object.exist !== undefined && object.exist !== null\n ? CompressedExistenceProof.fromPartial(object.exist)\n : undefined;\n message.nonexist =\n object.nonexist !== undefined && object.nonexist !== null\n ? CompressedNonExistenceProof.fromPartial(object.nonexist)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseCompressedExistenceProof(): CompressedExistenceProof {\n return {\n key: new Uint8Array(),\n value: new Uint8Array(),\n leaf: undefined,\n path: [],\n };\n}\n\nexport const CompressedExistenceProof = {\n encode(\n message: CompressedExistenceProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n if (message.value.length !== 0) {\n writer.uint32(18).bytes(message.value);\n }\n if (message.leaf !== undefined) {\n LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim();\n }\n writer.uint32(34).fork();\n for (const v of message.path) {\n writer.int32(v);\n }\n writer.ldelim();\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): CompressedExistenceProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompressedExistenceProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n case 2:\n message.value = reader.bytes();\n break;\n case 3:\n message.leaf = LeafOp.decode(reader, reader.uint32());\n break;\n case 4:\n if ((tag & 7) === 2) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.path.push(reader.int32());\n }\n } else {\n message.path.push(reader.int32());\n }\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CompressedExistenceProof {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n value: isSet(object.value)\n ? bytesFromBase64(object.value)\n : new Uint8Array(),\n leaf: isSet(object.leaf) ? LeafOp.fromJSON(object.leaf) : undefined,\n path: Array.isArray(object?.path)\n ? object.path.map((e: any) => Number(e))\n : [],\n };\n },\n\n toJSON(message: CompressedExistenceProof): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n message.value !== undefined &&\n (obj.value = base64FromBytes(\n message.value !== undefined ? message.value : new Uint8Array(),\n ));\n message.leaf !== undefined &&\n (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined);\n if (message.path) {\n obj.path = message.path.map((e) => Math.round(e));\n } else {\n obj.path = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CompressedExistenceProof {\n const message = createBaseCompressedExistenceProof();\n message.key = object.key ?? new Uint8Array();\n message.value = object.value ?? new Uint8Array();\n message.leaf =\n object.leaf !== undefined && object.leaf !== null\n ? LeafOp.fromPartial(object.leaf)\n : undefined;\n message.path = object.path?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof {\n return { key: new Uint8Array(), left: undefined, right: undefined };\n}\n\nexport const CompressedNonExistenceProof = {\n encode(\n message: CompressedNonExistenceProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n if (message.left !== undefined) {\n CompressedExistenceProof.encode(\n message.left,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.right !== undefined) {\n CompressedExistenceProof.encode(\n message.right,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): CompressedNonExistenceProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompressedNonExistenceProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n case 2:\n message.left = CompressedExistenceProof.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 3:\n message.right = CompressedExistenceProof.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CompressedNonExistenceProof {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n left: isSet(object.left)\n ? CompressedExistenceProof.fromJSON(object.left)\n : undefined,\n right: isSet(object.right)\n ? CompressedExistenceProof.fromJSON(object.right)\n : undefined,\n };\n },\n\n toJSON(message: CompressedNonExistenceProof): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n message.left !== undefined &&\n (obj.left = message.left\n ? CompressedExistenceProof.toJSON(message.left)\n : undefined);\n message.right !== undefined &&\n (obj.right = message.right\n ? CompressedExistenceProof.toJSON(message.right)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CompressedNonExistenceProof {\n const message = createBaseCompressedNonExistenceProof();\n message.key = object.key ?? new Uint8Array();\n message.left =\n object.left !== undefined && object.left !== null\n ? CompressedExistenceProof.fromPartial(object.left)\n : undefined;\n message.right =\n object.right !== undefined && object.right !== null\n ? CompressedExistenceProof.fromPartial(object.right)\n : undefined;\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../google/protobuf/any\";\nimport { Timestamp } from \"../../../google/protobuf/timestamp\";\n\nexport const protobufPackage = \"cosmos.authz.v1beta1\";\n\n/** Since: cosmos-sdk 0.43 */\n\n/**\n * GenericAuthorization gives the grantee unrestricted permissions to execute\n * the provided method on behalf of the granter's account.\n */\nexport interface GenericAuthorization {\n /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */\n msg: string;\n}\n\n/**\n * Grant gives permissions to execute\n * the provide method with expiration time.\n */\nexport interface Grant {\n authorization?: Any;\n expiration?: Timestamp;\n}\n\n/**\n * GrantAuthorization extends a grant with both the addresses of the grantee and granter.\n * It is used in genesis.proto and query.proto\n *\n * Since: cosmos-sdk 0.45.2\n */\nexport interface GrantAuthorization {\n granter: string;\n grantee: string;\n authorization?: Any;\n expiration?: Timestamp;\n}\n\nfunction createBaseGenericAuthorization(): GenericAuthorization {\n return { msg: \"\" };\n}\n\nexport const GenericAuthorization = {\n encode(\n message: GenericAuthorization,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.msg !== \"\") {\n writer.uint32(10).string(message.msg);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): GenericAuthorization {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGenericAuthorization();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.msg = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): GenericAuthorization {\n return {\n msg: isSet(object.msg) ? String(object.msg) : \"\",\n };\n },\n\n toJSON(message: GenericAuthorization): unknown {\n const obj: any = {};\n message.msg !== undefined && (obj.msg = message.msg);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): GenericAuthorization {\n const message = createBaseGenericAuthorization();\n message.msg = object.msg ?? \"\";\n return message;\n },\n};\n\nfunction createBaseGrant(): Grant {\n return { authorization: undefined, expiration: undefined };\n}\n\nexport const Grant = {\n encode(message: Grant, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.authorization !== undefined) {\n Any.encode(message.authorization, writer.uint32(10).fork()).ldelim();\n }\n if (message.expiration !== undefined) {\n Timestamp.encode(message.expiration, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Grant {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGrant();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.authorization = Any.decode(reader, reader.uint32());\n break;\n case 2:\n message.expiration = Timestamp.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Grant {\n return {\n authorization: isSet(object.authorization)\n ? Any.fromJSON(object.authorization)\n : undefined,\n expiration: isSet(object.expiration)\n ? fromJsonTimestamp(object.expiration)\n : undefined,\n };\n },\n\n toJSON(message: Grant): unknown {\n const obj: any = {};\n message.authorization !== undefined &&\n (obj.authorization = message.authorization\n ? Any.toJSON(message.authorization)\n : undefined);\n message.expiration !== undefined &&\n (obj.expiration = fromTimestamp(message.expiration).toISOString());\n return obj;\n },\n\n fromPartial, I>>(object: I): Grant {\n const message = createBaseGrant();\n message.authorization =\n object.authorization !== undefined && object.authorization !== null\n ? Any.fromPartial(object.authorization)\n : undefined;\n message.expiration =\n object.expiration !== undefined && object.expiration !== null\n ? Timestamp.fromPartial(object.expiration)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseGrantAuthorization(): GrantAuthorization {\n return {\n granter: \"\",\n grantee: \"\",\n authorization: undefined,\n expiration: undefined,\n };\n}\n\nexport const GrantAuthorization = {\n encode(\n message: GrantAuthorization,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.granter !== \"\") {\n writer.uint32(10).string(message.granter);\n }\n if (message.grantee !== \"\") {\n writer.uint32(18).string(message.grantee);\n }\n if (message.authorization !== undefined) {\n Any.encode(message.authorization, writer.uint32(26).fork()).ldelim();\n }\n if (message.expiration !== undefined) {\n Timestamp.encode(message.expiration, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): GrantAuthorization {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGrantAuthorization();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.granter = reader.string();\n break;\n case 2:\n message.grantee = reader.string();\n break;\n case 3:\n message.authorization = Any.decode(reader, reader.uint32());\n break;\n case 4:\n message.expiration = Timestamp.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): GrantAuthorization {\n return {\n granter: isSet(object.granter) ? String(object.granter) : \"\",\n grantee: isSet(object.grantee) ? String(object.grantee) : \"\",\n authorization: isSet(object.authorization)\n ? Any.fromJSON(object.authorization)\n : undefined,\n expiration: isSet(object.expiration)\n ? fromJsonTimestamp(object.expiration)\n : undefined,\n };\n },\n\n toJSON(message: GrantAuthorization): unknown {\n const obj: any = {};\n message.granter !== undefined && (obj.granter = message.granter);\n message.grantee !== undefined && (obj.grantee = message.grantee);\n message.authorization !== undefined &&\n (obj.authorization = message.authorization\n ? Any.toJSON(message.authorization)\n : undefined);\n message.expiration !== undefined &&\n (obj.expiration = fromTimestamp(message.expiration).toISOString());\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): GrantAuthorization {\n const message = createBaseGrantAuthorization();\n message.granter = object.granter ?? \"\";\n message.grantee = object.grantee ?? \"\";\n message.authorization =\n object.authorization !== undefined && object.authorization !== null\n ? Any.fromPartial(object.authorization)\n : undefined;\n message.expiration =\n object.expiration !== undefined && object.expiration !== null\n ? Timestamp.fromPartial(object.expiration)\n : undefined;\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1_000).toString();\n const nanos = (date.getTime() % 1_000) * 1_000_000;\n return { seconds, nanos };\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1_000;\n millis += t.nanos / 1_000_000;\n return new Date(millis);\n}\n\nfunction fromJsonTimestamp(o: any): Timestamp {\n if (o instanceof Date) {\n return toTimestamp(o);\n } else if (typeof o === \"string\") {\n return toTimestamp(new Date(o));\n } else {\n return Timestamp.fromJSON(o);\n }\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Grant } from \"./authz\";\nimport { Any } from \"../../../google/protobuf/any\";\n\nexport const protobufPackage = \"cosmos.authz.v1beta1\";\n\n/** Since: cosmos-sdk 0.43 */\n\n/**\n * MsgGrant is a request type for Grant method. It declares authorization to the grantee\n * on behalf of the granter with the provided expiration time.\n */\nexport interface MsgGrant {\n granter: string;\n grantee: string;\n grant?: Grant;\n}\n\n/** MsgExecResponse defines the Msg/MsgExecResponse response type. */\nexport interface MsgExecResponse {\n results: Uint8Array[];\n}\n\n/**\n * MsgExec attempts to execute the provided messages using\n * authorizations granted to the grantee. Each message should have only\n * one signer corresponding to the granter of the authorization.\n */\nexport interface MsgExec {\n grantee: string;\n /**\n * Authorization Msg requests to execute. Each msg must implement Authorization interface\n * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))\n * triple and validate it.\n */\n msgs: Any[];\n}\n\n/** MsgGrantResponse defines the Msg/MsgGrant response type. */\nexport interface MsgGrantResponse {}\n\n/**\n * MsgRevoke revokes any authorization with the provided sdk.Msg type on the\n * granter's account with that has been granted to the grantee.\n */\nexport interface MsgRevoke {\n granter: string;\n grantee: string;\n msg_type_url: string;\n}\n\n/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */\nexport interface MsgRevokeResponse {}\n\nfunction createBaseMsgGrant(): MsgGrant {\n return { granter: \"\", grantee: \"\", grant: undefined };\n}\n\nexport const MsgGrant = {\n encode(\n message: MsgGrant,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.granter !== \"\") {\n writer.uint32(10).string(message.granter);\n }\n if (message.grantee !== \"\") {\n writer.uint32(18).string(message.grantee);\n }\n if (message.grant !== undefined) {\n Grant.encode(message.grant, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgGrant {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgGrant();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.granter = reader.string();\n break;\n case 2:\n message.grantee = reader.string();\n break;\n case 3:\n message.grant = Grant.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgGrant {\n return {\n granter: isSet(object.granter) ? String(object.granter) : \"\",\n grantee: isSet(object.grantee) ? String(object.grantee) : \"\",\n grant: isSet(object.grant) ? Grant.fromJSON(object.grant) : undefined,\n };\n },\n\n toJSON(message: MsgGrant): unknown {\n const obj: any = {};\n message.granter !== undefined && (obj.granter = message.granter);\n message.grantee !== undefined && (obj.grantee = message.grantee);\n message.grant !== undefined &&\n (obj.grant = message.grant ? Grant.toJSON(message.grant) : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): MsgGrant {\n const message = createBaseMsgGrant();\n message.granter = object.granter ?? \"\";\n message.grantee = object.grantee ?? \"\";\n message.grant =\n object.grant !== undefined && object.grant !== null\n ? Grant.fromPartial(object.grant)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgExecResponse(): MsgExecResponse {\n return { results: [] };\n}\n\nexport const MsgExecResponse = {\n encode(\n message: MsgExecResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.results) {\n writer.uint32(10).bytes(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgExecResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.results.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgExecResponse {\n return {\n results: Array.isArray(object?.results)\n ? object.results.map((e: any) => bytesFromBase64(e))\n : [],\n };\n },\n\n toJSON(message: MsgExecResponse): unknown {\n const obj: any = {};\n if (message.results) {\n obj.results = message.results.map((e) =>\n base64FromBytes(e !== undefined ? e : new Uint8Array()),\n );\n } else {\n obj.results = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgExecResponse {\n const message = createBaseMsgExecResponse();\n message.results = object.results?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseMsgExec(): MsgExec {\n return { grantee: \"\", msgs: [] };\n}\n\nexport const MsgExec = {\n encode(\n message: MsgExec,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.grantee !== \"\") {\n writer.uint32(10).string(message.grantee);\n }\n for (const v of message.msgs) {\n Any.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgExec {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgExec();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.grantee = reader.string();\n break;\n case 2:\n message.msgs.push(Any.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgExec {\n return {\n grantee: isSet(object.grantee) ? String(object.grantee) : \"\",\n msgs: Array.isArray(object?.msgs)\n ? object.msgs.map((e: any) => Any.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: MsgExec): unknown {\n const obj: any = {};\n message.grantee !== undefined && (obj.grantee = message.grantee);\n if (message.msgs) {\n obj.msgs = message.msgs.map((e) => (e ? Any.toJSON(e) : undefined));\n } else {\n obj.msgs = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): MsgExec {\n const message = createBaseMsgExec();\n message.grantee = object.grantee ?? \"\";\n message.msgs = object.msgs?.map((e) => Any.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseMsgGrantResponse(): MsgGrantResponse {\n return {};\n}\n\nexport const MsgGrantResponse = {\n encode(\n _: MsgGrantResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgGrantResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgGrantResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgGrantResponse {\n return {};\n },\n\n toJSON(_: MsgGrantResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgGrantResponse {\n const message = createBaseMsgGrantResponse();\n return message;\n },\n};\n\nfunction createBaseMsgRevoke(): MsgRevoke {\n return { granter: \"\", grantee: \"\", msg_type_url: \"\" };\n}\n\nexport const MsgRevoke = {\n encode(\n message: MsgRevoke,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.granter !== \"\") {\n writer.uint32(10).string(message.granter);\n }\n if (message.grantee !== \"\") {\n writer.uint32(18).string(message.grantee);\n }\n if (message.msg_type_url !== \"\") {\n writer.uint32(26).string(message.msg_type_url);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevoke {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRevoke();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.granter = reader.string();\n break;\n case 2:\n message.grantee = reader.string();\n break;\n case 3:\n message.msg_type_url = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgRevoke {\n return {\n granter: isSet(object.granter) ? String(object.granter) : \"\",\n grantee: isSet(object.grantee) ? String(object.grantee) : \"\",\n msg_type_url: isSet(object.msg_type_url)\n ? String(object.msg_type_url)\n : \"\",\n };\n },\n\n toJSON(message: MsgRevoke): unknown {\n const obj: any = {};\n message.granter !== undefined && (obj.granter = message.granter);\n message.grantee !== undefined && (obj.grantee = message.grantee);\n message.msg_type_url !== undefined &&\n (obj.msg_type_url = message.msg_type_url);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgRevoke {\n const message = createBaseMsgRevoke();\n message.granter = object.granter ?? \"\";\n message.grantee = object.grantee ?? \"\";\n message.msg_type_url = object.msg_type_url ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgRevokeResponse(): MsgRevokeResponse {\n return {};\n}\n\nexport const MsgRevokeResponse = {\n encode(\n _: MsgRevokeResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRevokeResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgRevokeResponse {\n return {};\n },\n\n toJSON(_: MsgRevokeResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgRevokeResponse {\n const message = createBaseMsgRevokeResponse();\n return message;\n },\n};\n\n/** Msg defines the authz Msg service. */\nexport interface Msg {\n /**\n * Grant grants the provided authorization to the grantee on the granter's\n * account with the provided expiration time. If there is already a grant\n * for the given (granter, grantee, Authorization) triple, then the grant\n * will be overwritten.\n */\n Grant(request: MsgGrant): Promise;\n /**\n * Exec attempts to execute the provided messages using\n * authorizations granted to the grantee. Each message should have only\n * one signer corresponding to the granter of the authorization.\n */\n Exec(request: MsgExec): Promise;\n /**\n * Revoke revokes any authorization corresponding to the provided method name on the\n * granter's account that has been granted to the grantee.\n */\n Revoke(request: MsgRevoke): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.Grant = this.Grant.bind(this);\n this.Exec = this.Exec.bind(this);\n this.Revoke = this.Revoke.bind(this);\n }\n Grant(request: MsgGrant): Promise {\n const data = MsgGrant.encode(request).finish();\n const promise = this.rpc.request(\"cosmos.authz.v1beta1.Msg\", \"Grant\", data);\n return promise.then((data) =>\n MsgGrantResponse.decode(new _m0.Reader(data)),\n );\n }\n\n Exec(request: MsgExec): Promise {\n const data = MsgExec.encode(request).finish();\n const promise = this.rpc.request(\"cosmos.authz.v1beta1.Msg\", \"Exec\", data);\n return promise.then((data) => MsgExecResponse.decode(new _m0.Reader(data)));\n }\n\n Revoke(request: MsgRevoke): Promise {\n const data = MsgRevoke.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.authz.v1beta1.Msg\",\n \"Revoke\",\n data,\n );\n return promise.then((data) =>\n MsgRevokeResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.bank.v1beta1\";\n\n/**\n * SendAuthorization allows the grantee to spend up to spend_limit coins from\n * the granter's account.\n *\n * Since: cosmos-sdk 0.43\n */\nexport interface SendAuthorization {\n spend_limit: Coin[];\n}\n\nfunction createBaseSendAuthorization(): SendAuthorization {\n return { spend_limit: [] };\n}\n\nexport const SendAuthorization = {\n encode(\n message: SendAuthorization,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.spend_limit) {\n Coin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SendAuthorization {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSendAuthorization();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.spend_limit.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SendAuthorization {\n return {\n spend_limit: Array.isArray(object?.spend_limit)\n ? object.spend_limit.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: SendAuthorization): unknown {\n const obj: any = {};\n if (message.spend_limit) {\n obj.spend_limit = message.spend_limit.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.spend_limit = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SendAuthorization {\n const message = createBaseSendAuthorization();\n message.spend_limit =\n object.spend_limit?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.bank.v1beta1\";\n\n/** Params defines the parameters for the bank module. */\nexport interface Params {\n send_enabled: SendEnabled[];\n default_send_enabled: boolean;\n}\n\n/**\n * SendEnabled maps coin denom to a send_enabled status (whether a denom is\n * sendable).\n */\nexport interface SendEnabled {\n denom: string;\n enabled: boolean;\n}\n\n/** Input models transaction input. */\nexport interface Input {\n address: string;\n coins: Coin[];\n}\n\n/** Output models transaction outputs. */\nexport interface Output {\n address: string;\n coins: Coin[];\n}\n\n/**\n * Supply represents a struct that passively keeps track of the total supply\n * amounts in the network.\n * This message is deprecated now that supply is indexed by denom.\n *\n * @deprecated\n */\nexport interface Supply {\n total: Coin[];\n}\n\n/**\n * DenomUnit represents a struct that describes a given\n * denomination unit of the basic token.\n */\nexport interface DenomUnit {\n /** denom represents the string name of the given denom unit (e.g uatom). */\n denom: string;\n /**\n * exponent represents power of 10 exponent that one must\n * raise the base_denom to in order to equal the given DenomUnit's denom\n * 1 denom = 1^exponent base_denom\n * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with\n * exponent = 6, thus: 1 atom = 10^6 uatom).\n */\n exponent: number;\n /** aliases is a list of string aliases for the given denom */\n aliases: string[];\n}\n\n/**\n * Metadata represents a struct that describes\n * a basic token.\n */\nexport interface Metadata {\n description: string;\n /** denom_units represents the list of DenomUnit's for a given coin */\n denom_units: DenomUnit[];\n /** base represents the base denom (should be the DenomUnit with exponent = 0). */\n base: string;\n /**\n * display indicates the suggested denom that should be\n * displayed in clients.\n */\n display: string;\n /**\n * name defines the name of the token (eg: Cosmos Atom)\n *\n * Since: cosmos-sdk 0.43\n */\n name: string;\n /**\n * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can\n * be the same as the display.\n *\n * Since: cosmos-sdk 0.43\n */\n symbol: string;\n}\n\nfunction createBaseParams(): Params {\n return { send_enabled: [], default_send_enabled: false };\n}\n\nexport const Params = {\n encode(\n message: Params,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.send_enabled) {\n SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.default_send_enabled === true) {\n writer.uint32(16).bool(message.default_send_enabled);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Params {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.send_enabled.push(\n SendEnabled.decode(reader, reader.uint32()),\n );\n break;\n case 2:\n message.default_send_enabled = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Params {\n return {\n send_enabled: Array.isArray(object?.send_enabled)\n ? object.send_enabled.map((e: any) => SendEnabled.fromJSON(e))\n : [],\n default_send_enabled: isSet(object.default_send_enabled)\n ? Boolean(object.default_send_enabled)\n : false,\n };\n },\n\n toJSON(message: Params): unknown {\n const obj: any = {};\n if (message.send_enabled) {\n obj.send_enabled = message.send_enabled.map((e) =>\n e ? SendEnabled.toJSON(e) : undefined,\n );\n } else {\n obj.send_enabled = [];\n }\n message.default_send_enabled !== undefined &&\n (obj.default_send_enabled = message.default_send_enabled);\n return obj;\n },\n\n fromPartial, I>>(object: I): Params {\n const message = createBaseParams();\n message.send_enabled =\n object.send_enabled?.map((e) => SendEnabled.fromPartial(e)) || [];\n message.default_send_enabled = object.default_send_enabled ?? false;\n return message;\n },\n};\n\nfunction createBaseSendEnabled(): SendEnabled {\n return { denom: \"\", enabled: false };\n}\n\nexport const SendEnabled = {\n encode(\n message: SendEnabled,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.denom !== \"\") {\n writer.uint32(10).string(message.denom);\n }\n if (message.enabled === true) {\n writer.uint32(16).bool(message.enabled);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SendEnabled {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSendEnabled();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.denom = reader.string();\n break;\n case 2:\n message.enabled = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SendEnabled {\n return {\n denom: isSet(object.denom) ? String(object.denom) : \"\",\n enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,\n };\n },\n\n toJSON(message: SendEnabled): unknown {\n const obj: any = {};\n message.denom !== undefined && (obj.denom = message.denom);\n message.enabled !== undefined && (obj.enabled = message.enabled);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SendEnabled {\n const message = createBaseSendEnabled();\n message.denom = object.denom ?? \"\";\n message.enabled = object.enabled ?? false;\n return message;\n },\n};\n\nfunction createBaseInput(): Input {\n return { address: \"\", coins: [] };\n}\n\nexport const Input = {\n encode(message: Input, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.address !== \"\") {\n writer.uint32(10).string(message.address);\n }\n for (const v of message.coins) {\n Coin.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Input {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseInput();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.address = reader.string();\n break;\n case 2:\n message.coins.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Input {\n return {\n address: isSet(object.address) ? String(object.address) : \"\",\n coins: Array.isArray(object?.coins)\n ? object.coins.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Input): unknown {\n const obj: any = {};\n message.address !== undefined && (obj.address = message.address);\n if (message.coins) {\n obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.coins = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Input {\n const message = createBaseInput();\n message.address = object.address ?? \"\";\n message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseOutput(): Output {\n return { address: \"\", coins: [] };\n}\n\nexport const Output = {\n encode(\n message: Output,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.address !== \"\") {\n writer.uint32(10).string(message.address);\n }\n for (const v of message.coins) {\n Coin.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Output {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseOutput();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.address = reader.string();\n break;\n case 2:\n message.coins.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Output {\n return {\n address: isSet(object.address) ? String(object.address) : \"\",\n coins: Array.isArray(object?.coins)\n ? object.coins.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Output): unknown {\n const obj: any = {};\n message.address !== undefined && (obj.address = message.address);\n if (message.coins) {\n obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.coins = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Output {\n const message = createBaseOutput();\n message.address = object.address ?? \"\";\n message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseSupply(): Supply {\n return { total: [] };\n}\n\nexport const Supply = {\n encode(\n message: Supply,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.total) {\n Coin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Supply {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSupply();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.total.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Supply {\n return {\n total: Array.isArray(object?.total)\n ? object.total.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Supply): unknown {\n const obj: any = {};\n if (message.total) {\n obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.total = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Supply {\n const message = createBaseSupply();\n message.total = object.total?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseDenomUnit(): DenomUnit {\n return { denom: \"\", exponent: 0, aliases: [] };\n}\n\nexport const DenomUnit = {\n encode(\n message: DenomUnit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.denom !== \"\") {\n writer.uint32(10).string(message.denom);\n }\n if (message.exponent !== 0) {\n writer.uint32(16).uint32(message.exponent);\n }\n for (const v of message.aliases) {\n writer.uint32(26).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DenomUnit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDenomUnit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.denom = reader.string();\n break;\n case 2:\n message.exponent = reader.uint32();\n break;\n case 3:\n message.aliases.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DenomUnit {\n return {\n denom: isSet(object.denom) ? String(object.denom) : \"\",\n exponent: isSet(object.exponent) ? Number(object.exponent) : 0,\n aliases: Array.isArray(object?.aliases)\n ? object.aliases.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: DenomUnit): unknown {\n const obj: any = {};\n message.denom !== undefined && (obj.denom = message.denom);\n message.exponent !== undefined &&\n (obj.exponent = Math.round(message.exponent));\n if (message.aliases) {\n obj.aliases = message.aliases.map((e) => e);\n } else {\n obj.aliases = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): DenomUnit {\n const message = createBaseDenomUnit();\n message.denom = object.denom ?? \"\";\n message.exponent = object.exponent ?? 0;\n message.aliases = object.aliases?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseMetadata(): Metadata {\n return {\n description: \"\",\n denom_units: [],\n base: \"\",\n display: \"\",\n name: \"\",\n symbol: \"\",\n };\n}\n\nexport const Metadata = {\n encode(\n message: Metadata,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.description !== \"\") {\n writer.uint32(10).string(message.description);\n }\n for (const v of message.denom_units) {\n DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n if (message.base !== \"\") {\n writer.uint32(26).string(message.base);\n }\n if (message.display !== \"\") {\n writer.uint32(34).string(message.display);\n }\n if (message.name !== \"\") {\n writer.uint32(42).string(message.name);\n }\n if (message.symbol !== \"\") {\n writer.uint32(50).string(message.symbol);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Metadata {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMetadata();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.description = reader.string();\n break;\n case 2:\n message.denom_units.push(DenomUnit.decode(reader, reader.uint32()));\n break;\n case 3:\n message.base = reader.string();\n break;\n case 4:\n message.display = reader.string();\n break;\n case 5:\n message.name = reader.string();\n break;\n case 6:\n message.symbol = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Metadata {\n return {\n description: isSet(object.description) ? String(object.description) : \"\",\n denom_units: Array.isArray(object?.denom_units)\n ? object.denom_units.map((e: any) => DenomUnit.fromJSON(e))\n : [],\n base: isSet(object.base) ? String(object.base) : \"\",\n display: isSet(object.display) ? String(object.display) : \"\",\n name: isSet(object.name) ? String(object.name) : \"\",\n symbol: isSet(object.symbol) ? String(object.symbol) : \"\",\n };\n },\n\n toJSON(message: Metadata): unknown {\n const obj: any = {};\n message.description !== undefined &&\n (obj.description = message.description);\n if (message.denom_units) {\n obj.denom_units = message.denom_units.map((e) =>\n e ? DenomUnit.toJSON(e) : undefined,\n );\n } else {\n obj.denom_units = [];\n }\n message.base !== undefined && (obj.base = message.base);\n message.display !== undefined && (obj.display = message.display);\n message.name !== undefined && (obj.name = message.name);\n message.symbol !== undefined && (obj.symbol = message.symbol);\n return obj;\n },\n\n fromPartial, I>>(object: I): Metadata {\n const message = createBaseMetadata();\n message.description = object.description ?? \"\";\n message.denom_units =\n object.denom_units?.map((e) => DenomUnit.fromPartial(e)) || [];\n message.base = object.base ?? \"\";\n message.display = object.display ?? \"\";\n message.name = object.name ?? \"\";\n message.symbol = object.symbol ?? \"\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Coin } from \"../../base/v1beta1/coin\";\nimport { Input, Output } from \"./bank\";\n\nexport const protobufPackage = \"cosmos.bank.v1beta1\";\n\n/** MsgSend represents a message to send coins from one account to another. */\nexport interface MsgSend {\n from_address: string;\n to_address: string;\n amount: Coin[];\n}\n\n/** MsgSendResponse defines the Msg/Send response type. */\nexport interface MsgSendResponse {}\n\n/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */\nexport interface MsgMultiSend {\n inputs: Input[];\n outputs: Output[];\n}\n\n/** MsgMultiSendResponse defines the Msg/MultiSend response type. */\nexport interface MsgMultiSendResponse {}\n\nfunction createBaseMsgSend(): MsgSend {\n return { from_address: \"\", to_address: \"\", amount: [] };\n}\n\nexport const MsgSend = {\n encode(\n message: MsgSend,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.from_address !== \"\") {\n writer.uint32(10).string(message.from_address);\n }\n if (message.to_address !== \"\") {\n writer.uint32(18).string(message.to_address);\n }\n for (const v of message.amount) {\n Coin.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgSend {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSend();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.from_address = reader.string();\n break;\n case 2:\n message.to_address = reader.string();\n break;\n case 3:\n message.amount.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgSend {\n return {\n from_address: isSet(object.from_address)\n ? String(object.from_address)\n : \"\",\n to_address: isSet(object.to_address) ? String(object.to_address) : \"\",\n amount: Array.isArray(object?.amount)\n ? object.amount.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: MsgSend): unknown {\n const obj: any = {};\n message.from_address !== undefined &&\n (obj.from_address = message.from_address);\n message.to_address !== undefined && (obj.to_address = message.to_address);\n if (message.amount) {\n obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.amount = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): MsgSend {\n const message = createBaseMsgSend();\n message.from_address = object.from_address ?? \"\";\n message.to_address = object.to_address ?? \"\";\n message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseMsgSendResponse(): MsgSendResponse {\n return {};\n}\n\nexport const MsgSendResponse = {\n encode(\n _: MsgSendResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgSendResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSendResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgSendResponse {\n return {};\n },\n\n toJSON(_: MsgSendResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgSendResponse {\n const message = createBaseMsgSendResponse();\n return message;\n },\n};\n\nfunction createBaseMsgMultiSend(): MsgMultiSend {\n return { inputs: [], outputs: [] };\n}\n\nexport const MsgMultiSend = {\n encode(\n message: MsgMultiSend,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.inputs) {\n Input.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.outputs) {\n Output.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgMultiSend {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgMultiSend();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.inputs.push(Input.decode(reader, reader.uint32()));\n break;\n case 2:\n message.outputs.push(Output.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgMultiSend {\n return {\n inputs: Array.isArray(object?.inputs)\n ? object.inputs.map((e: any) => Input.fromJSON(e))\n : [],\n outputs: Array.isArray(object?.outputs)\n ? object.outputs.map((e: any) => Output.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: MsgMultiSend): unknown {\n const obj: any = {};\n if (message.inputs) {\n obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined));\n } else {\n obj.inputs = [];\n }\n if (message.outputs) {\n obj.outputs = message.outputs.map((e) =>\n e ? Output.toJSON(e) : undefined,\n );\n } else {\n obj.outputs = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgMultiSend {\n const message = createBaseMsgMultiSend();\n message.inputs = object.inputs?.map((e) => Input.fromPartial(e)) || [];\n message.outputs = object.outputs?.map((e) => Output.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseMsgMultiSendResponse(): MsgMultiSendResponse {\n return {};\n}\n\nexport const MsgMultiSendResponse = {\n encode(\n _: MsgMultiSendResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgMultiSendResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgMultiSendResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgMultiSendResponse {\n return {};\n },\n\n toJSON(_: MsgMultiSendResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgMultiSendResponse {\n const message = createBaseMsgMultiSendResponse();\n return message;\n },\n};\n\n/** Msg defines the bank Msg service. */\nexport interface Msg {\n /** Send defines a method for sending coins from one account to another account. */\n Send(request: MsgSend): Promise;\n /** MultiSend defines a method for sending coins from some accounts to other accounts. */\n MultiSend(request: MsgMultiSend): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.Send = this.Send.bind(this);\n this.MultiSend = this.MultiSend.bind(this);\n }\n Send(request: MsgSend): Promise {\n const data = MsgSend.encode(request).finish();\n const promise = this.rpc.request(\"cosmos.bank.v1beta1.Msg\", \"Send\", data);\n return promise.then((data) => MsgSendResponse.decode(new _m0.Reader(data)));\n }\n\n MultiSend(request: MsgMultiSend): Promise {\n const data = MsgMultiSend.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.bank.v1beta1.Msg\",\n \"MultiSend\",\n data,\n );\n return promise.then((data) =>\n MsgMultiSendResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../../google/protobuf/any\";\nimport { Event } from \"../../../../tendermint/abci/types\";\n\nexport const protobufPackage = \"cosmos.base.abci.v1beta1\";\n\n/**\n * TxResponse defines a structure containing relevant tx data and metadata. The\n * tags are stringified and the log is JSON decoded.\n */\nexport interface TxResponse {\n /** The block height */\n height: string;\n /** The transaction hash. */\n txhash: string;\n /** Namespace for the Code */\n codespace: string;\n /** Response code. */\n code: number;\n /** Result bytes, if any. */\n data: string;\n /**\n * The output of the application's logger (raw string). May be\n * non-deterministic.\n */\n raw_log: string;\n /** The output of the application's logger (typed). May be non-deterministic. */\n logs: ABCIMessageLog[];\n /** Additional information. May be non-deterministic. */\n info: string;\n /** Amount of gas requested for transaction. */\n gas_wanted: string;\n /** Amount of gas consumed by transaction. */\n gas_used: string;\n /** The request transaction bytes. */\n tx?: Any;\n /**\n * Time of the previous block. For heights > 1, it's the weighted median of\n * the timestamps of the valid votes in the block.LastCommit. For height == 1,\n * it's genesis time.\n */\n timestamp: string;\n /**\n * Events defines all the events emitted by processing a transaction. Note,\n * these events include those emitted by processing all the messages and those\n * emitted from the ante handler. Whereas Logs contains the events, with\n * additional metadata, emitted only by processing the messages.\n *\n * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45\n */\n events: Event[];\n}\n\n/** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */\nexport interface ABCIMessageLog {\n msg_index: number;\n log: string;\n /**\n * Events contains a slice of Event objects that were emitted during some\n * execution.\n */\n events: StringEvent[];\n}\n\n/**\n * StringEvent defines en Event object wrapper where all the attributes\n * contain key/value pairs that are strings instead of raw bytes.\n */\nexport interface StringEvent {\n type: string;\n attributes: Attribute[];\n}\n\n/**\n * Attribute defines an attribute wrapper where the key and value are\n * strings instead of raw bytes.\n */\nexport interface Attribute {\n key: string;\n value: string;\n}\n\n/** GasInfo defines tx execution gas context. */\nexport interface GasInfo {\n /** GasWanted is the maximum units of work we allow this tx to perform. */\n gas_wanted: string;\n /** GasUsed is the amount of gas actually consumed. */\n gas_used: string;\n}\n\n/** Result is the union of ResponseFormat and ResponseCheckTx. */\nexport interface Result {\n /**\n * Data is any data returned from message or handler execution. It MUST be\n * length prefixed in order to separate data from multiple message executions.\n */\n data: Uint8Array;\n /** Log contains the log information from message or handler execution. */\n log: string;\n /**\n * Events contains a slice of Event objects that were emitted during message\n * or handler execution.\n */\n events: Event[];\n}\n\n/**\n * SimulationResponse defines the response generated when a transaction is\n * successfully simulated.\n */\nexport interface SimulationResponse {\n gas_info?: GasInfo;\n result?: Result;\n}\n\n/**\n * MsgData defines the data returned in a Result object during message\n * execution.\n */\nexport interface MsgData {\n msg_type: string;\n data: Uint8Array;\n}\n\n/**\n * TxMsgData defines a list of MsgData. A transaction will have a MsgData object\n * for each message.\n */\nexport interface TxMsgData {\n data: MsgData[];\n}\n\n/** SearchTxsResult defines a structure for querying txs pageable */\nexport interface SearchTxsResult {\n /** Count of all txs */\n total_count: string;\n /** Count of txs in current page */\n count: string;\n /** Index of current page, start from 1 */\n page_number: string;\n /** Count of total pages */\n page_total: string;\n /** Max count txs per page */\n limit: string;\n /** List of txs in current page */\n txs: TxResponse[];\n}\n\nfunction createBaseTxResponse(): TxResponse {\n return {\n height: \"0\",\n txhash: \"\",\n codespace: \"\",\n code: 0,\n data: \"\",\n raw_log: \"\",\n logs: [],\n info: \"\",\n gas_wanted: \"0\",\n gas_used: \"0\",\n tx: undefined,\n timestamp: \"\",\n events: [],\n };\n}\n\nexport const TxResponse = {\n encode(\n message: TxResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.height !== \"0\") {\n writer.uint32(8).int64(message.height);\n }\n if (message.txhash !== \"\") {\n writer.uint32(18).string(message.txhash);\n }\n if (message.codespace !== \"\") {\n writer.uint32(26).string(message.codespace);\n }\n if (message.code !== 0) {\n writer.uint32(32).uint32(message.code);\n }\n if (message.data !== \"\") {\n writer.uint32(42).string(message.data);\n }\n if (message.raw_log !== \"\") {\n writer.uint32(50).string(message.raw_log);\n }\n for (const v of message.logs) {\n ABCIMessageLog.encode(v!, writer.uint32(58).fork()).ldelim();\n }\n if (message.info !== \"\") {\n writer.uint32(66).string(message.info);\n }\n if (message.gas_wanted !== \"0\") {\n writer.uint32(72).int64(message.gas_wanted);\n }\n if (message.gas_used !== \"0\") {\n writer.uint32(80).int64(message.gas_used);\n }\n if (message.tx !== undefined) {\n Any.encode(message.tx, writer.uint32(90).fork()).ldelim();\n }\n if (message.timestamp !== \"\") {\n writer.uint32(98).string(message.timestamp);\n }\n for (const v of message.events) {\n Event.encode(v!, writer.uint32(106).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TxResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTxResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.height = longToString(reader.int64() as Long);\n break;\n case 2:\n message.txhash = reader.string();\n break;\n case 3:\n message.codespace = reader.string();\n break;\n case 4:\n message.code = reader.uint32();\n break;\n case 5:\n message.data = reader.string();\n break;\n case 6:\n message.raw_log = reader.string();\n break;\n case 7:\n message.logs.push(ABCIMessageLog.decode(reader, reader.uint32()));\n break;\n case 8:\n message.info = reader.string();\n break;\n case 9:\n message.gas_wanted = longToString(reader.int64() as Long);\n break;\n case 10:\n message.gas_used = longToString(reader.int64() as Long);\n break;\n case 11:\n message.tx = Any.decode(reader, reader.uint32());\n break;\n case 12:\n message.timestamp = reader.string();\n break;\n case 13:\n message.events.push(Event.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TxResponse {\n return {\n height: isSet(object.height) ? String(object.height) : \"0\",\n txhash: isSet(object.txhash) ? String(object.txhash) : \"\",\n codespace: isSet(object.codespace) ? String(object.codespace) : \"\",\n code: isSet(object.code) ? Number(object.code) : 0,\n data: isSet(object.data) ? String(object.data) : \"\",\n raw_log: isSet(object.raw_log) ? String(object.raw_log) : \"\",\n logs: Array.isArray(object?.logs)\n ? object.logs.map((e: any) => ABCIMessageLog.fromJSON(e))\n : [],\n info: isSet(object.info) ? String(object.info) : \"\",\n gas_wanted: isSet(object.gas_wanted) ? String(object.gas_wanted) : \"0\",\n gas_used: isSet(object.gas_used) ? String(object.gas_used) : \"0\",\n tx: isSet(object.tx) ? Any.fromJSON(object.tx) : undefined,\n timestamp: isSet(object.timestamp) ? String(object.timestamp) : \"\",\n events: Array.isArray(object?.events)\n ? object.events.map((e: any) => Event.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: TxResponse): unknown {\n const obj: any = {};\n message.height !== undefined && (obj.height = message.height);\n message.txhash !== undefined && (obj.txhash = message.txhash);\n message.codespace !== undefined && (obj.codespace = message.codespace);\n message.code !== undefined && (obj.code = Math.round(message.code));\n message.data !== undefined && (obj.data = message.data);\n message.raw_log !== undefined && (obj.raw_log = message.raw_log);\n if (message.logs) {\n obj.logs = message.logs.map((e) =>\n e ? ABCIMessageLog.toJSON(e) : undefined,\n );\n } else {\n obj.logs = [];\n }\n message.info !== undefined && (obj.info = message.info);\n message.gas_wanted !== undefined && (obj.gas_wanted = message.gas_wanted);\n message.gas_used !== undefined && (obj.gas_used = message.gas_used);\n message.tx !== undefined &&\n (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined);\n message.timestamp !== undefined && (obj.timestamp = message.timestamp);\n if (message.events) {\n obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined));\n } else {\n obj.events = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): TxResponse {\n const message = createBaseTxResponse();\n message.height = object.height ?? \"0\";\n message.txhash = object.txhash ?? \"\";\n message.codespace = object.codespace ?? \"\";\n message.code = object.code ?? 0;\n message.data = object.data ?? \"\";\n message.raw_log = object.raw_log ?? \"\";\n message.logs = object.logs?.map((e) => ABCIMessageLog.fromPartial(e)) || [];\n message.info = object.info ?? \"\";\n message.gas_wanted = object.gas_wanted ?? \"0\";\n message.gas_used = object.gas_used ?? \"0\";\n message.tx =\n object.tx !== undefined && object.tx !== null\n ? Any.fromPartial(object.tx)\n : undefined;\n message.timestamp = object.timestamp ?? \"\";\n message.events = object.events?.map((e) => Event.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseABCIMessageLog(): ABCIMessageLog {\n return { msg_index: 0, log: \"\", events: [] };\n}\n\nexport const ABCIMessageLog = {\n encode(\n message: ABCIMessageLog,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.msg_index !== 0) {\n writer.uint32(8).uint32(message.msg_index);\n }\n if (message.log !== \"\") {\n writer.uint32(18).string(message.log);\n }\n for (const v of message.events) {\n StringEvent.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ABCIMessageLog {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseABCIMessageLog();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.msg_index = reader.uint32();\n break;\n case 2:\n message.log = reader.string();\n break;\n case 3:\n message.events.push(StringEvent.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ABCIMessageLog {\n return {\n msg_index: isSet(object.msg_index) ? Number(object.msg_index) : 0,\n log: isSet(object.log) ? String(object.log) : \"\",\n events: Array.isArray(object?.events)\n ? object.events.map((e: any) => StringEvent.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ABCIMessageLog): unknown {\n const obj: any = {};\n message.msg_index !== undefined &&\n (obj.msg_index = Math.round(message.msg_index));\n message.log !== undefined && (obj.log = message.log);\n if (message.events) {\n obj.events = message.events.map((e) =>\n e ? StringEvent.toJSON(e) : undefined,\n );\n } else {\n obj.events = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ABCIMessageLog {\n const message = createBaseABCIMessageLog();\n message.msg_index = object.msg_index ?? 0;\n message.log = object.log ?? \"\";\n message.events =\n object.events?.map((e) => StringEvent.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseStringEvent(): StringEvent {\n return { type: \"\", attributes: [] };\n}\n\nexport const StringEvent = {\n encode(\n message: StringEvent,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.type !== \"\") {\n writer.uint32(10).string(message.type);\n }\n for (const v of message.attributes) {\n Attribute.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): StringEvent {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseStringEvent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.type = reader.string();\n break;\n case 2:\n message.attributes.push(Attribute.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): StringEvent {\n return {\n type: isSet(object.type) ? String(object.type) : \"\",\n attributes: Array.isArray(object?.attributes)\n ? object.attributes.map((e: any) => Attribute.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: StringEvent): unknown {\n const obj: any = {};\n message.type !== undefined && (obj.type = message.type);\n if (message.attributes) {\n obj.attributes = message.attributes.map((e) =>\n e ? Attribute.toJSON(e) : undefined,\n );\n } else {\n obj.attributes = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): StringEvent {\n const message = createBaseStringEvent();\n message.type = object.type ?? \"\";\n message.attributes =\n object.attributes?.map((e) => Attribute.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseAttribute(): Attribute {\n return { key: \"\", value: \"\" };\n}\n\nexport const Attribute = {\n encode(\n message: Attribute,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== \"\") {\n writer.uint32(18).string(message.value);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Attribute {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseAttribute();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.string();\n break;\n case 2:\n message.value = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Attribute {\n return {\n key: isSet(object.key) ? String(object.key) : \"\",\n value: isSet(object.value) ? String(object.value) : \"\",\n };\n },\n\n toJSON(message: Attribute): unknown {\n const obj: any = {};\n message.key !== undefined && (obj.key = message.key);\n message.value !== undefined && (obj.value = message.value);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Attribute {\n const message = createBaseAttribute();\n message.key = object.key ?? \"\";\n message.value = object.value ?? \"\";\n return message;\n },\n};\n\nfunction createBaseGasInfo(): GasInfo {\n return { gas_wanted: \"0\", gas_used: \"0\" };\n}\n\nexport const GasInfo = {\n encode(\n message: GasInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.gas_wanted !== \"0\") {\n writer.uint32(8).uint64(message.gas_wanted);\n }\n if (message.gas_used !== \"0\") {\n writer.uint32(16).uint64(message.gas_used);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): GasInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGasInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.gas_wanted = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.gas_used = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): GasInfo {\n return {\n gas_wanted: isSet(object.gas_wanted) ? String(object.gas_wanted) : \"0\",\n gas_used: isSet(object.gas_used) ? String(object.gas_used) : \"0\",\n };\n },\n\n toJSON(message: GasInfo): unknown {\n const obj: any = {};\n message.gas_wanted !== undefined && (obj.gas_wanted = message.gas_wanted);\n message.gas_used !== undefined && (obj.gas_used = message.gas_used);\n return obj;\n },\n\n fromPartial, I>>(object: I): GasInfo {\n const message = createBaseGasInfo();\n message.gas_wanted = object.gas_wanted ?? \"0\";\n message.gas_used = object.gas_used ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseResult(): Result {\n return { data: new Uint8Array(), log: \"\", events: [] };\n}\n\nexport const Result = {\n encode(\n message: Result,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.data.length !== 0) {\n writer.uint32(10).bytes(message.data);\n }\n if (message.log !== \"\") {\n writer.uint32(18).string(message.log);\n }\n for (const v of message.events) {\n Event.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Result {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.data = reader.bytes();\n break;\n case 2:\n message.log = reader.string();\n break;\n case 3:\n message.events.push(Event.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Result {\n return {\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n log: isSet(object.log) ? String(object.log) : \"\",\n events: Array.isArray(object?.events)\n ? object.events.map((e: any) => Event.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Result): unknown {\n const obj: any = {};\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n message.log !== undefined && (obj.log = message.log);\n if (message.events) {\n obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined));\n } else {\n obj.events = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Result {\n const message = createBaseResult();\n message.data = object.data ?? new Uint8Array();\n message.log = object.log ?? \"\";\n message.events = object.events?.map((e) => Event.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseSimulationResponse(): SimulationResponse {\n return { gas_info: undefined, result: undefined };\n}\n\nexport const SimulationResponse = {\n encode(\n message: SimulationResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.gas_info !== undefined) {\n GasInfo.encode(message.gas_info, writer.uint32(10).fork()).ldelim();\n }\n if (message.result !== undefined) {\n Result.encode(message.result, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SimulationResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSimulationResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.gas_info = GasInfo.decode(reader, reader.uint32());\n break;\n case 2:\n message.result = Result.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SimulationResponse {\n return {\n gas_info: isSet(object.gas_info)\n ? GasInfo.fromJSON(object.gas_info)\n : undefined,\n result: isSet(object.result) ? Result.fromJSON(object.result) : undefined,\n };\n },\n\n toJSON(message: SimulationResponse): unknown {\n const obj: any = {};\n message.gas_info !== undefined &&\n (obj.gas_info = message.gas_info\n ? GasInfo.toJSON(message.gas_info)\n : undefined);\n message.result !== undefined &&\n (obj.result = message.result ? Result.toJSON(message.result) : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SimulationResponse {\n const message = createBaseSimulationResponse();\n message.gas_info =\n object.gas_info !== undefined && object.gas_info !== null\n ? GasInfo.fromPartial(object.gas_info)\n : undefined;\n message.result =\n object.result !== undefined && object.result !== null\n ? Result.fromPartial(object.result)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgData(): MsgData {\n return { msg_type: \"\", data: new Uint8Array() };\n}\n\nexport const MsgData = {\n encode(\n message: MsgData,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.msg_type !== \"\") {\n writer.uint32(10).string(message.msg_type);\n }\n if (message.data.length !== 0) {\n writer.uint32(18).bytes(message.data);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgData {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgData();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.msg_type = reader.string();\n break;\n case 2:\n message.data = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgData {\n return {\n msg_type: isSet(object.msg_type) ? String(object.msg_type) : \"\",\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MsgData): unknown {\n const obj: any = {};\n message.msg_type !== undefined && (obj.msg_type = message.msg_type);\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): MsgData {\n const message = createBaseMsgData();\n message.msg_type = object.msg_type ?? \"\";\n message.data = object.data ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseTxMsgData(): TxMsgData {\n return { data: [] };\n}\n\nexport const TxMsgData = {\n encode(\n message: TxMsgData,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.data) {\n MsgData.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TxMsgData {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTxMsgData();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.data.push(MsgData.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TxMsgData {\n return {\n data: Array.isArray(object?.data)\n ? object.data.map((e: any) => MsgData.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: TxMsgData): unknown {\n const obj: any = {};\n if (message.data) {\n obj.data = message.data.map((e) => (e ? MsgData.toJSON(e) : undefined));\n } else {\n obj.data = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): TxMsgData {\n const message = createBaseTxMsgData();\n message.data = object.data?.map((e) => MsgData.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseSearchTxsResult(): SearchTxsResult {\n return {\n total_count: \"0\",\n count: \"0\",\n page_number: \"0\",\n page_total: \"0\",\n limit: \"0\",\n txs: [],\n };\n}\n\nexport const SearchTxsResult = {\n encode(\n message: SearchTxsResult,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.total_count !== \"0\") {\n writer.uint32(8).uint64(message.total_count);\n }\n if (message.count !== \"0\") {\n writer.uint32(16).uint64(message.count);\n }\n if (message.page_number !== \"0\") {\n writer.uint32(24).uint64(message.page_number);\n }\n if (message.page_total !== \"0\") {\n writer.uint32(32).uint64(message.page_total);\n }\n if (message.limit !== \"0\") {\n writer.uint32(40).uint64(message.limit);\n }\n for (const v of message.txs) {\n TxResponse.encode(v!, writer.uint32(50).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SearchTxsResult {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSearchTxsResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.total_count = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.count = longToString(reader.uint64() as Long);\n break;\n case 3:\n message.page_number = longToString(reader.uint64() as Long);\n break;\n case 4:\n message.page_total = longToString(reader.uint64() as Long);\n break;\n case 5:\n message.limit = longToString(reader.uint64() as Long);\n break;\n case 6:\n message.txs.push(TxResponse.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SearchTxsResult {\n return {\n total_count: isSet(object.total_count) ? String(object.total_count) : \"0\",\n count: isSet(object.count) ? String(object.count) : \"0\",\n page_number: isSet(object.page_number) ? String(object.page_number) : \"0\",\n page_total: isSet(object.page_total) ? String(object.page_total) : \"0\",\n limit: isSet(object.limit) ? String(object.limit) : \"0\",\n txs: Array.isArray(object?.txs)\n ? object.txs.map((e: any) => TxResponse.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: SearchTxsResult): unknown {\n const obj: any = {};\n message.total_count !== undefined &&\n (obj.total_count = message.total_count);\n message.count !== undefined && (obj.count = message.count);\n message.page_number !== undefined &&\n (obj.page_number = message.page_number);\n message.page_total !== undefined && (obj.page_total = message.page_total);\n message.limit !== undefined && (obj.limit = message.limit);\n if (message.txs) {\n obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined));\n } else {\n obj.txs = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SearchTxsResult {\n const message = createBaseSearchTxsResult();\n message.total_count = object.total_count ?? \"0\";\n message.count = object.count ?? \"0\";\n message.page_number = object.page_number ?? \"0\";\n message.page_total = object.page_total ?? \"0\";\n message.limit = object.limit ?? \"0\";\n message.txs = object.txs?.map((e) => TxResponse.fromPartial(e)) || [];\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"cosmos.base.v1beta1\";\n\n/**\n * Coin defines a token with a denomination and an amount.\n *\n * NOTE: The amount field is an Int which implements the custom method\n * signatures required by gogoproto.\n */\nexport interface Coin {\n denom: string;\n amount: string;\n}\n\n/**\n * DecCoin defines a token with a denomination and a decimal amount.\n *\n * NOTE: The amount field is an Dec which implements the custom method\n * signatures required by gogoproto.\n */\nexport interface DecCoin {\n denom: string;\n amount: string;\n}\n\n/** IntProto defines a Protobuf wrapper around an Int object. */\nexport interface IntProto {\n int: string;\n}\n\n/** DecProto defines a Protobuf wrapper around a Dec object. */\nexport interface DecProto {\n dec: string;\n}\n\nfunction createBaseCoin(): Coin {\n return { denom: \"\", amount: \"\" };\n}\n\nexport const Coin = {\n encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.denom !== \"\") {\n writer.uint32(10).string(message.denom);\n }\n if (message.amount !== \"\") {\n writer.uint32(18).string(message.amount);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Coin {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCoin();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.denom = reader.string();\n break;\n case 2:\n message.amount = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Coin {\n return {\n denom: isSet(object.denom) ? String(object.denom) : \"\",\n amount: isSet(object.amount) ? String(object.amount) : \"\",\n };\n },\n\n toJSON(message: Coin): unknown {\n const obj: any = {};\n message.denom !== undefined && (obj.denom = message.denom);\n message.amount !== undefined && (obj.amount = message.amount);\n return obj;\n },\n\n fromPartial, I>>(object: I): Coin {\n const message = createBaseCoin();\n message.denom = object.denom ?? \"\";\n message.amount = object.amount ?? \"\";\n return message;\n },\n};\n\nfunction createBaseDecCoin(): DecCoin {\n return { denom: \"\", amount: \"\" };\n}\n\nexport const DecCoin = {\n encode(\n message: DecCoin,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.denom !== \"\") {\n writer.uint32(10).string(message.denom);\n }\n if (message.amount !== \"\") {\n writer.uint32(18).string(message.amount);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DecCoin {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDecCoin();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.denom = reader.string();\n break;\n case 2:\n message.amount = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DecCoin {\n return {\n denom: isSet(object.denom) ? String(object.denom) : \"\",\n amount: isSet(object.amount) ? String(object.amount) : \"\",\n };\n },\n\n toJSON(message: DecCoin): unknown {\n const obj: any = {};\n message.denom !== undefined && (obj.denom = message.denom);\n message.amount !== undefined && (obj.amount = message.amount);\n return obj;\n },\n\n fromPartial, I>>(object: I): DecCoin {\n const message = createBaseDecCoin();\n message.denom = object.denom ?? \"\";\n message.amount = object.amount ?? \"\";\n return message;\n },\n};\n\nfunction createBaseIntProto(): IntProto {\n return { int: \"\" };\n}\n\nexport const IntProto = {\n encode(\n message: IntProto,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.int !== \"\") {\n writer.uint32(10).string(message.int);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): IntProto {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseIntProto();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.int = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): IntProto {\n return {\n int: isSet(object.int) ? String(object.int) : \"\",\n };\n },\n\n toJSON(message: IntProto): unknown {\n const obj: any = {};\n message.int !== undefined && (obj.int = message.int);\n return obj;\n },\n\n fromPartial, I>>(object: I): IntProto {\n const message = createBaseIntProto();\n message.int = object.int ?? \"\";\n return message;\n },\n};\n\nfunction createBaseDecProto(): DecProto {\n return { dec: \"\" };\n}\n\nexport const DecProto = {\n encode(\n message: DecProto,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.dec !== \"\") {\n writer.uint32(10).string(message.dec);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DecProto {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDecProto();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.dec = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DecProto {\n return {\n dec: isSet(object.dec) ? String(object.dec) : \"\",\n };\n },\n\n toJSON(message: DecProto): unknown {\n const obj: any = {};\n message.dec !== undefined && (obj.dec = message.dec);\n return obj;\n },\n\n fromPartial, I>>(object: I): DecProto {\n const message = createBaseDecProto();\n message.dec = object.dec ?? \"\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"cosmos.crisis.v1beta1\";\n\n/** MsgVerifyInvariant represents a message to verify a particular invariance. */\nexport interface MsgVerifyInvariant {\n sender: string;\n invariant_module_name: string;\n invariant_route: string;\n}\n\n/** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */\nexport interface MsgVerifyInvariantResponse {}\n\nfunction createBaseMsgVerifyInvariant(): MsgVerifyInvariant {\n return { sender: \"\", invariant_module_name: \"\", invariant_route: \"\" };\n}\n\nexport const MsgVerifyInvariant = {\n encode(\n message: MsgVerifyInvariant,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender !== \"\") {\n writer.uint32(10).string(message.sender);\n }\n if (message.invariant_module_name !== \"\") {\n writer.uint32(18).string(message.invariant_module_name);\n }\n if (message.invariant_route !== \"\") {\n writer.uint32(26).string(message.invariant_route);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgVerifyInvariant {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgVerifyInvariant();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.string();\n break;\n case 2:\n message.invariant_module_name = reader.string();\n break;\n case 3:\n message.invariant_route = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgVerifyInvariant {\n return {\n sender: isSet(object.sender) ? String(object.sender) : \"\",\n invariant_module_name: isSet(object.invariant_module_name)\n ? String(object.invariant_module_name)\n : \"\",\n invariant_route: isSet(object.invariant_route)\n ? String(object.invariant_route)\n : \"\",\n };\n },\n\n toJSON(message: MsgVerifyInvariant): unknown {\n const obj: any = {};\n message.sender !== undefined && (obj.sender = message.sender);\n message.invariant_module_name !== undefined &&\n (obj.invariant_module_name = message.invariant_module_name);\n message.invariant_route !== undefined &&\n (obj.invariant_route = message.invariant_route);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgVerifyInvariant {\n const message = createBaseMsgVerifyInvariant();\n message.sender = object.sender ?? \"\";\n message.invariant_module_name = object.invariant_module_name ?? \"\";\n message.invariant_route = object.invariant_route ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgVerifyInvariantResponse(): MsgVerifyInvariantResponse {\n return {};\n}\n\nexport const MsgVerifyInvariantResponse = {\n encode(\n _: MsgVerifyInvariantResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgVerifyInvariantResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgVerifyInvariantResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgVerifyInvariantResponse {\n return {};\n },\n\n toJSON(_: MsgVerifyInvariantResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgVerifyInvariantResponse {\n const message = createBaseMsgVerifyInvariantResponse();\n return message;\n },\n};\n\n/** Msg defines the bank Msg service. */\nexport interface Msg {\n /** VerifyInvariant defines a method to verify a particular invariance. */\n VerifyInvariant(\n request: MsgVerifyInvariant,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.VerifyInvariant = this.VerifyInvariant.bind(this);\n }\n VerifyInvariant(\n request: MsgVerifyInvariant,\n ): Promise {\n const data = MsgVerifyInvariant.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.crisis.v1beta1.Msg\",\n \"VerifyInvariant\",\n data,\n );\n return promise.then((data) =>\n MsgVerifyInvariantResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"cosmos.crypto.ed25519\";\n\n/**\n * PubKey is an ed25519 public key for handling Tendermint keys in SDK.\n * It's needed for Any serialization and SDK compatibility.\n * It must not be used in a non Tendermint key context because it doesn't implement\n * ADR-28. Nevertheless, you will like to use ed25519 in app user level\n * then you must create a new proto message and follow ADR-28 for Address construction.\n */\nexport interface PubKey {\n key: Uint8Array;\n}\n\n/**\n * Deprecated: PrivKey defines a ed25519 private key.\n * NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context.\n */\nexport interface PrivKey {\n key: Uint8Array;\n}\n\nfunction createBasePubKey(): PubKey {\n return { key: new Uint8Array() };\n}\n\nexport const PubKey = {\n encode(\n message: PubKey,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PubKey {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePubKey();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PubKey {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n };\n },\n\n toJSON(message: PubKey): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): PubKey {\n const message = createBasePubKey();\n message.key = object.key ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBasePrivKey(): PrivKey {\n return { key: new Uint8Array() };\n}\n\nexport const PrivKey = {\n encode(\n message: PrivKey,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PrivKey {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePrivKey();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PrivKey {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n };\n },\n\n toJSON(message: PrivKey): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): PrivKey {\n const message = createBasePrivKey();\n message.key = object.key ?? new Uint8Array();\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../google/protobuf/any\";\n\nexport const protobufPackage = \"cosmos.crypto.multisig\";\n\n/**\n * LegacyAminoPubKey specifies a public key type\n * which nests multiple public keys and a threshold,\n * it uses legacy amino address rules.\n */\nexport interface LegacyAminoPubKey {\n threshold: number;\n public_keys: Any[];\n}\n\nfunction createBaseLegacyAminoPubKey(): LegacyAminoPubKey {\n return { threshold: 0, public_keys: [] };\n}\n\nexport const LegacyAminoPubKey = {\n encode(\n message: LegacyAminoPubKey,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.threshold !== 0) {\n writer.uint32(8).uint32(message.threshold);\n }\n for (const v of message.public_keys) {\n Any.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): LegacyAminoPubKey {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseLegacyAminoPubKey();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.threshold = reader.uint32();\n break;\n case 2:\n message.public_keys.push(Any.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): LegacyAminoPubKey {\n return {\n threshold: isSet(object.threshold) ? Number(object.threshold) : 0,\n public_keys: Array.isArray(object?.public_keys)\n ? object.public_keys.map((e: any) => Any.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: LegacyAminoPubKey): unknown {\n const obj: any = {};\n message.threshold !== undefined &&\n (obj.threshold = Math.round(message.threshold));\n if (message.public_keys) {\n obj.public_keys = message.public_keys.map((e) =>\n e ? Any.toJSON(e) : undefined,\n );\n } else {\n obj.public_keys = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): LegacyAminoPubKey {\n const message = createBaseLegacyAminoPubKey();\n message.threshold = object.threshold ?? 0;\n message.public_keys =\n object.public_keys?.map((e) => Any.fromPartial(e)) || [];\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"cosmos.crypto.multisig.v1beta1\";\n\n/**\n * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.\n * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers\n * signed and with which modes.\n */\nexport interface MultiSignature {\n signatures: Uint8Array[];\n}\n\n/**\n * CompactBitArray is an implementation of a space efficient bit array.\n * This is used to ensure that the encoded data takes up a minimal amount of\n * space after proto encoding.\n * This is not thread safe, and is not intended for concurrent usage.\n */\nexport interface CompactBitArray {\n extra_bits_stored: number;\n elems: Uint8Array;\n}\n\nfunction createBaseMultiSignature(): MultiSignature {\n return { signatures: [] };\n}\n\nexport const MultiSignature = {\n encode(\n message: MultiSignature,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.signatures) {\n writer.uint32(10).bytes(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MultiSignature {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMultiSignature();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.signatures.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MultiSignature {\n return {\n signatures: Array.isArray(object?.signatures)\n ? object.signatures.map((e: any) => bytesFromBase64(e))\n : [],\n };\n },\n\n toJSON(message: MultiSignature): unknown {\n const obj: any = {};\n if (message.signatures) {\n obj.signatures = message.signatures.map((e) =>\n base64FromBytes(e !== undefined ? e : new Uint8Array()),\n );\n } else {\n obj.signatures = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MultiSignature {\n const message = createBaseMultiSignature();\n message.signatures = object.signatures?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseCompactBitArray(): CompactBitArray {\n return { extra_bits_stored: 0, elems: new Uint8Array() };\n}\n\nexport const CompactBitArray = {\n encode(\n message: CompactBitArray,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.extra_bits_stored !== 0) {\n writer.uint32(8).uint32(message.extra_bits_stored);\n }\n if (message.elems.length !== 0) {\n writer.uint32(18).bytes(message.elems);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): CompactBitArray {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompactBitArray();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.extra_bits_stored = reader.uint32();\n break;\n case 2:\n message.elems = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CompactBitArray {\n return {\n extra_bits_stored: isSet(object.extra_bits_stored)\n ? Number(object.extra_bits_stored)\n : 0,\n elems: isSet(object.elems)\n ? bytesFromBase64(object.elems)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: CompactBitArray): unknown {\n const obj: any = {};\n message.extra_bits_stored !== undefined &&\n (obj.extra_bits_stored = Math.round(message.extra_bits_stored));\n message.elems !== undefined &&\n (obj.elems = base64FromBytes(\n message.elems !== undefined ? message.elems : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CompactBitArray {\n const message = createBaseCompactBitArray();\n message.extra_bits_stored = object.extra_bits_stored ?? 0;\n message.elems = object.elems ?? new Uint8Array();\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"cosmos.crypto.secp256k1\";\n\n/**\n * PubKey defines a secp256k1 public key\n * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte\n * if the y-coordinate is the lexicographically largest of the two associated with\n * the x-coordinate. Otherwise the first byte is a 0x03.\n * This prefix is followed with the x-coordinate.\n */\nexport interface PubKey {\n key: Uint8Array;\n}\n\n/** PrivKey defines a secp256k1 private key. */\nexport interface PrivKey {\n key: Uint8Array;\n}\n\nfunction createBasePubKey(): PubKey {\n return { key: new Uint8Array() };\n}\n\nexport const PubKey = {\n encode(\n message: PubKey,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PubKey {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePubKey();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PubKey {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n };\n },\n\n toJSON(message: PubKey): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): PubKey {\n const message = createBasePubKey();\n message.key = object.key ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBasePrivKey(): PrivKey {\n return { key: new Uint8Array() };\n}\n\nexport const PrivKey = {\n encode(\n message: PrivKey,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PrivKey {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePrivKey();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PrivKey {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n };\n },\n\n toJSON(message: PrivKey): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): PrivKey {\n const message = createBasePrivKey();\n message.key = object.key ?? new Uint8Array();\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { DecCoin, Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.distribution.v1beta1\";\n\n/** Params defines the set of params for the distribution module. */\nexport interface Params {\n community_tax: string;\n base_proposer_reward: string;\n bonus_proposer_reward: string;\n withdraw_addr_enabled: boolean;\n secret_foundation_tax: string;\n secret_foundation_address: string;\n minimum_restake_threshold: string;\n restake_period: string;\n}\n\n/**\n * ValidatorHistoricalRewards represents historical rewards for a validator.\n * Height is implicit within the store key.\n * Cumulative reward ratio is the sum from the zeroeth period\n * until this period of rewards / tokens, per the spec.\n * The reference count indicates the number of objects\n * which might need to reference this historical entry at any point.\n * ReferenceCount =\n * number of outstanding delegations which ended the associated period (and\n * might need to read that record)\n * + number of slashes which ended the associated period (and might need to\n * read that record)\n * + one per validator for the zeroeth period, set on initialization\n */\nexport interface ValidatorHistoricalRewards {\n cumulative_reward_ratio: DecCoin[];\n reference_count: number;\n}\n\n/**\n * ValidatorCurrentRewards represents current rewards and current\n * period for a validator kept as a running counter and incremented\n * each block as long as the validator's tokens remain constant.\n */\nexport interface ValidatorCurrentRewards {\n rewards: DecCoin[];\n period: string;\n}\n\n/**\n * ValidatorAccumulatedCommission represents accumulated commission\n * for a validator kept as a running counter, can be withdrawn at any time.\n */\nexport interface ValidatorAccumulatedCommission {\n commission: DecCoin[];\n}\n\n/**\n * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards\n * for a validator inexpensive to track, allows simple sanity checks.\n */\nexport interface ValidatorOutstandingRewards {\n rewards: DecCoin[];\n}\n\n/**\n * ValidatorSlashEvent represents a validator slash event.\n * Height is implicit within the store key.\n * This is needed to calculate appropriate amount of staking tokens\n * for delegations which are withdrawn after a slash has occurred.\n */\nexport interface ValidatorSlashEvent {\n validator_period: string;\n fraction: string;\n}\n\n/** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */\nexport interface ValidatorSlashEvents {\n validator_slash_events: ValidatorSlashEvent[];\n}\n\n/** FeePool is the global fee pool for distribution. */\nexport interface FeePool {\n community_pool: DecCoin[];\n}\n\n/**\n * CommunityPoolSpendProposal details a proposal for use of community funds,\n * together with how many coins are proposed to be spent, and to which\n * recipient account.\n */\nexport interface CommunityPoolSpendProposal {\n title: string;\n description: string;\n recipient: string;\n amount: Coin[];\n}\n\n/**\n * DelegatorStartingInfo represents the starting info for a delegator reward\n * period. It tracks the previous validator period, the delegation's amount of\n * staking token, and the creation height (to check later on if any slashes have\n * occurred). NOTE: Even though validators are slashed to whole staking tokens,\n * the delegators within the validator may be left with less than a full token,\n * thus sdk.Dec is used.\n */\nexport interface DelegatorStartingInfo {\n previous_period: string;\n stake: string;\n height: string;\n}\n\n/**\n * DelegationDelegatorReward represents the properties\n * of a delegator's delegation reward.\n */\nexport interface DelegationDelegatorReward {\n validator_address: string;\n reward: DecCoin[];\n}\n\n/**\n * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal\n * with a deposit\n */\nexport interface CommunityPoolSpendProposalWithDeposit {\n title: string;\n description: string;\n recipient: string;\n amount: string;\n deposit: string;\n}\n\nfunction createBaseParams(): Params {\n return {\n community_tax: \"\",\n base_proposer_reward: \"\",\n bonus_proposer_reward: \"\",\n withdraw_addr_enabled: false,\n secret_foundation_tax: \"\",\n secret_foundation_address: \"\",\n minimum_restake_threshold: \"\",\n restake_period: \"\",\n };\n}\n\nexport const Params = {\n encode(\n message: Params,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.community_tax !== \"\") {\n writer.uint32(10).string(message.community_tax);\n }\n if (message.base_proposer_reward !== \"\") {\n writer.uint32(18).string(message.base_proposer_reward);\n }\n if (message.bonus_proposer_reward !== \"\") {\n writer.uint32(26).string(message.bonus_proposer_reward);\n }\n if (message.withdraw_addr_enabled === true) {\n writer.uint32(32).bool(message.withdraw_addr_enabled);\n }\n if (message.secret_foundation_tax !== \"\") {\n writer.uint32(42).string(message.secret_foundation_tax);\n }\n if (message.secret_foundation_address !== \"\") {\n writer.uint32(50).string(message.secret_foundation_address);\n }\n if (message.minimum_restake_threshold !== \"\") {\n writer.uint32(58).string(message.minimum_restake_threshold);\n }\n if (message.restake_period !== \"\") {\n writer.uint32(66).string(message.restake_period);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Params {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.community_tax = reader.string();\n break;\n case 2:\n message.base_proposer_reward = reader.string();\n break;\n case 3:\n message.bonus_proposer_reward = reader.string();\n break;\n case 4:\n message.withdraw_addr_enabled = reader.bool();\n break;\n case 5:\n message.secret_foundation_tax = reader.string();\n break;\n case 6:\n message.secret_foundation_address = reader.string();\n break;\n case 7:\n message.minimum_restake_threshold = reader.string();\n break;\n case 8:\n message.restake_period = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Params {\n return {\n community_tax: isSet(object.community_tax)\n ? String(object.community_tax)\n : \"\",\n base_proposer_reward: isSet(object.base_proposer_reward)\n ? String(object.base_proposer_reward)\n : \"\",\n bonus_proposer_reward: isSet(object.bonus_proposer_reward)\n ? String(object.bonus_proposer_reward)\n : \"\",\n withdraw_addr_enabled: isSet(object.withdraw_addr_enabled)\n ? Boolean(object.withdraw_addr_enabled)\n : false,\n secret_foundation_tax: isSet(object.secret_foundation_tax)\n ? String(object.secret_foundation_tax)\n : \"\",\n secret_foundation_address: isSet(object.secret_foundation_address)\n ? String(object.secret_foundation_address)\n : \"\",\n minimum_restake_threshold: isSet(object.minimum_restake_threshold)\n ? String(object.minimum_restake_threshold)\n : \"\",\n restake_period: isSet(object.restake_period)\n ? String(object.restake_period)\n : \"\",\n };\n },\n\n toJSON(message: Params): unknown {\n const obj: any = {};\n message.community_tax !== undefined &&\n (obj.community_tax = message.community_tax);\n message.base_proposer_reward !== undefined &&\n (obj.base_proposer_reward = message.base_proposer_reward);\n message.bonus_proposer_reward !== undefined &&\n (obj.bonus_proposer_reward = message.bonus_proposer_reward);\n message.withdraw_addr_enabled !== undefined &&\n (obj.withdraw_addr_enabled = message.withdraw_addr_enabled);\n message.secret_foundation_tax !== undefined &&\n (obj.secret_foundation_tax = message.secret_foundation_tax);\n message.secret_foundation_address !== undefined &&\n (obj.secret_foundation_address = message.secret_foundation_address);\n message.minimum_restake_threshold !== undefined &&\n (obj.minimum_restake_threshold = message.minimum_restake_threshold);\n message.restake_period !== undefined &&\n (obj.restake_period = message.restake_period);\n return obj;\n },\n\n fromPartial, I>>(object: I): Params {\n const message = createBaseParams();\n message.community_tax = object.community_tax ?? \"\";\n message.base_proposer_reward = object.base_proposer_reward ?? \"\";\n message.bonus_proposer_reward = object.bonus_proposer_reward ?? \"\";\n message.withdraw_addr_enabled = object.withdraw_addr_enabled ?? false;\n message.secret_foundation_tax = object.secret_foundation_tax ?? \"\";\n message.secret_foundation_address = object.secret_foundation_address ?? \"\";\n message.minimum_restake_threshold = object.minimum_restake_threshold ?? \"\";\n message.restake_period = object.restake_period ?? \"\";\n return message;\n },\n};\n\nfunction createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards {\n return { cumulative_reward_ratio: [], reference_count: 0 };\n}\n\nexport const ValidatorHistoricalRewards = {\n encode(\n message: ValidatorHistoricalRewards,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.cumulative_reward_ratio) {\n DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.reference_count !== 0) {\n writer.uint32(16).uint32(message.reference_count);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ValidatorHistoricalRewards {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorHistoricalRewards();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.cumulative_reward_ratio.push(\n DecCoin.decode(reader, reader.uint32()),\n );\n break;\n case 2:\n message.reference_count = reader.uint32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorHistoricalRewards {\n return {\n cumulative_reward_ratio: Array.isArray(object?.cumulative_reward_ratio)\n ? object.cumulative_reward_ratio.map((e: any) => DecCoin.fromJSON(e))\n : [],\n reference_count: isSet(object.reference_count)\n ? Number(object.reference_count)\n : 0,\n };\n },\n\n toJSON(message: ValidatorHistoricalRewards): unknown {\n const obj: any = {};\n if (message.cumulative_reward_ratio) {\n obj.cumulative_reward_ratio = message.cumulative_reward_ratio.map((e) =>\n e ? DecCoin.toJSON(e) : undefined,\n );\n } else {\n obj.cumulative_reward_ratio = [];\n }\n message.reference_count !== undefined &&\n (obj.reference_count = Math.round(message.reference_count));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorHistoricalRewards {\n const message = createBaseValidatorHistoricalRewards();\n message.cumulative_reward_ratio =\n object.cumulative_reward_ratio?.map((e) => DecCoin.fromPartial(e)) || [];\n message.reference_count = object.reference_count ?? 0;\n return message;\n },\n};\n\nfunction createBaseValidatorCurrentRewards(): ValidatorCurrentRewards {\n return { rewards: [], period: \"0\" };\n}\n\nexport const ValidatorCurrentRewards = {\n encode(\n message: ValidatorCurrentRewards,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.rewards) {\n DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.period !== \"0\") {\n writer.uint32(16).uint64(message.period);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ValidatorCurrentRewards {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorCurrentRewards();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.rewards.push(DecCoin.decode(reader, reader.uint32()));\n break;\n case 2:\n message.period = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorCurrentRewards {\n return {\n rewards: Array.isArray(object?.rewards)\n ? object.rewards.map((e: any) => DecCoin.fromJSON(e))\n : [],\n period: isSet(object.period) ? String(object.period) : \"0\",\n };\n },\n\n toJSON(message: ValidatorCurrentRewards): unknown {\n const obj: any = {};\n if (message.rewards) {\n obj.rewards = message.rewards.map((e) =>\n e ? DecCoin.toJSON(e) : undefined,\n );\n } else {\n obj.rewards = [];\n }\n message.period !== undefined && (obj.period = message.period);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorCurrentRewards {\n const message = createBaseValidatorCurrentRewards();\n message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || [];\n message.period = object.period ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommission {\n return { commission: [] };\n}\n\nexport const ValidatorAccumulatedCommission = {\n encode(\n message: ValidatorAccumulatedCommission,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.commission) {\n DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ValidatorAccumulatedCommission {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorAccumulatedCommission();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.commission.push(DecCoin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorAccumulatedCommission {\n return {\n commission: Array.isArray(object?.commission)\n ? object.commission.map((e: any) => DecCoin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ValidatorAccumulatedCommission): unknown {\n const obj: any = {};\n if (message.commission) {\n obj.commission = message.commission.map((e) =>\n e ? DecCoin.toJSON(e) : undefined,\n );\n } else {\n obj.commission = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorAccumulatedCommission {\n const message = createBaseValidatorAccumulatedCommission();\n message.commission =\n object.commission?.map((e) => DecCoin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards {\n return { rewards: [] };\n}\n\nexport const ValidatorOutstandingRewards = {\n encode(\n message: ValidatorOutstandingRewards,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.rewards) {\n DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ValidatorOutstandingRewards {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorOutstandingRewards();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.rewards.push(DecCoin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorOutstandingRewards {\n return {\n rewards: Array.isArray(object?.rewards)\n ? object.rewards.map((e: any) => DecCoin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ValidatorOutstandingRewards): unknown {\n const obj: any = {};\n if (message.rewards) {\n obj.rewards = message.rewards.map((e) =>\n e ? DecCoin.toJSON(e) : undefined,\n );\n } else {\n obj.rewards = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorOutstandingRewards {\n const message = createBaseValidatorOutstandingRewards();\n message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseValidatorSlashEvent(): ValidatorSlashEvent {\n return { validator_period: \"0\", fraction: \"\" };\n}\n\nexport const ValidatorSlashEvent = {\n encode(\n message: ValidatorSlashEvent,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.validator_period !== \"0\") {\n writer.uint32(8).uint64(message.validator_period);\n }\n if (message.fraction !== \"\") {\n writer.uint32(18).string(message.fraction);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorSlashEvent {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorSlashEvent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.validator_period = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.fraction = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorSlashEvent {\n return {\n validator_period: isSet(object.validator_period)\n ? String(object.validator_period)\n : \"0\",\n fraction: isSet(object.fraction) ? String(object.fraction) : \"\",\n };\n },\n\n toJSON(message: ValidatorSlashEvent): unknown {\n const obj: any = {};\n message.validator_period !== undefined &&\n (obj.validator_period = message.validator_period);\n message.fraction !== undefined && (obj.fraction = message.fraction);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorSlashEvent {\n const message = createBaseValidatorSlashEvent();\n message.validator_period = object.validator_period ?? \"0\";\n message.fraction = object.fraction ?? \"\";\n return message;\n },\n};\n\nfunction createBaseValidatorSlashEvents(): ValidatorSlashEvents {\n return { validator_slash_events: [] };\n}\n\nexport const ValidatorSlashEvents = {\n encode(\n message: ValidatorSlashEvents,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.validator_slash_events) {\n ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ValidatorSlashEvents {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorSlashEvents();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.validator_slash_events.push(\n ValidatorSlashEvent.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorSlashEvents {\n return {\n validator_slash_events: Array.isArray(object?.validator_slash_events)\n ? object.validator_slash_events.map((e: any) =>\n ValidatorSlashEvent.fromJSON(e),\n )\n : [],\n };\n },\n\n toJSON(message: ValidatorSlashEvents): unknown {\n const obj: any = {};\n if (message.validator_slash_events) {\n obj.validator_slash_events = message.validator_slash_events.map((e) =>\n e ? ValidatorSlashEvent.toJSON(e) : undefined,\n );\n } else {\n obj.validator_slash_events = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorSlashEvents {\n const message = createBaseValidatorSlashEvents();\n message.validator_slash_events =\n object.validator_slash_events?.map((e) =>\n ValidatorSlashEvent.fromPartial(e),\n ) || [];\n return message;\n },\n};\n\nfunction createBaseFeePool(): FeePool {\n return { community_pool: [] };\n}\n\nexport const FeePool = {\n encode(\n message: FeePool,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.community_pool) {\n DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): FeePool {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseFeePool();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.community_pool.push(DecCoin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): FeePool {\n return {\n community_pool: Array.isArray(object?.community_pool)\n ? object.community_pool.map((e: any) => DecCoin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: FeePool): unknown {\n const obj: any = {};\n if (message.community_pool) {\n obj.community_pool = message.community_pool.map((e) =>\n e ? DecCoin.toJSON(e) : undefined,\n );\n } else {\n obj.community_pool = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): FeePool {\n const message = createBaseFeePool();\n message.community_pool =\n object.community_pool?.map((e) => DecCoin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal {\n return { title: \"\", description: \"\", recipient: \"\", amount: [] };\n}\n\nexport const CommunityPoolSpendProposal = {\n encode(\n message: CommunityPoolSpendProposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.title !== \"\") {\n writer.uint32(10).string(message.title);\n }\n if (message.description !== \"\") {\n writer.uint32(18).string(message.description);\n }\n if (message.recipient !== \"\") {\n writer.uint32(26).string(message.recipient);\n }\n for (const v of message.amount) {\n Coin.encode(v!, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): CommunityPoolSpendProposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCommunityPoolSpendProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.title = reader.string();\n break;\n case 2:\n message.description = reader.string();\n break;\n case 3:\n message.recipient = reader.string();\n break;\n case 4:\n message.amount.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CommunityPoolSpendProposal {\n return {\n title: isSet(object.title) ? String(object.title) : \"\",\n description: isSet(object.description) ? String(object.description) : \"\",\n recipient: isSet(object.recipient) ? String(object.recipient) : \"\",\n amount: Array.isArray(object?.amount)\n ? object.amount.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: CommunityPoolSpendProposal): unknown {\n const obj: any = {};\n message.title !== undefined && (obj.title = message.title);\n message.description !== undefined &&\n (obj.description = message.description);\n message.recipient !== undefined && (obj.recipient = message.recipient);\n if (message.amount) {\n obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.amount = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CommunityPoolSpendProposal {\n const message = createBaseCommunityPoolSpendProposal();\n message.title = object.title ?? \"\";\n message.description = object.description ?? \"\";\n message.recipient = object.recipient ?? \"\";\n message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseDelegatorStartingInfo(): DelegatorStartingInfo {\n return { previous_period: \"0\", stake: \"\", height: \"0\" };\n}\n\nexport const DelegatorStartingInfo = {\n encode(\n message: DelegatorStartingInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.previous_period !== \"0\") {\n writer.uint32(8).uint64(message.previous_period);\n }\n if (message.stake !== \"\") {\n writer.uint32(18).string(message.stake);\n }\n if (message.height !== \"0\") {\n writer.uint32(24).uint64(message.height);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): DelegatorStartingInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDelegatorStartingInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.previous_period = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.stake = reader.string();\n break;\n case 3:\n message.height = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DelegatorStartingInfo {\n return {\n previous_period: isSet(object.previous_period)\n ? String(object.previous_period)\n : \"0\",\n stake: isSet(object.stake) ? String(object.stake) : \"\",\n height: isSet(object.height) ? String(object.height) : \"0\",\n };\n },\n\n toJSON(message: DelegatorStartingInfo): unknown {\n const obj: any = {};\n message.previous_period !== undefined &&\n (obj.previous_period = message.previous_period);\n message.stake !== undefined && (obj.stake = message.stake);\n message.height !== undefined && (obj.height = message.height);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): DelegatorStartingInfo {\n const message = createBaseDelegatorStartingInfo();\n message.previous_period = object.previous_period ?? \"0\";\n message.stake = object.stake ?? \"\";\n message.height = object.height ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseDelegationDelegatorReward(): DelegationDelegatorReward {\n return { validator_address: \"\", reward: [] };\n}\n\nexport const DelegationDelegatorReward = {\n encode(\n message: DelegationDelegatorReward,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.validator_address !== \"\") {\n writer.uint32(10).string(message.validator_address);\n }\n for (const v of message.reward) {\n DecCoin.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): DelegationDelegatorReward {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDelegationDelegatorReward();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.validator_address = reader.string();\n break;\n case 2:\n message.reward.push(DecCoin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DelegationDelegatorReward {\n return {\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n reward: Array.isArray(object?.reward)\n ? object.reward.map((e: any) => DecCoin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: DelegationDelegatorReward): unknown {\n const obj: any = {};\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n if (message.reward) {\n obj.reward = message.reward.map((e) =>\n e ? DecCoin.toJSON(e) : undefined,\n );\n } else {\n obj.reward = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): DelegationDelegatorReward {\n const message = createBaseDelegationDelegatorReward();\n message.validator_address = object.validator_address ?? \"\";\n message.reward = object.reward?.map((e) => DecCoin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit {\n return { title: \"\", description: \"\", recipient: \"\", amount: \"\", deposit: \"\" };\n}\n\nexport const CommunityPoolSpendProposalWithDeposit = {\n encode(\n message: CommunityPoolSpendProposalWithDeposit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.title !== \"\") {\n writer.uint32(10).string(message.title);\n }\n if (message.description !== \"\") {\n writer.uint32(18).string(message.description);\n }\n if (message.recipient !== \"\") {\n writer.uint32(26).string(message.recipient);\n }\n if (message.amount !== \"\") {\n writer.uint32(34).string(message.amount);\n }\n if (message.deposit !== \"\") {\n writer.uint32(42).string(message.deposit);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): CommunityPoolSpendProposalWithDeposit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCommunityPoolSpendProposalWithDeposit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.title = reader.string();\n break;\n case 2:\n message.description = reader.string();\n break;\n case 3:\n message.recipient = reader.string();\n break;\n case 4:\n message.amount = reader.string();\n break;\n case 5:\n message.deposit = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CommunityPoolSpendProposalWithDeposit {\n return {\n title: isSet(object.title) ? String(object.title) : \"\",\n description: isSet(object.description) ? String(object.description) : \"\",\n recipient: isSet(object.recipient) ? String(object.recipient) : \"\",\n amount: isSet(object.amount) ? String(object.amount) : \"\",\n deposit: isSet(object.deposit) ? String(object.deposit) : \"\",\n };\n },\n\n toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown {\n const obj: any = {};\n message.title !== undefined && (obj.title = message.title);\n message.description !== undefined &&\n (obj.description = message.description);\n message.recipient !== undefined && (obj.recipient = message.recipient);\n message.amount !== undefined && (obj.amount = message.amount);\n message.deposit !== undefined && (obj.deposit = message.deposit);\n return obj;\n },\n\n fromPartial<\n I extends Exact, I>,\n >(object: I): CommunityPoolSpendProposalWithDeposit {\n const message = createBaseCommunityPoolSpendProposalWithDeposit();\n message.title = object.title ?? \"\";\n message.description = object.description ?? \"\";\n message.recipient = object.recipient ?? \"\";\n message.amount = object.amount ?? \"\";\n message.deposit = object.deposit ?? \"\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.distribution.v1beta1\";\n\n/**\n * MsgSetWithdrawAddress sets the withdraw address for\n * a delegator (or validator self-delegation).\n */\nexport interface MsgSetWithdrawAddress {\n delegator_address: string;\n withdraw_address: string;\n}\n\n/**\n * MsgEnableAutoRestake enables auto-restaking for a\n * a delegator-validator pair.\n */\nexport interface MsgSetAutoRestake {\n delegator_address: string;\n validator_address: string;\n enabled: boolean;\n}\n\n/** MsgAutoRestakeResponse defines the Msg/AutoRestakeResponse response type. */\nexport interface MsgSetAutoRestakeResponse {}\n\n/** MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. */\nexport interface MsgSetWithdrawAddressResponse {}\n\n/**\n * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator\n * from a single validator.\n */\nexport interface MsgWithdrawDelegatorReward {\n delegator_address: string;\n validator_address: string;\n}\n\n/** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */\nexport interface MsgWithdrawDelegatorRewardResponse {}\n\n/**\n * MsgWithdrawValidatorCommission withdraws the full commission to the validator\n * address.\n */\nexport interface MsgWithdrawValidatorCommission {\n validator_address: string;\n}\n\n/** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */\nexport interface MsgWithdrawValidatorCommissionResponse {}\n\n/**\n * MsgFundCommunityPool allows an account to directly\n * fund the community pool.\n */\nexport interface MsgFundCommunityPool {\n amount: Coin[];\n depositor: string;\n}\n\n/** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */\nexport interface MsgFundCommunityPoolResponse {}\n\nfunction createBaseMsgSetWithdrawAddress(): MsgSetWithdrawAddress {\n return { delegator_address: \"\", withdraw_address: \"\" };\n}\n\nexport const MsgSetWithdrawAddress = {\n encode(\n message: MsgSetWithdrawAddress,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.withdraw_address !== \"\") {\n writer.uint32(18).string(message.withdraw_address);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgSetWithdrawAddress {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSetWithdrawAddress();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.withdraw_address = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgSetWithdrawAddress {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n withdraw_address: isSet(object.withdraw_address)\n ? String(object.withdraw_address)\n : \"\",\n };\n },\n\n toJSON(message: MsgSetWithdrawAddress): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.withdraw_address !== undefined &&\n (obj.withdraw_address = message.withdraw_address);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgSetWithdrawAddress {\n const message = createBaseMsgSetWithdrawAddress();\n message.delegator_address = object.delegator_address ?? \"\";\n message.withdraw_address = object.withdraw_address ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgSetAutoRestake(): MsgSetAutoRestake {\n return { delegator_address: \"\", validator_address: \"\", enabled: false };\n}\n\nexport const MsgSetAutoRestake = {\n encode(\n message: MsgSetAutoRestake,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_address !== \"\") {\n writer.uint32(18).string(message.validator_address);\n }\n if (message.enabled === true) {\n writer.uint32(24).bool(message.enabled);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgSetAutoRestake {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSetAutoRestake();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_address = reader.string();\n break;\n case 3:\n message.enabled = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgSetAutoRestake {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,\n };\n },\n\n toJSON(message: MsgSetAutoRestake): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n message.enabled !== undefined && (obj.enabled = message.enabled);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgSetAutoRestake {\n const message = createBaseMsgSetAutoRestake();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_address = object.validator_address ?? \"\";\n message.enabled = object.enabled ?? false;\n return message;\n },\n};\n\nfunction createBaseMsgSetAutoRestakeResponse(): MsgSetAutoRestakeResponse {\n return {};\n}\n\nexport const MsgSetAutoRestakeResponse = {\n encode(\n _: MsgSetAutoRestakeResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgSetAutoRestakeResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSetAutoRestakeResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgSetAutoRestakeResponse {\n return {};\n },\n\n toJSON(_: MsgSetAutoRestakeResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgSetAutoRestakeResponse {\n const message = createBaseMsgSetAutoRestakeResponse();\n return message;\n },\n};\n\nfunction createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressResponse {\n return {};\n}\n\nexport const MsgSetWithdrawAddressResponse = {\n encode(\n _: MsgSetWithdrawAddressResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgSetWithdrawAddressResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSetWithdrawAddressResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgSetWithdrawAddressResponse {\n return {};\n },\n\n toJSON(_: MsgSetWithdrawAddressResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgSetWithdrawAddressResponse {\n const message = createBaseMsgSetWithdrawAddressResponse();\n return message;\n },\n};\n\nfunction createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward {\n return { delegator_address: \"\", validator_address: \"\" };\n}\n\nexport const MsgWithdrawDelegatorReward = {\n encode(\n message: MsgWithdrawDelegatorReward,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_address !== \"\") {\n writer.uint32(18).string(message.validator_address);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgWithdrawDelegatorReward {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgWithdrawDelegatorReward();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_address = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgWithdrawDelegatorReward {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n };\n },\n\n toJSON(message: MsgWithdrawDelegatorReward): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgWithdrawDelegatorReward {\n const message = createBaseMsgWithdrawDelegatorReward();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_address = object.validator_address ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRewardResponse {\n return {};\n}\n\nexport const MsgWithdrawDelegatorRewardResponse = {\n encode(\n _: MsgWithdrawDelegatorRewardResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgWithdrawDelegatorRewardResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgWithdrawDelegatorRewardResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgWithdrawDelegatorRewardResponse {\n return {};\n },\n\n toJSON(_: MsgWithdrawDelegatorRewardResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial<\n I extends Exact, I>,\n >(_: I): MsgWithdrawDelegatorRewardResponse {\n const message = createBaseMsgWithdrawDelegatorRewardResponse();\n return message;\n },\n};\n\nfunction createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission {\n return { validator_address: \"\" };\n}\n\nexport const MsgWithdrawValidatorCommission = {\n encode(\n message: MsgWithdrawValidatorCommission,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.validator_address !== \"\") {\n writer.uint32(10).string(message.validator_address);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgWithdrawValidatorCommission {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgWithdrawValidatorCommission();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.validator_address = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgWithdrawValidatorCommission {\n return {\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n };\n },\n\n toJSON(message: MsgWithdrawValidatorCommission): unknown {\n const obj: any = {};\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgWithdrawValidatorCommission {\n const message = createBaseMsgWithdrawValidatorCommission();\n message.validator_address = object.validator_address ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidatorCommissionResponse {\n return {};\n}\n\nexport const MsgWithdrawValidatorCommissionResponse = {\n encode(\n _: MsgWithdrawValidatorCommissionResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgWithdrawValidatorCommissionResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgWithdrawValidatorCommissionResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgWithdrawValidatorCommissionResponse {\n return {};\n },\n\n toJSON(_: MsgWithdrawValidatorCommissionResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial<\n I extends Exact, I>,\n >(_: I): MsgWithdrawValidatorCommissionResponse {\n const message = createBaseMsgWithdrawValidatorCommissionResponse();\n return message;\n },\n};\n\nfunction createBaseMsgFundCommunityPool(): MsgFundCommunityPool {\n return { amount: [], depositor: \"\" };\n}\n\nexport const MsgFundCommunityPool = {\n encode(\n message: MsgFundCommunityPool,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.amount) {\n Coin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.depositor !== \"\") {\n writer.uint32(18).string(message.depositor);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgFundCommunityPool {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgFundCommunityPool();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.amount.push(Coin.decode(reader, reader.uint32()));\n break;\n case 2:\n message.depositor = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgFundCommunityPool {\n return {\n amount: Array.isArray(object?.amount)\n ? object.amount.map((e: any) => Coin.fromJSON(e))\n : [],\n depositor: isSet(object.depositor) ? String(object.depositor) : \"\",\n };\n },\n\n toJSON(message: MsgFundCommunityPool): unknown {\n const obj: any = {};\n if (message.amount) {\n obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.amount = [];\n }\n message.depositor !== undefined && (obj.depositor = message.depositor);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgFundCommunityPool {\n const message = createBaseMsgFundCommunityPool();\n message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];\n message.depositor = object.depositor ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse {\n return {};\n}\n\nexport const MsgFundCommunityPoolResponse = {\n encode(\n _: MsgFundCommunityPoolResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgFundCommunityPoolResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgFundCommunityPoolResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgFundCommunityPoolResponse {\n return {};\n },\n\n toJSON(_: MsgFundCommunityPoolResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgFundCommunityPoolResponse {\n const message = createBaseMsgFundCommunityPoolResponse();\n return message;\n },\n};\n\n/** Msg defines the distribution Msg service. */\nexport interface Msg {\n /**\n * SetWithdrawAddress defines a method to change the withdraw address\n * for a delegator (or validator self-delegation).\n */\n SetWithdrawAddress(\n request: MsgSetWithdrawAddress,\n ): Promise;\n /**\n * WithdrawDelegatorReward defines a method to withdraw rewards of delegator\n * from a single validator.\n */\n WithdrawDelegatorReward(\n request: MsgWithdrawDelegatorReward,\n ): Promise;\n /**\n * WithdrawValidatorCommission defines a method to withdraw the\n * full commission to the validator address.\n */\n WithdrawValidatorCommission(\n request: MsgWithdrawValidatorCommission,\n ): Promise;\n /**\n * FundCommunityPool defines a method to allow an account to directly\n * fund the community pool.\n */\n FundCommunityPool(\n request: MsgFundCommunityPool,\n ): Promise;\n /**\n * SetAutoRestake enables or disables automatic restaking for a delegator\n * validator pair\n */\n SetAutoRestake(\n request: MsgSetAutoRestake,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.SetWithdrawAddress = this.SetWithdrawAddress.bind(this);\n this.WithdrawDelegatorReward = this.WithdrawDelegatorReward.bind(this);\n this.WithdrawValidatorCommission =\n this.WithdrawValidatorCommission.bind(this);\n this.FundCommunityPool = this.FundCommunityPool.bind(this);\n this.SetAutoRestake = this.SetAutoRestake.bind(this);\n }\n SetWithdrawAddress(\n request: MsgSetWithdrawAddress,\n ): Promise {\n const data = MsgSetWithdrawAddress.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.distribution.v1beta1.Msg\",\n \"SetWithdrawAddress\",\n data,\n );\n return promise.then((data) =>\n MsgSetWithdrawAddressResponse.decode(new _m0.Reader(data)),\n );\n }\n\n WithdrawDelegatorReward(\n request: MsgWithdrawDelegatorReward,\n ): Promise {\n const data = MsgWithdrawDelegatorReward.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.distribution.v1beta1.Msg\",\n \"WithdrawDelegatorReward\",\n data,\n );\n return promise.then((data) =>\n MsgWithdrawDelegatorRewardResponse.decode(new _m0.Reader(data)),\n );\n }\n\n WithdrawValidatorCommission(\n request: MsgWithdrawValidatorCommission,\n ): Promise {\n const data = MsgWithdrawValidatorCommission.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.distribution.v1beta1.Msg\",\n \"WithdrawValidatorCommission\",\n data,\n );\n return promise.then((data) =>\n MsgWithdrawValidatorCommissionResponse.decode(new _m0.Reader(data)),\n );\n }\n\n FundCommunityPool(\n request: MsgFundCommunityPool,\n ): Promise {\n const data = MsgFundCommunityPool.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.distribution.v1beta1.Msg\",\n \"FundCommunityPool\",\n data,\n );\n return promise.then((data) =>\n MsgFundCommunityPoolResponse.decode(new _m0.Reader(data)),\n );\n }\n\n SetAutoRestake(\n request: MsgSetAutoRestake,\n ): Promise {\n const data = MsgSetAutoRestake.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.distribution.v1beta1.Msg\",\n \"SetAutoRestake\",\n data,\n );\n return promise.then((data) =>\n MsgSetAutoRestakeResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../google/protobuf/any\";\n\nexport const protobufPackage = \"cosmos.evidence.v1beta1\";\n\n/**\n * MsgSubmitEvidence represents a message that supports submitting arbitrary\n * Evidence of misbehavior such as equivocation or counterfactual signing.\n */\nexport interface MsgSubmitEvidence {\n submitter: string;\n evidence?: Any;\n}\n\n/** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */\nexport interface MsgSubmitEvidenceResponse {\n /** hash defines the hash of the evidence. */\n hash: Uint8Array;\n}\n\nfunction createBaseMsgSubmitEvidence(): MsgSubmitEvidence {\n return { submitter: \"\", evidence: undefined };\n}\n\nexport const MsgSubmitEvidence = {\n encode(\n message: MsgSubmitEvidence,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.submitter !== \"\") {\n writer.uint32(10).string(message.submitter);\n }\n if (message.evidence !== undefined) {\n Any.encode(message.evidence, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgSubmitEvidence {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSubmitEvidence();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.submitter = reader.string();\n break;\n case 2:\n message.evidence = Any.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgSubmitEvidence {\n return {\n submitter: isSet(object.submitter) ? String(object.submitter) : \"\",\n evidence: isSet(object.evidence)\n ? Any.fromJSON(object.evidence)\n : undefined,\n };\n },\n\n toJSON(message: MsgSubmitEvidence): unknown {\n const obj: any = {};\n message.submitter !== undefined && (obj.submitter = message.submitter);\n message.evidence !== undefined &&\n (obj.evidence = message.evidence\n ? Any.toJSON(message.evidence)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgSubmitEvidence {\n const message = createBaseMsgSubmitEvidence();\n message.submitter = object.submitter ?? \"\";\n message.evidence =\n object.evidence !== undefined && object.evidence !== null\n ? Any.fromPartial(object.evidence)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgSubmitEvidenceResponse(): MsgSubmitEvidenceResponse {\n return { hash: new Uint8Array() };\n}\n\nexport const MsgSubmitEvidenceResponse = {\n encode(\n message: MsgSubmitEvidenceResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.hash.length !== 0) {\n writer.uint32(34).bytes(message.hash);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgSubmitEvidenceResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSubmitEvidenceResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 4:\n message.hash = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgSubmitEvidenceResponse {\n return {\n hash: isSet(object.hash)\n ? bytesFromBase64(object.hash)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MsgSubmitEvidenceResponse): unknown {\n const obj: any = {};\n message.hash !== undefined &&\n (obj.hash = base64FromBytes(\n message.hash !== undefined ? message.hash : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgSubmitEvidenceResponse {\n const message = createBaseMsgSubmitEvidenceResponse();\n message.hash = object.hash ?? new Uint8Array();\n return message;\n },\n};\n\n/** Msg defines the evidence Msg service. */\nexport interface Msg {\n /**\n * SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or\n * counterfactual signing.\n */\n SubmitEvidence(\n request: MsgSubmitEvidence,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.SubmitEvidence = this.SubmitEvidence.bind(this);\n }\n SubmitEvidence(\n request: MsgSubmitEvidence,\n ): Promise {\n const data = MsgSubmitEvidence.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.evidence.v1beta1.Msg\",\n \"SubmitEvidence\",\n data,\n );\n return promise.then((data) =>\n MsgSubmitEvidenceResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Timestamp } from \"../../../google/protobuf/timestamp\";\nimport { Duration } from \"../../../google/protobuf/duration\";\nimport { Any } from \"../../../google/protobuf/any\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.feegrant.v1beta1\";\n\n/** Since: cosmos-sdk 0.43 */\n\n/**\n * BasicAllowance implements Allowance with a one-time grant of tokens\n * that optionally expires. The grantee can use up to SpendLimit to cover fees.\n */\nexport interface BasicAllowance {\n /**\n * spend_limit specifies the maximum amount of tokens that can be spent\n * by this allowance and will be updated as tokens are spent. If it is\n * empty, there is no spend limit and any amount of coins can be spent.\n */\n spend_limit: Coin[];\n /** expiration specifies an optional time when this allowance expires */\n expiration?: Timestamp;\n}\n\n/**\n * PeriodicAllowance extends Allowance to allow for both a maximum cap,\n * as well as a limit per time period.\n */\nexport interface PeriodicAllowance {\n /** basic specifies a struct of `BasicAllowance` */\n basic?: BasicAllowance;\n /**\n * period specifies the time duration in which period_spend_limit coins can\n * be spent before that allowance is reset\n */\n period?: Duration;\n /**\n * period_spend_limit specifies the maximum number of coins that can be spent\n * in the period\n */\n period_spend_limit: Coin[];\n /** period_can_spend is the number of coins left to be spent before the period_reset time */\n period_can_spend: Coin[];\n /**\n * period_reset is the time at which this period resets and a new one begins,\n * it is calculated from the start time of the first transaction after the\n * last period ended\n */\n period_reset?: Timestamp;\n}\n\n/** AllowedMsgAllowance creates allowance only for specified message types. */\nexport interface AllowedMsgAllowance {\n /** allowance can be any of basic and filtered fee allowance. */\n allowance?: Any;\n /** allowed_messages are the messages for which the grantee has the access. */\n allowed_messages: string[];\n}\n\n/** Grant is stored in the KVStore to record a grant with full context */\nexport interface Grant {\n /** granter is the address of the user granting an allowance of their funds. */\n granter: string;\n /** grantee is the address of the user being granted an allowance of another user's funds. */\n grantee: string;\n /** allowance can be any of basic and filtered fee allowance. */\n allowance?: Any;\n}\n\nfunction createBaseBasicAllowance(): BasicAllowance {\n return { spend_limit: [], expiration: undefined };\n}\n\nexport const BasicAllowance = {\n encode(\n message: BasicAllowance,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.spend_limit) {\n Coin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.expiration !== undefined) {\n Timestamp.encode(message.expiration, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): BasicAllowance {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBasicAllowance();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.spend_limit.push(Coin.decode(reader, reader.uint32()));\n break;\n case 2:\n message.expiration = Timestamp.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): BasicAllowance {\n return {\n spend_limit: Array.isArray(object?.spend_limit)\n ? object.spend_limit.map((e: any) => Coin.fromJSON(e))\n : [],\n expiration: isSet(object.expiration)\n ? fromJsonTimestamp(object.expiration)\n : undefined,\n };\n },\n\n toJSON(message: BasicAllowance): unknown {\n const obj: any = {};\n if (message.spend_limit) {\n obj.spend_limit = message.spend_limit.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.spend_limit = [];\n }\n message.expiration !== undefined &&\n (obj.expiration = fromTimestamp(message.expiration).toISOString());\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): BasicAllowance {\n const message = createBaseBasicAllowance();\n message.spend_limit =\n object.spend_limit?.map((e) => Coin.fromPartial(e)) || [];\n message.expiration =\n object.expiration !== undefined && object.expiration !== null\n ? Timestamp.fromPartial(object.expiration)\n : undefined;\n return message;\n },\n};\n\nfunction createBasePeriodicAllowance(): PeriodicAllowance {\n return {\n basic: undefined,\n period: undefined,\n period_spend_limit: [],\n period_can_spend: [],\n period_reset: undefined,\n };\n}\n\nexport const PeriodicAllowance = {\n encode(\n message: PeriodicAllowance,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.basic !== undefined) {\n BasicAllowance.encode(message.basic, writer.uint32(10).fork()).ldelim();\n }\n if (message.period !== undefined) {\n Duration.encode(message.period, writer.uint32(18).fork()).ldelim();\n }\n for (const v of message.period_spend_limit) {\n Coin.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n for (const v of message.period_can_spend) {\n Coin.encode(v!, writer.uint32(34).fork()).ldelim();\n }\n if (message.period_reset !== undefined) {\n Timestamp.encode(message.period_reset, writer.uint32(42).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PeriodicAllowance {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePeriodicAllowance();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.basic = BasicAllowance.decode(reader, reader.uint32());\n break;\n case 2:\n message.period = Duration.decode(reader, reader.uint32());\n break;\n case 3:\n message.period_spend_limit.push(Coin.decode(reader, reader.uint32()));\n break;\n case 4:\n message.period_can_spend.push(Coin.decode(reader, reader.uint32()));\n break;\n case 5:\n message.period_reset = Timestamp.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PeriodicAllowance {\n return {\n basic: isSet(object.basic)\n ? BasicAllowance.fromJSON(object.basic)\n : undefined,\n period: isSet(object.period)\n ? Duration.fromJSON(object.period)\n : undefined,\n period_spend_limit: Array.isArray(object?.period_spend_limit)\n ? object.period_spend_limit.map((e: any) => Coin.fromJSON(e))\n : [],\n period_can_spend: Array.isArray(object?.period_can_spend)\n ? object.period_can_spend.map((e: any) => Coin.fromJSON(e))\n : [],\n period_reset: isSet(object.period_reset)\n ? fromJsonTimestamp(object.period_reset)\n : undefined,\n };\n },\n\n toJSON(message: PeriodicAllowance): unknown {\n const obj: any = {};\n message.basic !== undefined &&\n (obj.basic = message.basic\n ? BasicAllowance.toJSON(message.basic)\n : undefined);\n message.period !== undefined &&\n (obj.period = message.period\n ? Duration.toJSON(message.period)\n : undefined);\n if (message.period_spend_limit) {\n obj.period_spend_limit = message.period_spend_limit.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.period_spend_limit = [];\n }\n if (message.period_can_spend) {\n obj.period_can_spend = message.period_can_spend.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.period_can_spend = [];\n }\n message.period_reset !== undefined &&\n (obj.period_reset = fromTimestamp(message.period_reset).toISOString());\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): PeriodicAllowance {\n const message = createBasePeriodicAllowance();\n message.basic =\n object.basic !== undefined && object.basic !== null\n ? BasicAllowance.fromPartial(object.basic)\n : undefined;\n message.period =\n object.period !== undefined && object.period !== null\n ? Duration.fromPartial(object.period)\n : undefined;\n message.period_spend_limit =\n object.period_spend_limit?.map((e) => Coin.fromPartial(e)) || [];\n message.period_can_spend =\n object.period_can_spend?.map((e) => Coin.fromPartial(e)) || [];\n message.period_reset =\n object.period_reset !== undefined && object.period_reset !== null\n ? Timestamp.fromPartial(object.period_reset)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseAllowedMsgAllowance(): AllowedMsgAllowance {\n return { allowance: undefined, allowed_messages: [] };\n}\n\nexport const AllowedMsgAllowance = {\n encode(\n message: AllowedMsgAllowance,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.allowance !== undefined) {\n Any.encode(message.allowance, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.allowed_messages) {\n writer.uint32(18).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): AllowedMsgAllowance {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseAllowedMsgAllowance();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.allowance = Any.decode(reader, reader.uint32());\n break;\n case 2:\n message.allowed_messages.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): AllowedMsgAllowance {\n return {\n allowance: isSet(object.allowance)\n ? Any.fromJSON(object.allowance)\n : undefined,\n allowed_messages: Array.isArray(object?.allowed_messages)\n ? object.allowed_messages.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: AllowedMsgAllowance): unknown {\n const obj: any = {};\n message.allowance !== undefined &&\n (obj.allowance = message.allowance\n ? Any.toJSON(message.allowance)\n : undefined);\n if (message.allowed_messages) {\n obj.allowed_messages = message.allowed_messages.map((e) => e);\n } else {\n obj.allowed_messages = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): AllowedMsgAllowance {\n const message = createBaseAllowedMsgAllowance();\n message.allowance =\n object.allowance !== undefined && object.allowance !== null\n ? Any.fromPartial(object.allowance)\n : undefined;\n message.allowed_messages = object.allowed_messages?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseGrant(): Grant {\n return { granter: \"\", grantee: \"\", allowance: undefined };\n}\n\nexport const Grant = {\n encode(message: Grant, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.granter !== \"\") {\n writer.uint32(10).string(message.granter);\n }\n if (message.grantee !== \"\") {\n writer.uint32(18).string(message.grantee);\n }\n if (message.allowance !== undefined) {\n Any.encode(message.allowance, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Grant {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGrant();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.granter = reader.string();\n break;\n case 2:\n message.grantee = reader.string();\n break;\n case 3:\n message.allowance = Any.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Grant {\n return {\n granter: isSet(object.granter) ? String(object.granter) : \"\",\n grantee: isSet(object.grantee) ? String(object.grantee) : \"\",\n allowance: isSet(object.allowance)\n ? Any.fromJSON(object.allowance)\n : undefined,\n };\n },\n\n toJSON(message: Grant): unknown {\n const obj: any = {};\n message.granter !== undefined && (obj.granter = message.granter);\n message.grantee !== undefined && (obj.grantee = message.grantee);\n message.allowance !== undefined &&\n (obj.allowance = message.allowance\n ? Any.toJSON(message.allowance)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): Grant {\n const message = createBaseGrant();\n message.granter = object.granter ?? \"\";\n message.grantee = object.grantee ?? \"\";\n message.allowance =\n object.allowance !== undefined && object.allowance !== null\n ? Any.fromPartial(object.allowance)\n : undefined;\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1_000).toString();\n const nanos = (date.getTime() % 1_000) * 1_000_000;\n return { seconds, nanos };\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1_000;\n millis += t.nanos / 1_000_000;\n return new Date(millis);\n}\n\nfunction fromJsonTimestamp(o: any): Timestamp {\n if (o instanceof Date) {\n return toTimestamp(o);\n } else if (typeof o === \"string\") {\n return toTimestamp(new Date(o));\n } else {\n return Timestamp.fromJSON(o);\n }\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../google/protobuf/any\";\n\nexport const protobufPackage = \"cosmos.feegrant.v1beta1\";\n\n/** Since: cosmos-sdk 0.43 */\n\n/**\n * MsgGrantAllowance adds permission for Grantee to spend up to Allowance\n * of fees from the account of Granter.\n */\nexport interface MsgGrantAllowance {\n /** granter is the address of the user granting an allowance of their funds. */\n granter: string;\n /** grantee is the address of the user being granted an allowance of another user's funds. */\n grantee: string;\n /** allowance can be any of basic and filtered fee allowance. */\n allowance?: Any;\n}\n\n/** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */\nexport interface MsgGrantAllowanceResponse {}\n\n/** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */\nexport interface MsgRevokeAllowance {\n /** granter is the address of the user granting an allowance of their funds. */\n granter: string;\n /** grantee is the address of the user being granted an allowance of another user's funds. */\n grantee: string;\n}\n\n/** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */\nexport interface MsgRevokeAllowanceResponse {}\n\nfunction createBaseMsgGrantAllowance(): MsgGrantAllowance {\n return { granter: \"\", grantee: \"\", allowance: undefined };\n}\n\nexport const MsgGrantAllowance = {\n encode(\n message: MsgGrantAllowance,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.granter !== \"\") {\n writer.uint32(10).string(message.granter);\n }\n if (message.grantee !== \"\") {\n writer.uint32(18).string(message.grantee);\n }\n if (message.allowance !== undefined) {\n Any.encode(message.allowance, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgGrantAllowance {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgGrantAllowance();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.granter = reader.string();\n break;\n case 2:\n message.grantee = reader.string();\n break;\n case 3:\n message.allowance = Any.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgGrantAllowance {\n return {\n granter: isSet(object.granter) ? String(object.granter) : \"\",\n grantee: isSet(object.grantee) ? String(object.grantee) : \"\",\n allowance: isSet(object.allowance)\n ? Any.fromJSON(object.allowance)\n : undefined,\n };\n },\n\n toJSON(message: MsgGrantAllowance): unknown {\n const obj: any = {};\n message.granter !== undefined && (obj.granter = message.granter);\n message.grantee !== undefined && (obj.grantee = message.grantee);\n message.allowance !== undefined &&\n (obj.allowance = message.allowance\n ? Any.toJSON(message.allowance)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgGrantAllowance {\n const message = createBaseMsgGrantAllowance();\n message.granter = object.granter ?? \"\";\n message.grantee = object.grantee ?? \"\";\n message.allowance =\n object.allowance !== undefined && object.allowance !== null\n ? Any.fromPartial(object.allowance)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgGrantAllowanceResponse(): MsgGrantAllowanceResponse {\n return {};\n}\n\nexport const MsgGrantAllowanceResponse = {\n encode(\n _: MsgGrantAllowanceResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgGrantAllowanceResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgGrantAllowanceResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgGrantAllowanceResponse {\n return {};\n },\n\n toJSON(_: MsgGrantAllowanceResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgGrantAllowanceResponse {\n const message = createBaseMsgGrantAllowanceResponse();\n return message;\n },\n};\n\nfunction createBaseMsgRevokeAllowance(): MsgRevokeAllowance {\n return { granter: \"\", grantee: \"\" };\n}\n\nexport const MsgRevokeAllowance = {\n encode(\n message: MsgRevokeAllowance,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.granter !== \"\") {\n writer.uint32(10).string(message.granter);\n }\n if (message.grantee !== \"\") {\n writer.uint32(18).string(message.grantee);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeAllowance {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRevokeAllowance();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.granter = reader.string();\n break;\n case 2:\n message.grantee = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgRevokeAllowance {\n return {\n granter: isSet(object.granter) ? String(object.granter) : \"\",\n grantee: isSet(object.grantee) ? String(object.grantee) : \"\",\n };\n },\n\n toJSON(message: MsgRevokeAllowance): unknown {\n const obj: any = {};\n message.granter !== undefined && (obj.granter = message.granter);\n message.grantee !== undefined && (obj.grantee = message.grantee);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgRevokeAllowance {\n const message = createBaseMsgRevokeAllowance();\n message.granter = object.granter ?? \"\";\n message.grantee = object.grantee ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgRevokeAllowanceResponse(): MsgRevokeAllowanceResponse {\n return {};\n}\n\nexport const MsgRevokeAllowanceResponse = {\n encode(\n _: MsgRevokeAllowanceResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgRevokeAllowanceResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRevokeAllowanceResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgRevokeAllowanceResponse {\n return {};\n },\n\n toJSON(_: MsgRevokeAllowanceResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgRevokeAllowanceResponse {\n const message = createBaseMsgRevokeAllowanceResponse();\n return message;\n },\n};\n\n/** Msg defines the feegrant msg service. */\nexport interface Msg {\n /**\n * GrantAllowance grants fee allowance to the grantee on the granter's\n * account with the provided expiration time.\n */\n GrantAllowance(\n request: MsgGrantAllowance,\n ): Promise;\n /**\n * RevokeAllowance revokes any fee allowance of granter's account that\n * has been granted to the grantee.\n */\n RevokeAllowance(\n request: MsgRevokeAllowance,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.GrantAllowance = this.GrantAllowance.bind(this);\n this.RevokeAllowance = this.RevokeAllowance.bind(this);\n }\n GrantAllowance(\n request: MsgGrantAllowance,\n ): Promise {\n const data = MsgGrantAllowance.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.feegrant.v1beta1.Msg\",\n \"GrantAllowance\",\n data,\n );\n return promise.then((data) =>\n MsgGrantAllowanceResponse.decode(new _m0.Reader(data)),\n );\n }\n\n RevokeAllowance(\n request: MsgRevokeAllowance,\n ): Promise {\n const data = MsgRevokeAllowance.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.feegrant.v1beta1.Msg\",\n \"RevokeAllowance\",\n data,\n );\n return promise.then((data) =>\n MsgRevokeAllowanceResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../google/protobuf/any\";\nimport { Timestamp } from \"../../../google/protobuf/timestamp\";\nimport { Duration } from \"../../../google/protobuf/duration\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.gov.v1beta1\";\n\n/** VoteOption enumerates the valid vote options for a given governance proposal. */\nexport enum VoteOption {\n /** VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */\n VOTE_OPTION_UNSPECIFIED = 0,\n /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */\n VOTE_OPTION_YES = 1,\n /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */\n VOTE_OPTION_ABSTAIN = 2,\n /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */\n VOTE_OPTION_NO = 3,\n /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */\n VOTE_OPTION_NO_WITH_VETO = 4,\n UNRECOGNIZED = -1,\n}\n\nexport function voteOptionFromJSON(object: any): VoteOption {\n switch (object) {\n case 0:\n case \"VOTE_OPTION_UNSPECIFIED\":\n return VoteOption.VOTE_OPTION_UNSPECIFIED;\n case 1:\n case \"VOTE_OPTION_YES\":\n return VoteOption.VOTE_OPTION_YES;\n case 2:\n case \"VOTE_OPTION_ABSTAIN\":\n return VoteOption.VOTE_OPTION_ABSTAIN;\n case 3:\n case \"VOTE_OPTION_NO\":\n return VoteOption.VOTE_OPTION_NO;\n case 4:\n case \"VOTE_OPTION_NO_WITH_VETO\":\n return VoteOption.VOTE_OPTION_NO_WITH_VETO;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return VoteOption.UNRECOGNIZED;\n }\n}\n\nexport function voteOptionToJSON(object: VoteOption): string {\n switch (object) {\n case VoteOption.VOTE_OPTION_UNSPECIFIED:\n return \"VOTE_OPTION_UNSPECIFIED\";\n case VoteOption.VOTE_OPTION_YES:\n return \"VOTE_OPTION_YES\";\n case VoteOption.VOTE_OPTION_ABSTAIN:\n return \"VOTE_OPTION_ABSTAIN\";\n case VoteOption.VOTE_OPTION_NO:\n return \"VOTE_OPTION_NO\";\n case VoteOption.VOTE_OPTION_NO_WITH_VETO:\n return \"VOTE_OPTION_NO_WITH_VETO\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/** ProposalStatus enumerates the valid statuses of a proposal. */\nexport enum ProposalStatus {\n /** PROPOSAL_STATUS_UNSPECIFIED - PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */\n PROPOSAL_STATUS_UNSPECIFIED = 0,\n /**\n * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\n * period.\n */\n PROPOSAL_STATUS_DEPOSIT_PERIOD = 1,\n /**\n * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\n * period.\n */\n PROPOSAL_STATUS_VOTING_PERIOD = 2,\n /**\n * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\n * passed.\n */\n PROPOSAL_STATUS_PASSED = 3,\n /**\n * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\n * been rejected.\n */\n PROPOSAL_STATUS_REJECTED = 4,\n /**\n * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\n * failed.\n */\n PROPOSAL_STATUS_FAILED = 5,\n UNRECOGNIZED = -1,\n}\n\nexport function proposalStatusFromJSON(object: any): ProposalStatus {\n switch (object) {\n case 0:\n case \"PROPOSAL_STATUS_UNSPECIFIED\":\n return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED;\n case 1:\n case \"PROPOSAL_STATUS_DEPOSIT_PERIOD\":\n return ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD;\n case 2:\n case \"PROPOSAL_STATUS_VOTING_PERIOD\":\n return ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD;\n case 3:\n case \"PROPOSAL_STATUS_PASSED\":\n return ProposalStatus.PROPOSAL_STATUS_PASSED;\n case 4:\n case \"PROPOSAL_STATUS_REJECTED\":\n return ProposalStatus.PROPOSAL_STATUS_REJECTED;\n case 5:\n case \"PROPOSAL_STATUS_FAILED\":\n return ProposalStatus.PROPOSAL_STATUS_FAILED;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return ProposalStatus.UNRECOGNIZED;\n }\n}\n\nexport function proposalStatusToJSON(object: ProposalStatus): string {\n switch (object) {\n case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:\n return \"PROPOSAL_STATUS_UNSPECIFIED\";\n case ProposalStatus.PROPOSAL_STATUS_DEPOSIT_PERIOD:\n return \"PROPOSAL_STATUS_DEPOSIT_PERIOD\";\n case ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD:\n return \"PROPOSAL_STATUS_VOTING_PERIOD\";\n case ProposalStatus.PROPOSAL_STATUS_PASSED:\n return \"PROPOSAL_STATUS_PASSED\";\n case ProposalStatus.PROPOSAL_STATUS_REJECTED:\n return \"PROPOSAL_STATUS_REJECTED\";\n case ProposalStatus.PROPOSAL_STATUS_FAILED:\n return \"PROPOSAL_STATUS_FAILED\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * WeightedVoteOption defines a unit of vote for vote split.\n *\n * Since: cosmos-sdk 0.43\n */\nexport interface WeightedVoteOption {\n option: VoteOption;\n weight: string;\n}\n\n/**\n * TextProposal defines a standard text proposal whose changes need to be\n * manually updated in case of approval.\n */\nexport interface TextProposal {\n title: string;\n description: string;\n}\n\n/**\n * Deposit defines an amount deposited by an account address to an active\n * proposal.\n */\nexport interface Deposit {\n proposal_id: string;\n depositor: string;\n amount: Coin[];\n}\n\n/** Proposal defines the core field members of a governance proposal. */\nexport interface Proposal {\n proposal_id: string;\n content?: Any;\n status: ProposalStatus;\n final_tally_result?: TallyResult;\n submit_time?: Timestamp;\n deposit_end_time?: Timestamp;\n total_deposit: Coin[];\n voting_start_time?: Timestamp;\n voting_end_time?: Timestamp;\n is_expedited: boolean;\n}\n\n/** TallyResult defines a standard tally for a governance proposal. */\nexport interface TallyResult {\n yes: string;\n abstain: string;\n no: string;\n no_with_veto: string;\n}\n\n/**\n * Vote defines a vote on a governance proposal.\n * A Vote consists of a proposal ID, the voter, and the vote option.\n */\nexport interface Vote {\n proposal_id: string;\n voter: string;\n /**\n * Deprecated: Prefer to use `options` instead. This field is set in queries\n * if and only if `len(options) == 1` and that option has weight 1. In all\n * other cases, this field will default to VOTE_OPTION_UNSPECIFIED.\n *\n * @deprecated\n */\n option: VoteOption;\n /** Since: cosmos-sdk 0.43 */\n options: WeightedVoteOption[];\n}\n\n/** DepositParams defines the params for deposits on governance proposals. */\nexport interface DepositParams {\n /** Minimum deposit for a proposal to enter voting period. */\n min_deposit: Coin[];\n /**\n * Maximum period for Atom holders to deposit on a proposal. Initial value: 2\n * months.\n */\n max_deposit_period?: Duration;\n /** Minimum expedited deposit for a proposal to enter voting period. */\n min_expedited_deposit: Coin[];\n}\n\n/** VotingParams defines the params for voting on governance proposals. */\nexport interface VotingParams {\n /** Length of the voting period. */\n voting_period?: Duration;\n /** Length of the expedited voting period. */\n expedited_voting_period?: Duration;\n}\n\n/** TallyParams defines the params for tallying votes on governance proposals. */\nexport interface TallyParams {\n /**\n * Minimum percentage of total stake needed to vote for a result to be\n * considered valid.\n */\n quorum: Uint8Array;\n /** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */\n threshold: Uint8Array;\n /**\n * Minimum value of Veto votes to Total votes ratio for proposal to be\n * vetoed. Default value: 1/3.\n */\n veto_threshold: Uint8Array;\n /** Minimum proportion of Yes votes for an expedited proposal to pass. Default value: 0.67. */\n expedited_threshold: Uint8Array;\n}\n\nfunction createBaseWeightedVoteOption(): WeightedVoteOption {\n return { option: 0, weight: \"\" };\n}\n\nexport const WeightedVoteOption = {\n encode(\n message: WeightedVoteOption,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.option !== 0) {\n writer.uint32(8).int32(message.option);\n }\n if (message.weight !== \"\") {\n writer.uint32(18).string(message.weight);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): WeightedVoteOption {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseWeightedVoteOption();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.option = reader.int32() as any;\n break;\n case 2:\n message.weight = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): WeightedVoteOption {\n return {\n option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0,\n weight: isSet(object.weight) ? String(object.weight) : \"\",\n };\n },\n\n toJSON(message: WeightedVoteOption): unknown {\n const obj: any = {};\n message.option !== undefined &&\n (obj.option = voteOptionToJSON(message.option));\n message.weight !== undefined && (obj.weight = message.weight);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): WeightedVoteOption {\n const message = createBaseWeightedVoteOption();\n message.option = object.option ?? 0;\n message.weight = object.weight ?? \"\";\n return message;\n },\n};\n\nfunction createBaseTextProposal(): TextProposal {\n return { title: \"\", description: \"\" };\n}\n\nexport const TextProposal = {\n encode(\n message: TextProposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.title !== \"\") {\n writer.uint32(10).string(message.title);\n }\n if (message.description !== \"\") {\n writer.uint32(18).string(message.description);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TextProposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTextProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.title = reader.string();\n break;\n case 2:\n message.description = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TextProposal {\n return {\n title: isSet(object.title) ? String(object.title) : \"\",\n description: isSet(object.description) ? String(object.description) : \"\",\n };\n },\n\n toJSON(message: TextProposal): unknown {\n const obj: any = {};\n message.title !== undefined && (obj.title = message.title);\n message.description !== undefined &&\n (obj.description = message.description);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): TextProposal {\n const message = createBaseTextProposal();\n message.title = object.title ?? \"\";\n message.description = object.description ?? \"\";\n return message;\n },\n};\n\nfunction createBaseDeposit(): Deposit {\n return { proposal_id: \"0\", depositor: \"\", amount: [] };\n}\n\nexport const Deposit = {\n encode(\n message: Deposit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.proposal_id !== \"0\") {\n writer.uint32(8).uint64(message.proposal_id);\n }\n if (message.depositor !== \"\") {\n writer.uint32(18).string(message.depositor);\n }\n for (const v of message.amount) {\n Coin.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Deposit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDeposit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.proposal_id = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.depositor = reader.string();\n break;\n case 3:\n message.amount.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Deposit {\n return {\n proposal_id: isSet(object.proposal_id) ? String(object.proposal_id) : \"0\",\n depositor: isSet(object.depositor) ? String(object.depositor) : \"\",\n amount: Array.isArray(object?.amount)\n ? object.amount.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Deposit): unknown {\n const obj: any = {};\n message.proposal_id !== undefined &&\n (obj.proposal_id = message.proposal_id);\n message.depositor !== undefined && (obj.depositor = message.depositor);\n if (message.amount) {\n obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.amount = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Deposit {\n const message = createBaseDeposit();\n message.proposal_id = object.proposal_id ?? \"0\";\n message.depositor = object.depositor ?? \"\";\n message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseProposal(): Proposal {\n return {\n proposal_id: \"0\",\n content: undefined,\n status: 0,\n final_tally_result: undefined,\n submit_time: undefined,\n deposit_end_time: undefined,\n total_deposit: [],\n voting_start_time: undefined,\n voting_end_time: undefined,\n is_expedited: false,\n };\n}\n\nexport const Proposal = {\n encode(\n message: Proposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.proposal_id !== \"0\") {\n writer.uint32(8).uint64(message.proposal_id);\n }\n if (message.content !== undefined) {\n Any.encode(message.content, writer.uint32(18).fork()).ldelim();\n }\n if (message.status !== 0) {\n writer.uint32(24).int32(message.status);\n }\n if (message.final_tally_result !== undefined) {\n TallyResult.encode(\n message.final_tally_result,\n writer.uint32(34).fork(),\n ).ldelim();\n }\n if (message.submit_time !== undefined) {\n Timestamp.encode(message.submit_time, writer.uint32(42).fork()).ldelim();\n }\n if (message.deposit_end_time !== undefined) {\n Timestamp.encode(\n message.deposit_end_time,\n writer.uint32(50).fork(),\n ).ldelim();\n }\n for (const v of message.total_deposit) {\n Coin.encode(v!, writer.uint32(58).fork()).ldelim();\n }\n if (message.voting_start_time !== undefined) {\n Timestamp.encode(\n message.voting_start_time,\n writer.uint32(66).fork(),\n ).ldelim();\n }\n if (message.voting_end_time !== undefined) {\n Timestamp.encode(\n message.voting_end_time,\n writer.uint32(74).fork(),\n ).ldelim();\n }\n if (message.is_expedited === true) {\n writer.uint32(80).bool(message.is_expedited);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Proposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.proposal_id = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.content = Any.decode(reader, reader.uint32());\n break;\n case 3:\n message.status = reader.int32() as any;\n break;\n case 4:\n message.final_tally_result = TallyResult.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 5:\n message.submit_time = Timestamp.decode(reader, reader.uint32());\n break;\n case 6:\n message.deposit_end_time = Timestamp.decode(reader, reader.uint32());\n break;\n case 7:\n message.total_deposit.push(Coin.decode(reader, reader.uint32()));\n break;\n case 8:\n message.voting_start_time = Timestamp.decode(reader, reader.uint32());\n break;\n case 9:\n message.voting_end_time = Timestamp.decode(reader, reader.uint32());\n break;\n case 10:\n message.is_expedited = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Proposal {\n return {\n proposal_id: isSet(object.proposal_id) ? String(object.proposal_id) : \"0\",\n content: isSet(object.content) ? Any.fromJSON(object.content) : undefined,\n status: isSet(object.status) ? proposalStatusFromJSON(object.status) : 0,\n final_tally_result: isSet(object.final_tally_result)\n ? TallyResult.fromJSON(object.final_tally_result)\n : undefined,\n submit_time: isSet(object.submit_time)\n ? fromJsonTimestamp(object.submit_time)\n : undefined,\n deposit_end_time: isSet(object.deposit_end_time)\n ? fromJsonTimestamp(object.deposit_end_time)\n : undefined,\n total_deposit: Array.isArray(object?.total_deposit)\n ? object.total_deposit.map((e: any) => Coin.fromJSON(e))\n : [],\n voting_start_time: isSet(object.voting_start_time)\n ? fromJsonTimestamp(object.voting_start_time)\n : undefined,\n voting_end_time: isSet(object.voting_end_time)\n ? fromJsonTimestamp(object.voting_end_time)\n : undefined,\n is_expedited: isSet(object.is_expedited)\n ? Boolean(object.is_expedited)\n : false,\n };\n },\n\n toJSON(message: Proposal): unknown {\n const obj: any = {};\n message.proposal_id !== undefined &&\n (obj.proposal_id = message.proposal_id);\n message.content !== undefined &&\n (obj.content = message.content ? Any.toJSON(message.content) : undefined);\n message.status !== undefined &&\n (obj.status = proposalStatusToJSON(message.status));\n message.final_tally_result !== undefined &&\n (obj.final_tally_result = message.final_tally_result\n ? TallyResult.toJSON(message.final_tally_result)\n : undefined);\n message.submit_time !== undefined &&\n (obj.submit_time = fromTimestamp(message.submit_time).toISOString());\n message.deposit_end_time !== undefined &&\n (obj.deposit_end_time = fromTimestamp(\n message.deposit_end_time,\n ).toISOString());\n if (message.total_deposit) {\n obj.total_deposit = message.total_deposit.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.total_deposit = [];\n }\n message.voting_start_time !== undefined &&\n (obj.voting_start_time = fromTimestamp(\n message.voting_start_time,\n ).toISOString());\n message.voting_end_time !== undefined &&\n (obj.voting_end_time = fromTimestamp(\n message.voting_end_time,\n ).toISOString());\n message.is_expedited !== undefined &&\n (obj.is_expedited = message.is_expedited);\n return obj;\n },\n\n fromPartial, I>>(object: I): Proposal {\n const message = createBaseProposal();\n message.proposal_id = object.proposal_id ?? \"0\";\n message.content =\n object.content !== undefined && object.content !== null\n ? Any.fromPartial(object.content)\n : undefined;\n message.status = object.status ?? 0;\n message.final_tally_result =\n object.final_tally_result !== undefined &&\n object.final_tally_result !== null\n ? TallyResult.fromPartial(object.final_tally_result)\n : undefined;\n message.submit_time =\n object.submit_time !== undefined && object.submit_time !== null\n ? Timestamp.fromPartial(object.submit_time)\n : undefined;\n message.deposit_end_time =\n object.deposit_end_time !== undefined && object.deposit_end_time !== null\n ? Timestamp.fromPartial(object.deposit_end_time)\n : undefined;\n message.total_deposit =\n object.total_deposit?.map((e) => Coin.fromPartial(e)) || [];\n message.voting_start_time =\n object.voting_start_time !== undefined &&\n object.voting_start_time !== null\n ? Timestamp.fromPartial(object.voting_start_time)\n : undefined;\n message.voting_end_time =\n object.voting_end_time !== undefined && object.voting_end_time !== null\n ? Timestamp.fromPartial(object.voting_end_time)\n : undefined;\n message.is_expedited = object.is_expedited ?? false;\n return message;\n },\n};\n\nfunction createBaseTallyResult(): TallyResult {\n return { yes: \"\", abstain: \"\", no: \"\", no_with_veto: \"\" };\n}\n\nexport const TallyResult = {\n encode(\n message: TallyResult,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.yes !== \"\") {\n writer.uint32(10).string(message.yes);\n }\n if (message.abstain !== \"\") {\n writer.uint32(18).string(message.abstain);\n }\n if (message.no !== \"\") {\n writer.uint32(26).string(message.no);\n }\n if (message.no_with_veto !== \"\") {\n writer.uint32(34).string(message.no_with_veto);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TallyResult {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTallyResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.yes = reader.string();\n break;\n case 2:\n message.abstain = reader.string();\n break;\n case 3:\n message.no = reader.string();\n break;\n case 4:\n message.no_with_veto = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TallyResult {\n return {\n yes: isSet(object.yes) ? String(object.yes) : \"\",\n abstain: isSet(object.abstain) ? String(object.abstain) : \"\",\n no: isSet(object.no) ? String(object.no) : \"\",\n no_with_veto: isSet(object.no_with_veto)\n ? String(object.no_with_veto)\n : \"\",\n };\n },\n\n toJSON(message: TallyResult): unknown {\n const obj: any = {};\n message.yes !== undefined && (obj.yes = message.yes);\n message.abstain !== undefined && (obj.abstain = message.abstain);\n message.no !== undefined && (obj.no = message.no);\n message.no_with_veto !== undefined &&\n (obj.no_with_veto = message.no_with_veto);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): TallyResult {\n const message = createBaseTallyResult();\n message.yes = object.yes ?? \"\";\n message.abstain = object.abstain ?? \"\";\n message.no = object.no ?? \"\";\n message.no_with_veto = object.no_with_veto ?? \"\";\n return message;\n },\n};\n\nfunction createBaseVote(): Vote {\n return { proposal_id: \"0\", voter: \"\", option: 0, options: [] };\n}\n\nexport const Vote = {\n encode(message: Vote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.proposal_id !== \"0\") {\n writer.uint32(8).uint64(message.proposal_id);\n }\n if (message.voter !== \"\") {\n writer.uint32(18).string(message.voter);\n }\n if (message.option !== 0) {\n writer.uint32(24).int32(message.option);\n }\n for (const v of message.options) {\n WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Vote {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVote();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.proposal_id = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.voter = reader.string();\n break;\n case 3:\n message.option = reader.int32() as any;\n break;\n case 4:\n message.options.push(\n WeightedVoteOption.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Vote {\n return {\n proposal_id: isSet(object.proposal_id) ? String(object.proposal_id) : \"0\",\n voter: isSet(object.voter) ? String(object.voter) : \"\",\n option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0,\n options: Array.isArray(object?.options)\n ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Vote): unknown {\n const obj: any = {};\n message.proposal_id !== undefined &&\n (obj.proposal_id = message.proposal_id);\n message.voter !== undefined && (obj.voter = message.voter);\n message.option !== undefined &&\n (obj.option = voteOptionToJSON(message.option));\n if (message.options) {\n obj.options = message.options.map((e) =>\n e ? WeightedVoteOption.toJSON(e) : undefined,\n );\n } else {\n obj.options = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Vote {\n const message = createBaseVote();\n message.proposal_id = object.proposal_id ?? \"0\";\n message.voter = object.voter ?? \"\";\n message.option = object.option ?? 0;\n message.options =\n object.options?.map((e) => WeightedVoteOption.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseDepositParams(): DepositParams {\n return {\n min_deposit: [],\n max_deposit_period: undefined,\n min_expedited_deposit: [],\n };\n}\n\nexport const DepositParams = {\n encode(\n message: DepositParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.min_deposit) {\n Coin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.max_deposit_period !== undefined) {\n Duration.encode(\n message.max_deposit_period,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n for (const v of message.min_expedited_deposit) {\n Coin.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DepositParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDepositParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.min_deposit.push(Coin.decode(reader, reader.uint32()));\n break;\n case 2:\n message.max_deposit_period = Duration.decode(reader, reader.uint32());\n break;\n case 3:\n message.min_expedited_deposit.push(\n Coin.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DepositParams {\n return {\n min_deposit: Array.isArray(object?.min_deposit)\n ? object.min_deposit.map((e: any) => Coin.fromJSON(e))\n : [],\n max_deposit_period: isSet(object.max_deposit_period)\n ? Duration.fromJSON(object.max_deposit_period)\n : undefined,\n min_expedited_deposit: Array.isArray(object?.min_expedited_deposit)\n ? object.min_expedited_deposit.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: DepositParams): unknown {\n const obj: any = {};\n if (message.min_deposit) {\n obj.min_deposit = message.min_deposit.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.min_deposit = [];\n }\n message.max_deposit_period !== undefined &&\n (obj.max_deposit_period = message.max_deposit_period\n ? Duration.toJSON(message.max_deposit_period)\n : undefined);\n if (message.min_expedited_deposit) {\n obj.min_expedited_deposit = message.min_expedited_deposit.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.min_expedited_deposit = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): DepositParams {\n const message = createBaseDepositParams();\n message.min_deposit =\n object.min_deposit?.map((e) => Coin.fromPartial(e)) || [];\n message.max_deposit_period =\n object.max_deposit_period !== undefined &&\n object.max_deposit_period !== null\n ? Duration.fromPartial(object.max_deposit_period)\n : undefined;\n message.min_expedited_deposit =\n object.min_expedited_deposit?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseVotingParams(): VotingParams {\n return { voting_period: undefined, expedited_voting_period: undefined };\n}\n\nexport const VotingParams = {\n encode(\n message: VotingParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.voting_period !== undefined) {\n Duration.encode(message.voting_period, writer.uint32(10).fork()).ldelim();\n }\n if (message.expedited_voting_period !== undefined) {\n Duration.encode(\n message.expedited_voting_period,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): VotingParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVotingParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.voting_period = Duration.decode(reader, reader.uint32());\n break;\n case 3:\n message.expedited_voting_period = Duration.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): VotingParams {\n return {\n voting_period: isSet(object.voting_period)\n ? Duration.fromJSON(object.voting_period)\n : undefined,\n expedited_voting_period: isSet(object.expedited_voting_period)\n ? Duration.fromJSON(object.expedited_voting_period)\n : undefined,\n };\n },\n\n toJSON(message: VotingParams): unknown {\n const obj: any = {};\n message.voting_period !== undefined &&\n (obj.voting_period = message.voting_period\n ? Duration.toJSON(message.voting_period)\n : undefined);\n message.expedited_voting_period !== undefined &&\n (obj.expedited_voting_period = message.expedited_voting_period\n ? Duration.toJSON(message.expedited_voting_period)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): VotingParams {\n const message = createBaseVotingParams();\n message.voting_period =\n object.voting_period !== undefined && object.voting_period !== null\n ? Duration.fromPartial(object.voting_period)\n : undefined;\n message.expedited_voting_period =\n object.expedited_voting_period !== undefined &&\n object.expedited_voting_period !== null\n ? Duration.fromPartial(object.expedited_voting_period)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseTallyParams(): TallyParams {\n return {\n quorum: new Uint8Array(),\n threshold: new Uint8Array(),\n veto_threshold: new Uint8Array(),\n expedited_threshold: new Uint8Array(),\n };\n}\n\nexport const TallyParams = {\n encode(\n message: TallyParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.quorum.length !== 0) {\n writer.uint32(10).bytes(message.quorum);\n }\n if (message.threshold.length !== 0) {\n writer.uint32(18).bytes(message.threshold);\n }\n if (message.veto_threshold.length !== 0) {\n writer.uint32(26).bytes(message.veto_threshold);\n }\n if (message.expedited_threshold.length !== 0) {\n writer.uint32(34).bytes(message.expedited_threshold);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TallyParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTallyParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.quorum = reader.bytes();\n break;\n case 2:\n message.threshold = reader.bytes();\n break;\n case 3:\n message.veto_threshold = reader.bytes();\n break;\n case 4:\n message.expedited_threshold = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TallyParams {\n return {\n quorum: isSet(object.quorum)\n ? bytesFromBase64(object.quorum)\n : new Uint8Array(),\n threshold: isSet(object.threshold)\n ? bytesFromBase64(object.threshold)\n : new Uint8Array(),\n veto_threshold: isSet(object.veto_threshold)\n ? bytesFromBase64(object.veto_threshold)\n : new Uint8Array(),\n expedited_threshold: isSet(object.expedited_threshold)\n ? bytesFromBase64(object.expedited_threshold)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: TallyParams): unknown {\n const obj: any = {};\n message.quorum !== undefined &&\n (obj.quorum = base64FromBytes(\n message.quorum !== undefined ? message.quorum : new Uint8Array(),\n ));\n message.threshold !== undefined &&\n (obj.threshold = base64FromBytes(\n message.threshold !== undefined ? message.threshold : new Uint8Array(),\n ));\n message.veto_threshold !== undefined &&\n (obj.veto_threshold = base64FromBytes(\n message.veto_threshold !== undefined\n ? message.veto_threshold\n : new Uint8Array(),\n ));\n message.expedited_threshold !== undefined &&\n (obj.expedited_threshold = base64FromBytes(\n message.expedited_threshold !== undefined\n ? message.expedited_threshold\n : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): TallyParams {\n const message = createBaseTallyParams();\n message.quorum = object.quorum ?? new Uint8Array();\n message.threshold = object.threshold ?? new Uint8Array();\n message.veto_threshold = object.veto_threshold ?? new Uint8Array();\n message.expedited_threshold =\n object.expedited_threshold ?? new Uint8Array();\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1_000).toString();\n const nanos = (date.getTime() % 1_000) * 1_000_000;\n return { seconds, nanos };\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1_000;\n millis += t.nanos / 1_000_000;\n return new Date(millis);\n}\n\nfunction fromJsonTimestamp(o: any): Timestamp {\n if (o instanceof Date) {\n return toTimestamp(o);\n } else if (typeof o === \"string\") {\n return toTimestamp(new Date(o));\n } else {\n return Timestamp.fromJSON(o);\n }\n}\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../google/protobuf/any\";\nimport {\n VoteOption,\n WeightedVoteOption,\n voteOptionFromJSON,\n voteOptionToJSON,\n} from \"./gov\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.gov.v1beta1\";\n\n/**\n * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary\n * proposal Content.\n */\nexport interface MsgSubmitProposal {\n content?: Any;\n initial_deposit: Coin[];\n proposer: string;\n is_expedited: boolean;\n}\n\n/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */\nexport interface MsgSubmitProposalResponse {\n proposal_id: string;\n}\n\n/** MsgVote defines a message to cast a vote. */\nexport interface MsgVote {\n proposal_id: string;\n voter: string;\n option: VoteOption;\n}\n\n/** MsgVoteResponse defines the Msg/Vote response type. */\nexport interface MsgVoteResponse {}\n\n/**\n * MsgVoteWeighted defines a message to cast a vote.\n *\n * Since: cosmos-sdk 0.43\n */\nexport interface MsgVoteWeighted {\n proposal_id: string;\n voter: string;\n options: WeightedVoteOption[];\n}\n\n/**\n * MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.\n *\n * Since: cosmos-sdk 0.43\n */\nexport interface MsgVoteWeightedResponse {}\n\n/** MsgDeposit defines a message to submit a deposit to an existing proposal. */\nexport interface MsgDeposit {\n proposal_id: string;\n depositor: string;\n amount: Coin[];\n}\n\n/** MsgDepositResponse defines the Msg/Deposit response type. */\nexport interface MsgDepositResponse {}\n\nfunction createBaseMsgSubmitProposal(): MsgSubmitProposal {\n return {\n content: undefined,\n initial_deposit: [],\n proposer: \"\",\n is_expedited: false,\n };\n}\n\nexport const MsgSubmitProposal = {\n encode(\n message: MsgSubmitProposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.content !== undefined) {\n Any.encode(message.content, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.initial_deposit) {\n Coin.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n if (message.proposer !== \"\") {\n writer.uint32(26).string(message.proposer);\n }\n if (message.is_expedited === true) {\n writer.uint32(32).bool(message.is_expedited);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgSubmitProposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSubmitProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.content = Any.decode(reader, reader.uint32());\n break;\n case 2:\n message.initial_deposit.push(Coin.decode(reader, reader.uint32()));\n break;\n case 3:\n message.proposer = reader.string();\n break;\n case 4:\n message.is_expedited = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgSubmitProposal {\n return {\n content: isSet(object.content) ? Any.fromJSON(object.content) : undefined,\n initial_deposit: Array.isArray(object?.initial_deposit)\n ? object.initial_deposit.map((e: any) => Coin.fromJSON(e))\n : [],\n proposer: isSet(object.proposer) ? String(object.proposer) : \"\",\n is_expedited: isSet(object.is_expedited)\n ? Boolean(object.is_expedited)\n : false,\n };\n },\n\n toJSON(message: MsgSubmitProposal): unknown {\n const obj: any = {};\n message.content !== undefined &&\n (obj.content = message.content ? Any.toJSON(message.content) : undefined);\n if (message.initial_deposit) {\n obj.initial_deposit = message.initial_deposit.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.initial_deposit = [];\n }\n message.proposer !== undefined && (obj.proposer = message.proposer);\n message.is_expedited !== undefined &&\n (obj.is_expedited = message.is_expedited);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgSubmitProposal {\n const message = createBaseMsgSubmitProposal();\n message.content =\n object.content !== undefined && object.content !== null\n ? Any.fromPartial(object.content)\n : undefined;\n message.initial_deposit =\n object.initial_deposit?.map((e) => Coin.fromPartial(e)) || [];\n message.proposer = object.proposer ?? \"\";\n message.is_expedited = object.is_expedited ?? false;\n return message;\n },\n};\n\nfunction createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse {\n return { proposal_id: \"0\" };\n}\n\nexport const MsgSubmitProposalResponse = {\n encode(\n message: MsgSubmitProposalResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.proposal_id !== \"0\") {\n writer.uint32(8).uint64(message.proposal_id);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgSubmitProposalResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSubmitProposalResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.proposal_id = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgSubmitProposalResponse {\n return {\n proposal_id: isSet(object.proposal_id) ? String(object.proposal_id) : \"0\",\n };\n },\n\n toJSON(message: MsgSubmitProposalResponse): unknown {\n const obj: any = {};\n message.proposal_id !== undefined &&\n (obj.proposal_id = message.proposal_id);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgSubmitProposalResponse {\n const message = createBaseMsgSubmitProposalResponse();\n message.proposal_id = object.proposal_id ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseMsgVote(): MsgVote {\n return { proposal_id: \"0\", voter: \"\", option: 0 };\n}\n\nexport const MsgVote = {\n encode(\n message: MsgVote,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.proposal_id !== \"0\") {\n writer.uint32(8).uint64(message.proposal_id);\n }\n if (message.voter !== \"\") {\n writer.uint32(18).string(message.voter);\n }\n if (message.option !== 0) {\n writer.uint32(24).int32(message.option);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgVote {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgVote();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.proposal_id = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.voter = reader.string();\n break;\n case 3:\n message.option = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgVote {\n return {\n proposal_id: isSet(object.proposal_id) ? String(object.proposal_id) : \"0\",\n voter: isSet(object.voter) ? String(object.voter) : \"\",\n option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0,\n };\n },\n\n toJSON(message: MsgVote): unknown {\n const obj: any = {};\n message.proposal_id !== undefined &&\n (obj.proposal_id = message.proposal_id);\n message.voter !== undefined && (obj.voter = message.voter);\n message.option !== undefined &&\n (obj.option = voteOptionToJSON(message.option));\n return obj;\n },\n\n fromPartial, I>>(object: I): MsgVote {\n const message = createBaseMsgVote();\n message.proposal_id = object.proposal_id ?? \"0\";\n message.voter = object.voter ?? \"\";\n message.option = object.option ?? 0;\n return message;\n },\n};\n\nfunction createBaseMsgVoteResponse(): MsgVoteResponse {\n return {};\n}\n\nexport const MsgVoteResponse = {\n encode(\n _: MsgVoteResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgVoteResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgVoteResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgVoteResponse {\n return {};\n },\n\n toJSON(_: MsgVoteResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgVoteResponse {\n const message = createBaseMsgVoteResponse();\n return message;\n },\n};\n\nfunction createBaseMsgVoteWeighted(): MsgVoteWeighted {\n return { proposal_id: \"0\", voter: \"\", options: [] };\n}\n\nexport const MsgVoteWeighted = {\n encode(\n message: MsgVoteWeighted,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.proposal_id !== \"0\") {\n writer.uint32(8).uint64(message.proposal_id);\n }\n if (message.voter !== \"\") {\n writer.uint32(18).string(message.voter);\n }\n for (const v of message.options) {\n WeightedVoteOption.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgVoteWeighted {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgVoteWeighted();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.proposal_id = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.voter = reader.string();\n break;\n case 3:\n message.options.push(\n WeightedVoteOption.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgVoteWeighted {\n return {\n proposal_id: isSet(object.proposal_id) ? String(object.proposal_id) : \"0\",\n voter: isSet(object.voter) ? String(object.voter) : \"\",\n options: Array.isArray(object?.options)\n ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: MsgVoteWeighted): unknown {\n const obj: any = {};\n message.proposal_id !== undefined &&\n (obj.proposal_id = message.proposal_id);\n message.voter !== undefined && (obj.voter = message.voter);\n if (message.options) {\n obj.options = message.options.map((e) =>\n e ? WeightedVoteOption.toJSON(e) : undefined,\n );\n } else {\n obj.options = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgVoteWeighted {\n const message = createBaseMsgVoteWeighted();\n message.proposal_id = object.proposal_id ?? \"0\";\n message.voter = object.voter ?? \"\";\n message.options =\n object.options?.map((e) => WeightedVoteOption.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseMsgVoteWeightedResponse(): MsgVoteWeightedResponse {\n return {};\n}\n\nexport const MsgVoteWeightedResponse = {\n encode(\n _: MsgVoteWeightedResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgVoteWeightedResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgVoteWeightedResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgVoteWeightedResponse {\n return {};\n },\n\n toJSON(_: MsgVoteWeightedResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgVoteWeightedResponse {\n const message = createBaseMsgVoteWeightedResponse();\n return message;\n },\n};\n\nfunction createBaseMsgDeposit(): MsgDeposit {\n return { proposal_id: \"0\", depositor: \"\", amount: [] };\n}\n\nexport const MsgDeposit = {\n encode(\n message: MsgDeposit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.proposal_id !== \"0\") {\n writer.uint32(8).uint64(message.proposal_id);\n }\n if (message.depositor !== \"\") {\n writer.uint32(18).string(message.depositor);\n }\n for (const v of message.amount) {\n Coin.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeposit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgDeposit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.proposal_id = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.depositor = reader.string();\n break;\n case 3:\n message.amount.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgDeposit {\n return {\n proposal_id: isSet(object.proposal_id) ? String(object.proposal_id) : \"0\",\n depositor: isSet(object.depositor) ? String(object.depositor) : \"\",\n amount: Array.isArray(object?.amount)\n ? object.amount.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: MsgDeposit): unknown {\n const obj: any = {};\n message.proposal_id !== undefined &&\n (obj.proposal_id = message.proposal_id);\n message.depositor !== undefined && (obj.depositor = message.depositor);\n if (message.amount) {\n obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.amount = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgDeposit {\n const message = createBaseMsgDeposit();\n message.proposal_id = object.proposal_id ?? \"0\";\n message.depositor = object.depositor ?? \"\";\n message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseMsgDepositResponse(): MsgDepositResponse {\n return {};\n}\n\nexport const MsgDepositResponse = {\n encode(\n _: MsgDepositResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgDepositResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgDepositResponse {\n return {};\n },\n\n toJSON(_: MsgDepositResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgDepositResponse {\n const message = createBaseMsgDepositResponse();\n return message;\n },\n};\n\n/** Msg defines the bank Msg service. */\nexport interface Msg {\n /** SubmitProposal defines a method to create new proposal given a content. */\n SubmitProposal(\n request: MsgSubmitProposal,\n ): Promise;\n /** Vote defines a method to add a vote on a specific proposal. */\n Vote(request: MsgVote): Promise;\n /**\n * VoteWeighted defines a method to add a weighted vote on a specific proposal.\n *\n * Since: cosmos-sdk 0.43\n */\n VoteWeighted(request: MsgVoteWeighted): Promise;\n /** Deposit defines a method to add deposit on a specific proposal. */\n Deposit(request: MsgDeposit): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.SubmitProposal = this.SubmitProposal.bind(this);\n this.Vote = this.Vote.bind(this);\n this.VoteWeighted = this.VoteWeighted.bind(this);\n this.Deposit = this.Deposit.bind(this);\n }\n SubmitProposal(\n request: MsgSubmitProposal,\n ): Promise {\n const data = MsgSubmitProposal.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.gov.v1beta1.Msg\",\n \"SubmitProposal\",\n data,\n );\n return promise.then((data) =>\n MsgSubmitProposalResponse.decode(new _m0.Reader(data)),\n );\n }\n\n Vote(request: MsgVote): Promise {\n const data = MsgVote.encode(request).finish();\n const promise = this.rpc.request(\"cosmos.gov.v1beta1.Msg\", \"Vote\", data);\n return promise.then((data) => MsgVoteResponse.decode(new _m0.Reader(data)));\n }\n\n VoteWeighted(request: MsgVoteWeighted): Promise {\n const data = MsgVoteWeighted.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.gov.v1beta1.Msg\",\n \"VoteWeighted\",\n data,\n );\n return promise.then((data) =>\n MsgVoteWeightedResponse.decode(new _m0.Reader(data)),\n );\n }\n\n Deposit(request: MsgDeposit): Promise {\n const data = MsgDeposit.encode(request).finish();\n const promise = this.rpc.request(\"cosmos.gov.v1beta1.Msg\", \"Deposit\", data);\n return promise.then((data) =>\n MsgDepositResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"cosmos.params.v1beta1\";\n\n/** ParameterChangeProposal defines a proposal to change one or more parameters. */\nexport interface ParameterChangeProposal {\n title: string;\n description: string;\n changes: ParamChange[];\n}\n\n/**\n * ParamChange defines an individual parameter change, for use in\n * ParameterChangeProposal.\n */\nexport interface ParamChange {\n subspace: string;\n key: string;\n value: string;\n}\n\nfunction createBaseParameterChangeProposal(): ParameterChangeProposal {\n return { title: \"\", description: \"\", changes: [] };\n}\n\nexport const ParameterChangeProposal = {\n encode(\n message: ParameterChangeProposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.title !== \"\") {\n writer.uint32(10).string(message.title);\n }\n if (message.description !== \"\") {\n writer.uint32(18).string(message.description);\n }\n for (const v of message.changes) {\n ParamChange.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ParameterChangeProposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParameterChangeProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.title = reader.string();\n break;\n case 2:\n message.description = reader.string();\n break;\n case 3:\n message.changes.push(ParamChange.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ParameterChangeProposal {\n return {\n title: isSet(object.title) ? String(object.title) : \"\",\n description: isSet(object.description) ? String(object.description) : \"\",\n changes: Array.isArray(object?.changes)\n ? object.changes.map((e: any) => ParamChange.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ParameterChangeProposal): unknown {\n const obj: any = {};\n message.title !== undefined && (obj.title = message.title);\n message.description !== undefined &&\n (obj.description = message.description);\n if (message.changes) {\n obj.changes = message.changes.map((e) =>\n e ? ParamChange.toJSON(e) : undefined,\n );\n } else {\n obj.changes = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ParameterChangeProposal {\n const message = createBaseParameterChangeProposal();\n message.title = object.title ?? \"\";\n message.description = object.description ?? \"\";\n message.changes =\n object.changes?.map((e) => ParamChange.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseParamChange(): ParamChange {\n return { subspace: \"\", key: \"\", value: \"\" };\n}\n\nexport const ParamChange = {\n encode(\n message: ParamChange,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.subspace !== \"\") {\n writer.uint32(10).string(message.subspace);\n }\n if (message.key !== \"\") {\n writer.uint32(18).string(message.key);\n }\n if (message.value !== \"\") {\n writer.uint32(26).string(message.value);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ParamChange {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParamChange();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.subspace = reader.string();\n break;\n case 2:\n message.key = reader.string();\n break;\n case 3:\n message.value = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ParamChange {\n return {\n subspace: isSet(object.subspace) ? String(object.subspace) : \"\",\n key: isSet(object.key) ? String(object.key) : \"\",\n value: isSet(object.value) ? String(object.value) : \"\",\n };\n },\n\n toJSON(message: ParamChange): unknown {\n const obj: any = {};\n message.subspace !== undefined && (obj.subspace = message.subspace);\n message.key !== undefined && (obj.key = message.key);\n message.value !== undefined && (obj.value = message.value);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ParamChange {\n const message = createBaseParamChange();\n message.subspace = object.subspace ?? \"\";\n message.key = object.key ?? \"\";\n message.value = object.value ?? \"\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"cosmos.slashing.v1beta1\";\n\n/** MsgUnjail defines the Msg/Unjail request type */\nexport interface MsgUnjail {\n validator_addr: string;\n}\n\n/** MsgUnjailResponse defines the Msg/Unjail response type */\nexport interface MsgUnjailResponse {}\n\nfunction createBaseMsgUnjail(): MsgUnjail {\n return { validator_addr: \"\" };\n}\n\nexport const MsgUnjail = {\n encode(\n message: MsgUnjail,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.validator_addr !== \"\") {\n writer.uint32(10).string(message.validator_addr);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgUnjail {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUnjail();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.validator_addr = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgUnjail {\n return {\n validator_addr: isSet(object.validator_addr)\n ? String(object.validator_addr)\n : \"\",\n };\n },\n\n toJSON(message: MsgUnjail): unknown {\n const obj: any = {};\n message.validator_addr !== undefined &&\n (obj.validator_addr = message.validator_addr);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgUnjail {\n const message = createBaseMsgUnjail();\n message.validator_addr = object.validator_addr ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgUnjailResponse(): MsgUnjailResponse {\n return {};\n}\n\nexport const MsgUnjailResponse = {\n encode(\n _: MsgUnjailResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgUnjailResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUnjailResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgUnjailResponse {\n return {};\n },\n\n toJSON(_: MsgUnjailResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgUnjailResponse {\n const message = createBaseMsgUnjailResponse();\n return message;\n },\n};\n\n/** Msg defines the slashing Msg service. */\nexport interface Msg {\n /**\n * Unjail defines a method for unjailing a jailed validator, thus returning\n * them into the bonded validator set, so they can begin receiving provisions\n * and rewards again.\n */\n Unjail(request: MsgUnjail): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.Unjail = this.Unjail.bind(this);\n }\n Unjail(request: MsgUnjail): Promise {\n const data = MsgUnjail.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.slashing.v1beta1.Msg\",\n \"Unjail\",\n data,\n );\n return promise.then((data) =>\n MsgUnjailResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.staking.v1beta1\";\n\n/**\n * AuthorizationType defines the type of staking module authorization type\n *\n * Since: cosmos-sdk 0.43\n */\nexport enum AuthorizationType {\n /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */\n AUTHORIZATION_TYPE_UNSPECIFIED = 0,\n /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */\n AUTHORIZATION_TYPE_DELEGATE = 1,\n /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */\n AUTHORIZATION_TYPE_UNDELEGATE = 2,\n /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */\n AUTHORIZATION_TYPE_REDELEGATE = 3,\n UNRECOGNIZED = -1,\n}\n\nexport function authorizationTypeFromJSON(object: any): AuthorizationType {\n switch (object) {\n case 0:\n case \"AUTHORIZATION_TYPE_UNSPECIFIED\":\n return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED;\n case 1:\n case \"AUTHORIZATION_TYPE_DELEGATE\":\n return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE;\n case 2:\n case \"AUTHORIZATION_TYPE_UNDELEGATE\":\n return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE;\n case 3:\n case \"AUTHORIZATION_TYPE_REDELEGATE\":\n return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return AuthorizationType.UNRECOGNIZED;\n }\n}\n\nexport function authorizationTypeToJSON(object: AuthorizationType): string {\n switch (object) {\n case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED:\n return \"AUTHORIZATION_TYPE_UNSPECIFIED\";\n case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE:\n return \"AUTHORIZATION_TYPE_DELEGATE\";\n case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE:\n return \"AUTHORIZATION_TYPE_UNDELEGATE\";\n case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE:\n return \"AUTHORIZATION_TYPE_REDELEGATE\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * StakeAuthorization defines authorization for delegate/undelegate/redelegate.\n *\n * Since: cosmos-sdk 0.43\n */\nexport interface StakeAuthorization {\n /**\n * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is\n * empty, there is no spend limit and any amount of coins can be delegated.\n */\n max_tokens?: Coin;\n /**\n * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's\n * account.\n */\n allow_list?: StakeAuthorization_Validators | undefined;\n /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */\n deny_list?: StakeAuthorization_Validators | undefined;\n /** authorization_type defines one of AuthorizationType. */\n authorization_type: AuthorizationType;\n}\n\n/** Validators defines list of validator addresses. */\nexport interface StakeAuthorization_Validators {\n address: string[];\n}\n\nfunction createBaseStakeAuthorization(): StakeAuthorization {\n return {\n max_tokens: undefined,\n allow_list: undefined,\n deny_list: undefined,\n authorization_type: 0,\n };\n}\n\nexport const StakeAuthorization = {\n encode(\n message: StakeAuthorization,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.max_tokens !== undefined) {\n Coin.encode(message.max_tokens, writer.uint32(10).fork()).ldelim();\n }\n if (message.allow_list !== undefined) {\n StakeAuthorization_Validators.encode(\n message.allow_list,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.deny_list !== undefined) {\n StakeAuthorization_Validators.encode(\n message.deny_list,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n if (message.authorization_type !== 0) {\n writer.uint32(32).int32(message.authorization_type);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): StakeAuthorization {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseStakeAuthorization();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.max_tokens = Coin.decode(reader, reader.uint32());\n break;\n case 2:\n message.allow_list = StakeAuthorization_Validators.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 3:\n message.deny_list = StakeAuthorization_Validators.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 4:\n message.authorization_type = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): StakeAuthorization {\n return {\n max_tokens: isSet(object.max_tokens)\n ? Coin.fromJSON(object.max_tokens)\n : undefined,\n allow_list: isSet(object.allow_list)\n ? StakeAuthorization_Validators.fromJSON(object.allow_list)\n : undefined,\n deny_list: isSet(object.deny_list)\n ? StakeAuthorization_Validators.fromJSON(object.deny_list)\n : undefined,\n authorization_type: isSet(object.authorization_type)\n ? authorizationTypeFromJSON(object.authorization_type)\n : 0,\n };\n },\n\n toJSON(message: StakeAuthorization): unknown {\n const obj: any = {};\n message.max_tokens !== undefined &&\n (obj.max_tokens = message.max_tokens\n ? Coin.toJSON(message.max_tokens)\n : undefined);\n message.allow_list !== undefined &&\n (obj.allow_list = message.allow_list\n ? StakeAuthorization_Validators.toJSON(message.allow_list)\n : undefined);\n message.deny_list !== undefined &&\n (obj.deny_list = message.deny_list\n ? StakeAuthorization_Validators.toJSON(message.deny_list)\n : undefined);\n message.authorization_type !== undefined &&\n (obj.authorization_type = authorizationTypeToJSON(\n message.authorization_type,\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): StakeAuthorization {\n const message = createBaseStakeAuthorization();\n message.max_tokens =\n object.max_tokens !== undefined && object.max_tokens !== null\n ? Coin.fromPartial(object.max_tokens)\n : undefined;\n message.allow_list =\n object.allow_list !== undefined && object.allow_list !== null\n ? StakeAuthorization_Validators.fromPartial(object.allow_list)\n : undefined;\n message.deny_list =\n object.deny_list !== undefined && object.deny_list !== null\n ? StakeAuthorization_Validators.fromPartial(object.deny_list)\n : undefined;\n message.authorization_type = object.authorization_type ?? 0;\n return message;\n },\n};\n\nfunction createBaseStakeAuthorization_Validators(): StakeAuthorization_Validators {\n return { address: [] };\n}\n\nexport const StakeAuthorization_Validators = {\n encode(\n message: StakeAuthorization_Validators,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.address) {\n writer.uint32(10).string(v!);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): StakeAuthorization_Validators {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseStakeAuthorization_Validators();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.address.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): StakeAuthorization_Validators {\n return {\n address: Array.isArray(object?.address)\n ? object.address.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: StakeAuthorization_Validators): unknown {\n const obj: any = {};\n if (message.address) {\n obj.address = message.address.map((e) => e);\n } else {\n obj.address = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): StakeAuthorization_Validators {\n const message = createBaseStakeAuthorization_Validators();\n message.address = object.address?.map((e) => e) || [];\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Header } from \"../../../tendermint/types/types\";\nimport { Timestamp } from \"../../../google/protobuf/timestamp\";\nimport { Any } from \"../../../google/protobuf/any\";\nimport { Duration } from \"../../../google/protobuf/duration\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.staking.v1beta1\";\n\n/** BondStatus is the status of a validator. */\nexport enum BondStatus {\n /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */\n BOND_STATUS_UNSPECIFIED = 0,\n /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */\n BOND_STATUS_UNBONDED = 1,\n /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */\n BOND_STATUS_UNBONDING = 2,\n /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */\n BOND_STATUS_BONDED = 3,\n UNRECOGNIZED = -1,\n}\n\nexport function bondStatusFromJSON(object: any): BondStatus {\n switch (object) {\n case 0:\n case \"BOND_STATUS_UNSPECIFIED\":\n return BondStatus.BOND_STATUS_UNSPECIFIED;\n case 1:\n case \"BOND_STATUS_UNBONDED\":\n return BondStatus.BOND_STATUS_UNBONDED;\n case 2:\n case \"BOND_STATUS_UNBONDING\":\n return BondStatus.BOND_STATUS_UNBONDING;\n case 3:\n case \"BOND_STATUS_BONDED\":\n return BondStatus.BOND_STATUS_BONDED;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return BondStatus.UNRECOGNIZED;\n }\n}\n\nexport function bondStatusToJSON(object: BondStatus): string {\n switch (object) {\n case BondStatus.BOND_STATUS_UNSPECIFIED:\n return \"BOND_STATUS_UNSPECIFIED\";\n case BondStatus.BOND_STATUS_UNBONDED:\n return \"BOND_STATUS_UNBONDED\";\n case BondStatus.BOND_STATUS_UNBONDING:\n return \"BOND_STATUS_UNBONDING\";\n case BondStatus.BOND_STATUS_BONDED:\n return \"BOND_STATUS_BONDED\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * HistoricalInfo contains header and validator information for a given block.\n * It is stored as part of staking module's state, which persists the `n` most\n * recent HistoricalInfo\n * (`n` is set by the staking module's `historical_entries` parameter).\n */\nexport interface HistoricalInfo {\n header?: Header;\n valset: Validator[];\n}\n\n/**\n * CommissionRates defines the initial commission rates to be used for creating\n * a validator.\n */\nexport interface CommissionRates {\n /** rate is the commission rate charged to delegators, as a fraction. */\n rate: string;\n /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */\n max_rate: string;\n /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */\n max_change_rate: string;\n}\n\n/** Commission defines commission parameters for a given validator. */\nexport interface Commission {\n /** commission_rates defines the initial commission rates to be used for creating a validator. */\n commission_rates?: CommissionRates;\n /** update_time is the last time the commission rate was changed. */\n update_time?: Timestamp;\n}\n\n/** Description defines a validator description. */\nexport interface Description {\n /** moniker defines a human-readable name for the validator. */\n moniker: string;\n /** identity defines an optional identity signature (ex. UPort or Keybase). */\n identity: string;\n /** website defines an optional website link. */\n website: string;\n /** security_contact defines an optional email for security contact. */\n security_contact: string;\n /** details define other optional details. */\n details: string;\n}\n\n/**\n * Validator defines a validator, together with the total amount of the\n * Validator's bond shares and their exchange rate to coins. Slashing results in\n * a decrease in the exchange rate, allowing correct calculation of future\n * undelegations without iterating over delegators. When coins are delegated to\n * this validator, the validator is credited with a delegation whose number of\n * bond shares is based on the amount of coins delegated divided by the current\n * exchange rate. Voting power can be calculated as total bonded shares\n * multiplied by exchange rate.\n */\nexport interface Validator {\n /** operator_address defines the address of the validator's operator; bech encoded in JSON. */\n operator_address: string;\n /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */\n consensus_pubkey?: Any;\n /** jailed defined whether the validator has been jailed from bonded status or not. */\n jailed: boolean;\n /** status is the validator status (bonded/unbonding/unbonded). */\n status: BondStatus;\n /** tokens define the delegated tokens (incl. self-delegation). */\n tokens: string;\n /** delegator_shares defines total shares issued to a validator's delegators. */\n delegator_shares: string;\n /** description defines the description terms for the validator. */\n description?: Description;\n /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */\n unbonding_height: string;\n /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */\n unbonding_time?: Timestamp;\n /** commission defines the commission parameters. */\n commission?: Commission;\n /** min_self_delegation is the validator's self declared minimum self delegation. */\n min_self_delegation: string;\n}\n\n/** ValAddresses defines a repeated set of validator addresses. */\nexport interface ValAddresses {\n addresses: string[];\n}\n\n/**\n * DVPair is struct that just has a delegator-validator pair with no other data.\n * It is intended to be used as a marshalable pointer. For example, a DVPair can\n * be used to construct the key to getting an UnbondingDelegation from state.\n */\nexport interface DVPair {\n delegator_address: string;\n validator_address: string;\n}\n\n/** DVPairs defines an array of DVPair objects. */\nexport interface DVPairs {\n pairs: DVPair[];\n}\n\n/**\n * DVVTriplet is struct that just has a delegator-validator-validator triplet\n * with no other data. It is intended to be used as a marshalable pointer. For\n * example, a DVVTriplet can be used to construct the key to getting a\n * Redelegation from state.\n */\nexport interface DVVTriplet {\n delegator_address: string;\n validator_src_address: string;\n validator_dst_address: string;\n}\n\n/** DVVTriplets defines an array of DVVTriplet objects. */\nexport interface DVVTriplets {\n triplets: DVVTriplet[];\n}\n\n/**\n * Delegation represents the bond with tokens held by an account. It is\n * owned by one delegator, and is associated with the voting power of one\n * validator.\n */\nexport interface Delegation {\n /** delegator_address is the bech32-encoded address of the delegator. */\n delegator_address: string;\n /** validator_address is the bech32-encoded address of the validator. */\n validator_address: string;\n /** shares define the delegation shares received. */\n shares: string;\n}\n\n/**\n * UnbondingDelegation stores all of a single delegator's unbonding bonds\n * for a single validator in an time-ordered list.\n */\nexport interface UnbondingDelegation {\n /** delegator_address is the bech32-encoded address of the delegator. */\n delegator_address: string;\n /** validator_address is the bech32-encoded address of the validator. */\n validator_address: string;\n /** entries are the unbonding delegation entries. */\n entries: UnbondingDelegationEntry[];\n}\n\n/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */\nexport interface UnbondingDelegationEntry {\n /** creation_height is the height which the unbonding took place. */\n creation_height: string;\n /** completion_time is the unix time for unbonding completion. */\n completion_time?: Timestamp;\n /** initial_balance defines the tokens initially scheduled to receive at completion. */\n initial_balance: string;\n /** balance defines the tokens to receive at completion. */\n balance: string;\n}\n\n/** RedelegationEntry defines a redelegation object with relevant metadata. */\nexport interface RedelegationEntry {\n /** creation_height defines the height which the redelegation took place. */\n creation_height: string;\n /** completion_time defines the unix time for redelegation completion. */\n completion_time?: Timestamp;\n /** initial_balance defines the initial balance when redelegation started. */\n initial_balance: string;\n /** shares_dst is the amount of destination-validator shares created by redelegation. */\n shares_dst: string;\n}\n\n/**\n * Redelegation contains the list of a particular delegator's redelegating bonds\n * from a particular source validator to a particular destination validator.\n */\nexport interface Redelegation {\n /** delegator_address is the bech32-encoded address of the delegator. */\n delegator_address: string;\n /** validator_src_address is the validator redelegation source operator address. */\n validator_src_address: string;\n /** validator_dst_address is the validator redelegation destination operator address. */\n validator_dst_address: string;\n /** entries are the redelegation entries. */\n entries: RedelegationEntry[];\n}\n\n/** Params defines the parameters for the staking module. */\nexport interface Params {\n /** unbonding_time is the time duration of unbonding. */\n unbonding_time?: Duration;\n /** max_validators is the maximum number of validators. */\n max_validators: number;\n /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */\n max_entries: number;\n /** historical_entries is the number of historical entries to persist. */\n historical_entries: number;\n /** bond_denom defines the bondable coin denomination. */\n bond_denom: string;\n}\n\n/**\n * DelegationResponse is equivalent to Delegation except that it contains a\n * balance in addition to shares which is more suitable for client responses.\n */\nexport interface DelegationResponse {\n delegation?: Delegation;\n balance?: Coin;\n}\n\n/**\n * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it\n * contains a balance in addition to shares which is more suitable for client\n * responses.\n */\nexport interface RedelegationEntryResponse {\n redelegation_entry?: RedelegationEntry;\n balance: string;\n}\n\n/**\n * RedelegationResponse is equivalent to a Redelegation except that its entries\n * contain a balance in addition to shares which is more suitable for client\n * responses.\n */\nexport interface RedelegationResponse {\n redelegation?: Redelegation;\n entries: RedelegationEntryResponse[];\n}\n\n/**\n * Pool is used for tracking bonded and not-bonded token supply of the bond\n * denomination.\n */\nexport interface Pool {\n not_bonded_tokens: string;\n bonded_tokens: string;\n}\n\nfunction createBaseHistoricalInfo(): HistoricalInfo {\n return { header: undefined, valset: [] };\n}\n\nexport const HistoricalInfo = {\n encode(\n message: HistoricalInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.header !== undefined) {\n Header.encode(message.header, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.valset) {\n Validator.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): HistoricalInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseHistoricalInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.header = Header.decode(reader, reader.uint32());\n break;\n case 2:\n message.valset.push(Validator.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): HistoricalInfo {\n return {\n header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,\n valset: Array.isArray(object?.valset)\n ? object.valset.map((e: any) => Validator.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: HistoricalInfo): unknown {\n const obj: any = {};\n message.header !== undefined &&\n (obj.header = message.header ? Header.toJSON(message.header) : undefined);\n if (message.valset) {\n obj.valset = message.valset.map((e) =>\n e ? Validator.toJSON(e) : undefined,\n );\n } else {\n obj.valset = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): HistoricalInfo {\n const message = createBaseHistoricalInfo();\n message.header =\n object.header !== undefined && object.header !== null\n ? Header.fromPartial(object.header)\n : undefined;\n message.valset = object.valset?.map((e) => Validator.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseCommissionRates(): CommissionRates {\n return { rate: \"\", max_rate: \"\", max_change_rate: \"\" };\n}\n\nexport const CommissionRates = {\n encode(\n message: CommissionRates,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.rate !== \"\") {\n writer.uint32(10).string(message.rate);\n }\n if (message.max_rate !== \"\") {\n writer.uint32(18).string(message.max_rate);\n }\n if (message.max_change_rate !== \"\") {\n writer.uint32(26).string(message.max_change_rate);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): CommissionRates {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCommissionRates();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.rate = reader.string();\n break;\n case 2:\n message.max_rate = reader.string();\n break;\n case 3:\n message.max_change_rate = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CommissionRates {\n return {\n rate: isSet(object.rate) ? String(object.rate) : \"\",\n max_rate: isSet(object.max_rate) ? String(object.max_rate) : \"\",\n max_change_rate: isSet(object.max_change_rate)\n ? String(object.max_change_rate)\n : \"\",\n };\n },\n\n toJSON(message: CommissionRates): unknown {\n const obj: any = {};\n message.rate !== undefined && (obj.rate = message.rate);\n message.max_rate !== undefined && (obj.max_rate = message.max_rate);\n message.max_change_rate !== undefined &&\n (obj.max_change_rate = message.max_change_rate);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CommissionRates {\n const message = createBaseCommissionRates();\n message.rate = object.rate ?? \"\";\n message.max_rate = object.max_rate ?? \"\";\n message.max_change_rate = object.max_change_rate ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCommission(): Commission {\n return { commission_rates: undefined, update_time: undefined };\n}\n\nexport const Commission = {\n encode(\n message: Commission,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.commission_rates !== undefined) {\n CommissionRates.encode(\n message.commission_rates,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.update_time !== undefined) {\n Timestamp.encode(message.update_time, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Commission {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCommission();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.commission_rates = CommissionRates.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 2:\n message.update_time = Timestamp.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Commission {\n return {\n commission_rates: isSet(object.commission_rates)\n ? CommissionRates.fromJSON(object.commission_rates)\n : undefined,\n update_time: isSet(object.update_time)\n ? fromJsonTimestamp(object.update_time)\n : undefined,\n };\n },\n\n toJSON(message: Commission): unknown {\n const obj: any = {};\n message.commission_rates !== undefined &&\n (obj.commission_rates = message.commission_rates\n ? CommissionRates.toJSON(message.commission_rates)\n : undefined);\n message.update_time !== undefined &&\n (obj.update_time = fromTimestamp(message.update_time).toISOString());\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Commission {\n const message = createBaseCommission();\n message.commission_rates =\n object.commission_rates !== undefined && object.commission_rates !== null\n ? CommissionRates.fromPartial(object.commission_rates)\n : undefined;\n message.update_time =\n object.update_time !== undefined && object.update_time !== null\n ? Timestamp.fromPartial(object.update_time)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseDescription(): Description {\n return {\n moniker: \"\",\n identity: \"\",\n website: \"\",\n security_contact: \"\",\n details: \"\",\n };\n}\n\nexport const Description = {\n encode(\n message: Description,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.moniker !== \"\") {\n writer.uint32(10).string(message.moniker);\n }\n if (message.identity !== \"\") {\n writer.uint32(18).string(message.identity);\n }\n if (message.website !== \"\") {\n writer.uint32(26).string(message.website);\n }\n if (message.security_contact !== \"\") {\n writer.uint32(34).string(message.security_contact);\n }\n if (message.details !== \"\") {\n writer.uint32(42).string(message.details);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Description {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDescription();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.moniker = reader.string();\n break;\n case 2:\n message.identity = reader.string();\n break;\n case 3:\n message.website = reader.string();\n break;\n case 4:\n message.security_contact = reader.string();\n break;\n case 5:\n message.details = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Description {\n return {\n moniker: isSet(object.moniker) ? String(object.moniker) : \"\",\n identity: isSet(object.identity) ? String(object.identity) : \"\",\n website: isSet(object.website) ? String(object.website) : \"\",\n security_contact: isSet(object.security_contact)\n ? String(object.security_contact)\n : \"\",\n details: isSet(object.details) ? String(object.details) : \"\",\n };\n },\n\n toJSON(message: Description): unknown {\n const obj: any = {};\n message.moniker !== undefined && (obj.moniker = message.moniker);\n message.identity !== undefined && (obj.identity = message.identity);\n message.website !== undefined && (obj.website = message.website);\n message.security_contact !== undefined &&\n (obj.security_contact = message.security_contact);\n message.details !== undefined && (obj.details = message.details);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Description {\n const message = createBaseDescription();\n message.moniker = object.moniker ?? \"\";\n message.identity = object.identity ?? \"\";\n message.website = object.website ?? \"\";\n message.security_contact = object.security_contact ?? \"\";\n message.details = object.details ?? \"\";\n return message;\n },\n};\n\nfunction createBaseValidator(): Validator {\n return {\n operator_address: \"\",\n consensus_pubkey: undefined,\n jailed: false,\n status: 0,\n tokens: \"\",\n delegator_shares: \"\",\n description: undefined,\n unbonding_height: \"0\",\n unbonding_time: undefined,\n commission: undefined,\n min_self_delegation: \"\",\n };\n}\n\nexport const Validator = {\n encode(\n message: Validator,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.operator_address !== \"\") {\n writer.uint32(10).string(message.operator_address);\n }\n if (message.consensus_pubkey !== undefined) {\n Any.encode(message.consensus_pubkey, writer.uint32(18).fork()).ldelim();\n }\n if (message.jailed === true) {\n writer.uint32(24).bool(message.jailed);\n }\n if (message.status !== 0) {\n writer.uint32(32).int32(message.status);\n }\n if (message.tokens !== \"\") {\n writer.uint32(42).string(message.tokens);\n }\n if (message.delegator_shares !== \"\") {\n writer.uint32(50).string(message.delegator_shares);\n }\n if (message.description !== undefined) {\n Description.encode(\n message.description,\n writer.uint32(58).fork(),\n ).ldelim();\n }\n if (message.unbonding_height !== \"0\") {\n writer.uint32(64).int64(message.unbonding_height);\n }\n if (message.unbonding_time !== undefined) {\n Timestamp.encode(\n message.unbonding_time,\n writer.uint32(74).fork(),\n ).ldelim();\n }\n if (message.commission !== undefined) {\n Commission.encode(message.commission, writer.uint32(82).fork()).ldelim();\n }\n if (message.min_self_delegation !== \"\") {\n writer.uint32(90).string(message.min_self_delegation);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Validator {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidator();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.operator_address = reader.string();\n break;\n case 2:\n message.consensus_pubkey = Any.decode(reader, reader.uint32());\n break;\n case 3:\n message.jailed = reader.bool();\n break;\n case 4:\n message.status = reader.int32() as any;\n break;\n case 5:\n message.tokens = reader.string();\n break;\n case 6:\n message.delegator_shares = reader.string();\n break;\n case 7:\n message.description = Description.decode(reader, reader.uint32());\n break;\n case 8:\n message.unbonding_height = longToString(reader.int64() as Long);\n break;\n case 9:\n message.unbonding_time = Timestamp.decode(reader, reader.uint32());\n break;\n case 10:\n message.commission = Commission.decode(reader, reader.uint32());\n break;\n case 11:\n message.min_self_delegation = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Validator {\n return {\n operator_address: isSet(object.operator_address)\n ? String(object.operator_address)\n : \"\",\n consensus_pubkey: isSet(object.consensus_pubkey)\n ? Any.fromJSON(object.consensus_pubkey)\n : undefined,\n jailed: isSet(object.jailed) ? Boolean(object.jailed) : false,\n status: isSet(object.status) ? bondStatusFromJSON(object.status) : 0,\n tokens: isSet(object.tokens) ? String(object.tokens) : \"\",\n delegator_shares: isSet(object.delegator_shares)\n ? String(object.delegator_shares)\n : \"\",\n description: isSet(object.description)\n ? Description.fromJSON(object.description)\n : undefined,\n unbonding_height: isSet(object.unbonding_height)\n ? String(object.unbonding_height)\n : \"0\",\n unbonding_time: isSet(object.unbonding_time)\n ? fromJsonTimestamp(object.unbonding_time)\n : undefined,\n commission: isSet(object.commission)\n ? Commission.fromJSON(object.commission)\n : undefined,\n min_self_delegation: isSet(object.min_self_delegation)\n ? String(object.min_self_delegation)\n : \"\",\n };\n },\n\n toJSON(message: Validator): unknown {\n const obj: any = {};\n message.operator_address !== undefined &&\n (obj.operator_address = message.operator_address);\n message.consensus_pubkey !== undefined &&\n (obj.consensus_pubkey = message.consensus_pubkey\n ? Any.toJSON(message.consensus_pubkey)\n : undefined);\n message.jailed !== undefined && (obj.jailed = message.jailed);\n message.status !== undefined &&\n (obj.status = bondStatusToJSON(message.status));\n message.tokens !== undefined && (obj.tokens = message.tokens);\n message.delegator_shares !== undefined &&\n (obj.delegator_shares = message.delegator_shares);\n message.description !== undefined &&\n (obj.description = message.description\n ? Description.toJSON(message.description)\n : undefined);\n message.unbonding_height !== undefined &&\n (obj.unbonding_height = message.unbonding_height);\n message.unbonding_time !== undefined &&\n (obj.unbonding_time = fromTimestamp(\n message.unbonding_time,\n ).toISOString());\n message.commission !== undefined &&\n (obj.commission = message.commission\n ? Commission.toJSON(message.commission)\n : undefined);\n message.min_self_delegation !== undefined &&\n (obj.min_self_delegation = message.min_self_delegation);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Validator {\n const message = createBaseValidator();\n message.operator_address = object.operator_address ?? \"\";\n message.consensus_pubkey =\n object.consensus_pubkey !== undefined && object.consensus_pubkey !== null\n ? Any.fromPartial(object.consensus_pubkey)\n : undefined;\n message.jailed = object.jailed ?? false;\n message.status = object.status ?? 0;\n message.tokens = object.tokens ?? \"\";\n message.delegator_shares = object.delegator_shares ?? \"\";\n message.description =\n object.description !== undefined && object.description !== null\n ? Description.fromPartial(object.description)\n : undefined;\n message.unbonding_height = object.unbonding_height ?? \"0\";\n message.unbonding_time =\n object.unbonding_time !== undefined && object.unbonding_time !== null\n ? Timestamp.fromPartial(object.unbonding_time)\n : undefined;\n message.commission =\n object.commission !== undefined && object.commission !== null\n ? Commission.fromPartial(object.commission)\n : undefined;\n message.min_self_delegation = object.min_self_delegation ?? \"\";\n return message;\n },\n};\n\nfunction createBaseValAddresses(): ValAddresses {\n return { addresses: [] };\n}\n\nexport const ValAddresses = {\n encode(\n message: ValAddresses,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.addresses) {\n writer.uint32(10).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ValAddresses {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValAddresses();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.addresses.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValAddresses {\n return {\n addresses: Array.isArray(object?.addresses)\n ? object.addresses.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: ValAddresses): unknown {\n const obj: any = {};\n if (message.addresses) {\n obj.addresses = message.addresses.map((e) => e);\n } else {\n obj.addresses = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValAddresses {\n const message = createBaseValAddresses();\n message.addresses = object.addresses?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseDVPair(): DVPair {\n return { delegator_address: \"\", validator_address: \"\" };\n}\n\nexport const DVPair = {\n encode(\n message: DVPair,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_address !== \"\") {\n writer.uint32(18).string(message.validator_address);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DVPair {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDVPair();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_address = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DVPair {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n };\n },\n\n toJSON(message: DVPair): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n return obj;\n },\n\n fromPartial, I>>(object: I): DVPair {\n const message = createBaseDVPair();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_address = object.validator_address ?? \"\";\n return message;\n },\n};\n\nfunction createBaseDVPairs(): DVPairs {\n return { pairs: [] };\n}\n\nexport const DVPairs = {\n encode(\n message: DVPairs,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.pairs) {\n DVPair.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DVPairs {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDVPairs();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.pairs.push(DVPair.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DVPairs {\n return {\n pairs: Array.isArray(object?.pairs)\n ? object.pairs.map((e: any) => DVPair.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: DVPairs): unknown {\n const obj: any = {};\n if (message.pairs) {\n obj.pairs = message.pairs.map((e) => (e ? DVPair.toJSON(e) : undefined));\n } else {\n obj.pairs = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): DVPairs {\n const message = createBaseDVPairs();\n message.pairs = object.pairs?.map((e) => DVPair.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseDVVTriplet(): DVVTriplet {\n return {\n delegator_address: \"\",\n validator_src_address: \"\",\n validator_dst_address: \"\",\n };\n}\n\nexport const DVVTriplet = {\n encode(\n message: DVVTriplet,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_src_address !== \"\") {\n writer.uint32(18).string(message.validator_src_address);\n }\n if (message.validator_dst_address !== \"\") {\n writer.uint32(26).string(message.validator_dst_address);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DVVTriplet {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDVVTriplet();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_src_address = reader.string();\n break;\n case 3:\n message.validator_dst_address = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DVVTriplet {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_src_address: isSet(object.validator_src_address)\n ? String(object.validator_src_address)\n : \"\",\n validator_dst_address: isSet(object.validator_dst_address)\n ? String(object.validator_dst_address)\n : \"\",\n };\n },\n\n toJSON(message: DVVTriplet): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_src_address !== undefined &&\n (obj.validator_src_address = message.validator_src_address);\n message.validator_dst_address !== undefined &&\n (obj.validator_dst_address = message.validator_dst_address);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): DVVTriplet {\n const message = createBaseDVVTriplet();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_src_address = object.validator_src_address ?? \"\";\n message.validator_dst_address = object.validator_dst_address ?? \"\";\n return message;\n },\n};\n\nfunction createBaseDVVTriplets(): DVVTriplets {\n return { triplets: [] };\n}\n\nexport const DVVTriplets = {\n encode(\n message: DVVTriplets,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.triplets) {\n DVVTriplet.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DVVTriplets {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDVVTriplets();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.triplets.push(DVVTriplet.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DVVTriplets {\n return {\n triplets: Array.isArray(object?.triplets)\n ? object.triplets.map((e: any) => DVVTriplet.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: DVVTriplets): unknown {\n const obj: any = {};\n if (message.triplets) {\n obj.triplets = message.triplets.map((e) =>\n e ? DVVTriplet.toJSON(e) : undefined,\n );\n } else {\n obj.triplets = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): DVVTriplets {\n const message = createBaseDVVTriplets();\n message.triplets =\n object.triplets?.map((e) => DVVTriplet.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseDelegation(): Delegation {\n return { delegator_address: \"\", validator_address: \"\", shares: \"\" };\n}\n\nexport const Delegation = {\n encode(\n message: Delegation,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_address !== \"\") {\n writer.uint32(18).string(message.validator_address);\n }\n if (message.shares !== \"\") {\n writer.uint32(26).string(message.shares);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Delegation {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDelegation();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_address = reader.string();\n break;\n case 3:\n message.shares = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Delegation {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n shares: isSet(object.shares) ? String(object.shares) : \"\",\n };\n },\n\n toJSON(message: Delegation): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n message.shares !== undefined && (obj.shares = message.shares);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Delegation {\n const message = createBaseDelegation();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_address = object.validator_address ?? \"\";\n message.shares = object.shares ?? \"\";\n return message;\n },\n};\n\nfunction createBaseUnbondingDelegation(): UnbondingDelegation {\n return { delegator_address: \"\", validator_address: \"\", entries: [] };\n}\n\nexport const UnbondingDelegation = {\n encode(\n message: UnbondingDelegation,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_address !== \"\") {\n writer.uint32(18).string(message.validator_address);\n }\n for (const v of message.entries) {\n UnbondingDelegationEntry.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): UnbondingDelegation {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseUnbondingDelegation();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_address = reader.string();\n break;\n case 3:\n message.entries.push(\n UnbondingDelegationEntry.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): UnbondingDelegation {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n entries: Array.isArray(object?.entries)\n ? object.entries.map((e: any) => UnbondingDelegationEntry.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: UnbondingDelegation): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n if (message.entries) {\n obj.entries = message.entries.map((e) =>\n e ? UnbondingDelegationEntry.toJSON(e) : undefined,\n );\n } else {\n obj.entries = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): UnbondingDelegation {\n const message = createBaseUnbondingDelegation();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_address = object.validator_address ?? \"\";\n message.entries =\n object.entries?.map((e) => UnbondingDelegationEntry.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry {\n return {\n creation_height: \"0\",\n completion_time: undefined,\n initial_balance: \"\",\n balance: \"\",\n };\n}\n\nexport const UnbondingDelegationEntry = {\n encode(\n message: UnbondingDelegationEntry,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.creation_height !== \"0\") {\n writer.uint32(8).int64(message.creation_height);\n }\n if (message.completion_time !== undefined) {\n Timestamp.encode(\n message.completion_time,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.initial_balance !== \"\") {\n writer.uint32(26).string(message.initial_balance);\n }\n if (message.balance !== \"\") {\n writer.uint32(34).string(message.balance);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): UnbondingDelegationEntry {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseUnbondingDelegationEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.creation_height = longToString(reader.int64() as Long);\n break;\n case 2:\n message.completion_time = Timestamp.decode(reader, reader.uint32());\n break;\n case 3:\n message.initial_balance = reader.string();\n break;\n case 4:\n message.balance = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): UnbondingDelegationEntry {\n return {\n creation_height: isSet(object.creation_height)\n ? String(object.creation_height)\n : \"0\",\n completion_time: isSet(object.completion_time)\n ? fromJsonTimestamp(object.completion_time)\n : undefined,\n initial_balance: isSet(object.initial_balance)\n ? String(object.initial_balance)\n : \"\",\n balance: isSet(object.balance) ? String(object.balance) : \"\",\n };\n },\n\n toJSON(message: UnbondingDelegationEntry): unknown {\n const obj: any = {};\n message.creation_height !== undefined &&\n (obj.creation_height = message.creation_height);\n message.completion_time !== undefined &&\n (obj.completion_time = fromTimestamp(\n message.completion_time,\n ).toISOString());\n message.initial_balance !== undefined &&\n (obj.initial_balance = message.initial_balance);\n message.balance !== undefined && (obj.balance = message.balance);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): UnbondingDelegationEntry {\n const message = createBaseUnbondingDelegationEntry();\n message.creation_height = object.creation_height ?? \"0\";\n message.completion_time =\n object.completion_time !== undefined && object.completion_time !== null\n ? Timestamp.fromPartial(object.completion_time)\n : undefined;\n message.initial_balance = object.initial_balance ?? \"\";\n message.balance = object.balance ?? \"\";\n return message;\n },\n};\n\nfunction createBaseRedelegationEntry(): RedelegationEntry {\n return {\n creation_height: \"0\",\n completion_time: undefined,\n initial_balance: \"\",\n shares_dst: \"\",\n };\n}\n\nexport const RedelegationEntry = {\n encode(\n message: RedelegationEntry,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.creation_height !== \"0\") {\n writer.uint32(8).int64(message.creation_height);\n }\n if (message.completion_time !== undefined) {\n Timestamp.encode(\n message.completion_time,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.initial_balance !== \"\") {\n writer.uint32(26).string(message.initial_balance);\n }\n if (message.shares_dst !== \"\") {\n writer.uint32(34).string(message.shares_dst);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RedelegationEntry {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRedelegationEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.creation_height = longToString(reader.int64() as Long);\n break;\n case 2:\n message.completion_time = Timestamp.decode(reader, reader.uint32());\n break;\n case 3:\n message.initial_balance = reader.string();\n break;\n case 4:\n message.shares_dst = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RedelegationEntry {\n return {\n creation_height: isSet(object.creation_height)\n ? String(object.creation_height)\n : \"0\",\n completion_time: isSet(object.completion_time)\n ? fromJsonTimestamp(object.completion_time)\n : undefined,\n initial_balance: isSet(object.initial_balance)\n ? String(object.initial_balance)\n : \"\",\n shares_dst: isSet(object.shares_dst) ? String(object.shares_dst) : \"\",\n };\n },\n\n toJSON(message: RedelegationEntry): unknown {\n const obj: any = {};\n message.creation_height !== undefined &&\n (obj.creation_height = message.creation_height);\n message.completion_time !== undefined &&\n (obj.completion_time = fromTimestamp(\n message.completion_time,\n ).toISOString());\n message.initial_balance !== undefined &&\n (obj.initial_balance = message.initial_balance);\n message.shares_dst !== undefined && (obj.shares_dst = message.shares_dst);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RedelegationEntry {\n const message = createBaseRedelegationEntry();\n message.creation_height = object.creation_height ?? \"0\";\n message.completion_time =\n object.completion_time !== undefined && object.completion_time !== null\n ? Timestamp.fromPartial(object.completion_time)\n : undefined;\n message.initial_balance = object.initial_balance ?? \"\";\n message.shares_dst = object.shares_dst ?? \"\";\n return message;\n },\n};\n\nfunction createBaseRedelegation(): Redelegation {\n return {\n delegator_address: \"\",\n validator_src_address: \"\",\n validator_dst_address: \"\",\n entries: [],\n };\n}\n\nexport const Redelegation = {\n encode(\n message: Redelegation,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_src_address !== \"\") {\n writer.uint32(18).string(message.validator_src_address);\n }\n if (message.validator_dst_address !== \"\") {\n writer.uint32(26).string(message.validator_dst_address);\n }\n for (const v of message.entries) {\n RedelegationEntry.encode(v!, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Redelegation {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRedelegation();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_src_address = reader.string();\n break;\n case 3:\n message.validator_dst_address = reader.string();\n break;\n case 4:\n message.entries.push(\n RedelegationEntry.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Redelegation {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_src_address: isSet(object.validator_src_address)\n ? String(object.validator_src_address)\n : \"\",\n validator_dst_address: isSet(object.validator_dst_address)\n ? String(object.validator_dst_address)\n : \"\",\n entries: Array.isArray(object?.entries)\n ? object.entries.map((e: any) => RedelegationEntry.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Redelegation): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_src_address !== undefined &&\n (obj.validator_src_address = message.validator_src_address);\n message.validator_dst_address !== undefined &&\n (obj.validator_dst_address = message.validator_dst_address);\n if (message.entries) {\n obj.entries = message.entries.map((e) =>\n e ? RedelegationEntry.toJSON(e) : undefined,\n );\n } else {\n obj.entries = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Redelegation {\n const message = createBaseRedelegation();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_src_address = object.validator_src_address ?? \"\";\n message.validator_dst_address = object.validator_dst_address ?? \"\";\n message.entries =\n object.entries?.map((e) => RedelegationEntry.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseParams(): Params {\n return {\n unbonding_time: undefined,\n max_validators: 0,\n max_entries: 0,\n historical_entries: 0,\n bond_denom: \"\",\n };\n}\n\nexport const Params = {\n encode(\n message: Params,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.unbonding_time !== undefined) {\n Duration.encode(\n message.unbonding_time,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.max_validators !== 0) {\n writer.uint32(16).uint32(message.max_validators);\n }\n if (message.max_entries !== 0) {\n writer.uint32(24).uint32(message.max_entries);\n }\n if (message.historical_entries !== 0) {\n writer.uint32(32).uint32(message.historical_entries);\n }\n if (message.bond_denom !== \"\") {\n writer.uint32(42).string(message.bond_denom);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Params {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.unbonding_time = Duration.decode(reader, reader.uint32());\n break;\n case 2:\n message.max_validators = reader.uint32();\n break;\n case 3:\n message.max_entries = reader.uint32();\n break;\n case 4:\n message.historical_entries = reader.uint32();\n break;\n case 5:\n message.bond_denom = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Params {\n return {\n unbonding_time: isSet(object.unbonding_time)\n ? Duration.fromJSON(object.unbonding_time)\n : undefined,\n max_validators: isSet(object.max_validators)\n ? Number(object.max_validators)\n : 0,\n max_entries: isSet(object.max_entries) ? Number(object.max_entries) : 0,\n historical_entries: isSet(object.historical_entries)\n ? Number(object.historical_entries)\n : 0,\n bond_denom: isSet(object.bond_denom) ? String(object.bond_denom) : \"\",\n };\n },\n\n toJSON(message: Params): unknown {\n const obj: any = {};\n message.unbonding_time !== undefined &&\n (obj.unbonding_time = message.unbonding_time\n ? Duration.toJSON(message.unbonding_time)\n : undefined);\n message.max_validators !== undefined &&\n (obj.max_validators = Math.round(message.max_validators));\n message.max_entries !== undefined &&\n (obj.max_entries = Math.round(message.max_entries));\n message.historical_entries !== undefined &&\n (obj.historical_entries = Math.round(message.historical_entries));\n message.bond_denom !== undefined && (obj.bond_denom = message.bond_denom);\n return obj;\n },\n\n fromPartial, I>>(object: I): Params {\n const message = createBaseParams();\n message.unbonding_time =\n object.unbonding_time !== undefined && object.unbonding_time !== null\n ? Duration.fromPartial(object.unbonding_time)\n : undefined;\n message.max_validators = object.max_validators ?? 0;\n message.max_entries = object.max_entries ?? 0;\n message.historical_entries = object.historical_entries ?? 0;\n message.bond_denom = object.bond_denom ?? \"\";\n return message;\n },\n};\n\nfunction createBaseDelegationResponse(): DelegationResponse {\n return { delegation: undefined, balance: undefined };\n}\n\nexport const DelegationResponse = {\n encode(\n message: DelegationResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegation !== undefined) {\n Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim();\n }\n if (message.balance !== undefined) {\n Coin.encode(message.balance, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DelegationResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDelegationResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegation = Delegation.decode(reader, reader.uint32());\n break;\n case 2:\n message.balance = Coin.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DelegationResponse {\n return {\n delegation: isSet(object.delegation)\n ? Delegation.fromJSON(object.delegation)\n : undefined,\n balance: isSet(object.balance)\n ? Coin.fromJSON(object.balance)\n : undefined,\n };\n },\n\n toJSON(message: DelegationResponse): unknown {\n const obj: any = {};\n message.delegation !== undefined &&\n (obj.delegation = message.delegation\n ? Delegation.toJSON(message.delegation)\n : undefined);\n message.balance !== undefined &&\n (obj.balance = message.balance\n ? Coin.toJSON(message.balance)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): DelegationResponse {\n const message = createBaseDelegationResponse();\n message.delegation =\n object.delegation !== undefined && object.delegation !== null\n ? Delegation.fromPartial(object.delegation)\n : undefined;\n message.balance =\n object.balance !== undefined && object.balance !== null\n ? Coin.fromPartial(object.balance)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseRedelegationEntryResponse(): RedelegationEntryResponse {\n return { redelegation_entry: undefined, balance: \"\" };\n}\n\nexport const RedelegationEntryResponse = {\n encode(\n message: RedelegationEntryResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.redelegation_entry !== undefined) {\n RedelegationEntry.encode(\n message.redelegation_entry,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.balance !== \"\") {\n writer.uint32(34).string(message.balance);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): RedelegationEntryResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRedelegationEntryResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.redelegation_entry = RedelegationEntry.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 4:\n message.balance = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RedelegationEntryResponse {\n return {\n redelegation_entry: isSet(object.redelegation_entry)\n ? RedelegationEntry.fromJSON(object.redelegation_entry)\n : undefined,\n balance: isSet(object.balance) ? String(object.balance) : \"\",\n };\n },\n\n toJSON(message: RedelegationEntryResponse): unknown {\n const obj: any = {};\n message.redelegation_entry !== undefined &&\n (obj.redelegation_entry = message.redelegation_entry\n ? RedelegationEntry.toJSON(message.redelegation_entry)\n : undefined);\n message.balance !== undefined && (obj.balance = message.balance);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RedelegationEntryResponse {\n const message = createBaseRedelegationEntryResponse();\n message.redelegation_entry =\n object.redelegation_entry !== undefined &&\n object.redelegation_entry !== null\n ? RedelegationEntry.fromPartial(object.redelegation_entry)\n : undefined;\n message.balance = object.balance ?? \"\";\n return message;\n },\n};\n\nfunction createBaseRedelegationResponse(): RedelegationResponse {\n return { redelegation: undefined, entries: [] };\n}\n\nexport const RedelegationResponse = {\n encode(\n message: RedelegationResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.redelegation !== undefined) {\n Redelegation.encode(\n message.redelegation,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n for (const v of message.entries) {\n RedelegationEntryResponse.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): RedelegationResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRedelegationResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.redelegation = Redelegation.decode(reader, reader.uint32());\n break;\n case 2:\n message.entries.push(\n RedelegationEntryResponse.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RedelegationResponse {\n return {\n redelegation: isSet(object.redelegation)\n ? Redelegation.fromJSON(object.redelegation)\n : undefined,\n entries: Array.isArray(object?.entries)\n ? object.entries.map((e: any) => RedelegationEntryResponse.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: RedelegationResponse): unknown {\n const obj: any = {};\n message.redelegation !== undefined &&\n (obj.redelegation = message.redelegation\n ? Redelegation.toJSON(message.redelegation)\n : undefined);\n if (message.entries) {\n obj.entries = message.entries.map((e) =>\n e ? RedelegationEntryResponse.toJSON(e) : undefined,\n );\n } else {\n obj.entries = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RedelegationResponse {\n const message = createBaseRedelegationResponse();\n message.redelegation =\n object.redelegation !== undefined && object.redelegation !== null\n ? Redelegation.fromPartial(object.redelegation)\n : undefined;\n message.entries =\n object.entries?.map((e) => RedelegationEntryResponse.fromPartial(e)) ||\n [];\n return message;\n },\n};\n\nfunction createBasePool(): Pool {\n return { not_bonded_tokens: \"\", bonded_tokens: \"\" };\n}\n\nexport const Pool = {\n encode(message: Pool, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.not_bonded_tokens !== \"\") {\n writer.uint32(10).string(message.not_bonded_tokens);\n }\n if (message.bonded_tokens !== \"\") {\n writer.uint32(18).string(message.bonded_tokens);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Pool {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePool();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.not_bonded_tokens = reader.string();\n break;\n case 2:\n message.bonded_tokens = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Pool {\n return {\n not_bonded_tokens: isSet(object.not_bonded_tokens)\n ? String(object.not_bonded_tokens)\n : \"\",\n bonded_tokens: isSet(object.bonded_tokens)\n ? String(object.bonded_tokens)\n : \"\",\n };\n },\n\n toJSON(message: Pool): unknown {\n const obj: any = {};\n message.not_bonded_tokens !== undefined &&\n (obj.not_bonded_tokens = message.not_bonded_tokens);\n message.bonded_tokens !== undefined &&\n (obj.bonded_tokens = message.bonded_tokens);\n return obj;\n },\n\n fromPartial, I>>(object: I): Pool {\n const message = createBasePool();\n message.not_bonded_tokens = object.not_bonded_tokens ?? \"\";\n message.bonded_tokens = object.bonded_tokens ?? \"\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1_000).toString();\n const nanos = (date.getTime() % 1_000) * 1_000_000;\n return { seconds, nanos };\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1_000;\n millis += t.nanos / 1_000_000;\n return new Date(millis);\n}\n\nfunction fromJsonTimestamp(o: any): Timestamp {\n if (o instanceof Date) {\n return toTimestamp(o);\n } else if (typeof o === \"string\") {\n return toTimestamp(new Date(o));\n } else {\n return Timestamp.fromJSON(o);\n }\n}\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Description, CommissionRates } from \"./staking\";\nimport { Any } from \"../../../google/protobuf/any\";\nimport { Coin } from \"../../base/v1beta1/coin\";\nimport { Timestamp } from \"../../../google/protobuf/timestamp\";\n\nexport const protobufPackage = \"cosmos.staking.v1beta1\";\n\n/** MsgCreateValidator defines a SDK message for creating a new validator. */\nexport interface MsgCreateValidator {\n description?: Description;\n commission?: CommissionRates;\n min_self_delegation: string;\n delegator_address: string;\n validator_address: string;\n pubkey?: Any;\n value?: Coin;\n}\n\n/** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */\nexport interface MsgCreateValidatorResponse {}\n\n/** MsgEditValidator defines a SDK message for editing an existing validator. */\nexport interface MsgEditValidator {\n description?: Description;\n validator_address: string;\n /**\n * We pass a reference to the new commission rate and min self delegation as\n * it's not mandatory to update. If not updated, the deserialized rate will be\n * zero with no way to distinguish if an update was intended.\n * REF: #2373\n */\n commission_rate: string;\n min_self_delegation: string;\n}\n\n/** MsgEditValidatorResponse defines the Msg/EditValidator response type. */\nexport interface MsgEditValidatorResponse {}\n\n/**\n * MsgDelegate defines a SDK message for performing a delegation of coins\n * from a delegator to a validator.\n */\nexport interface MsgDelegate {\n delegator_address: string;\n validator_address: string;\n amount?: Coin;\n}\n\n/** MsgDelegateResponse defines the Msg/Delegate response type. */\nexport interface MsgDelegateResponse {}\n\n/**\n * MsgBeginRedelegate defines a SDK message for performing a redelegation\n * of coins from a delegator and source validator to a destination validator.\n */\nexport interface MsgBeginRedelegate {\n delegator_address: string;\n validator_src_address: string;\n validator_dst_address: string;\n amount?: Coin;\n}\n\n/** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */\nexport interface MsgBeginRedelegateResponse {\n completion_time?: Timestamp;\n}\n\n/**\n * MsgUndelegate defines a SDK message for performing an undelegation from a\n * delegate and a validator.\n */\nexport interface MsgUndelegate {\n delegator_address: string;\n validator_address: string;\n amount?: Coin;\n}\n\n/** MsgUndelegateResponse defines the Msg/Undelegate response type. */\nexport interface MsgUndelegateResponse {\n completion_time?: Timestamp;\n}\n\nfunction createBaseMsgCreateValidator(): MsgCreateValidator {\n return {\n description: undefined,\n commission: undefined,\n min_self_delegation: \"\",\n delegator_address: \"\",\n validator_address: \"\",\n pubkey: undefined,\n value: undefined,\n };\n}\n\nexport const MsgCreateValidator = {\n encode(\n message: MsgCreateValidator,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.description !== undefined) {\n Description.encode(\n message.description,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.commission !== undefined) {\n CommissionRates.encode(\n message.commission,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.min_self_delegation !== \"\") {\n writer.uint32(26).string(message.min_self_delegation);\n }\n if (message.delegator_address !== \"\") {\n writer.uint32(34).string(message.delegator_address);\n }\n if (message.validator_address !== \"\") {\n writer.uint32(42).string(message.validator_address);\n }\n if (message.pubkey !== undefined) {\n Any.encode(message.pubkey, writer.uint32(50).fork()).ldelim();\n }\n if (message.value !== undefined) {\n Coin.encode(message.value, writer.uint32(58).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateValidator {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgCreateValidator();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.description = Description.decode(reader, reader.uint32());\n break;\n case 2:\n message.commission = CommissionRates.decode(reader, reader.uint32());\n break;\n case 3:\n message.min_self_delegation = reader.string();\n break;\n case 4:\n message.delegator_address = reader.string();\n break;\n case 5:\n message.validator_address = reader.string();\n break;\n case 6:\n message.pubkey = Any.decode(reader, reader.uint32());\n break;\n case 7:\n message.value = Coin.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgCreateValidator {\n return {\n description: isSet(object.description)\n ? Description.fromJSON(object.description)\n : undefined,\n commission: isSet(object.commission)\n ? CommissionRates.fromJSON(object.commission)\n : undefined,\n min_self_delegation: isSet(object.min_self_delegation)\n ? String(object.min_self_delegation)\n : \"\",\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n pubkey: isSet(object.pubkey) ? Any.fromJSON(object.pubkey) : undefined,\n value: isSet(object.value) ? Coin.fromJSON(object.value) : undefined,\n };\n },\n\n toJSON(message: MsgCreateValidator): unknown {\n const obj: any = {};\n message.description !== undefined &&\n (obj.description = message.description\n ? Description.toJSON(message.description)\n : undefined);\n message.commission !== undefined &&\n (obj.commission = message.commission\n ? CommissionRates.toJSON(message.commission)\n : undefined);\n message.min_self_delegation !== undefined &&\n (obj.min_self_delegation = message.min_self_delegation);\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n message.pubkey !== undefined &&\n (obj.pubkey = message.pubkey ? Any.toJSON(message.pubkey) : undefined);\n message.value !== undefined &&\n (obj.value = message.value ? Coin.toJSON(message.value) : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgCreateValidator {\n const message = createBaseMsgCreateValidator();\n message.description =\n object.description !== undefined && object.description !== null\n ? Description.fromPartial(object.description)\n : undefined;\n message.commission =\n object.commission !== undefined && object.commission !== null\n ? CommissionRates.fromPartial(object.commission)\n : undefined;\n message.min_self_delegation = object.min_self_delegation ?? \"\";\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_address = object.validator_address ?? \"\";\n message.pubkey =\n object.pubkey !== undefined && object.pubkey !== null\n ? Any.fromPartial(object.pubkey)\n : undefined;\n message.value =\n object.value !== undefined && object.value !== null\n ? Coin.fromPartial(object.value)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgCreateValidatorResponse(): MsgCreateValidatorResponse {\n return {};\n}\n\nexport const MsgCreateValidatorResponse = {\n encode(\n _: MsgCreateValidatorResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgCreateValidatorResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgCreateValidatorResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgCreateValidatorResponse {\n return {};\n },\n\n toJSON(_: MsgCreateValidatorResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgCreateValidatorResponse {\n const message = createBaseMsgCreateValidatorResponse();\n return message;\n },\n};\n\nfunction createBaseMsgEditValidator(): MsgEditValidator {\n return {\n description: undefined,\n validator_address: \"\",\n commission_rate: \"\",\n min_self_delegation: \"\",\n };\n}\n\nexport const MsgEditValidator = {\n encode(\n message: MsgEditValidator,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.description !== undefined) {\n Description.encode(\n message.description,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.validator_address !== \"\") {\n writer.uint32(18).string(message.validator_address);\n }\n if (message.commission_rate !== \"\") {\n writer.uint32(26).string(message.commission_rate);\n }\n if (message.min_self_delegation !== \"\") {\n writer.uint32(34).string(message.min_self_delegation);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgEditValidator {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgEditValidator();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.description = Description.decode(reader, reader.uint32());\n break;\n case 2:\n message.validator_address = reader.string();\n break;\n case 3:\n message.commission_rate = reader.string();\n break;\n case 4:\n message.min_self_delegation = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgEditValidator {\n return {\n description: isSet(object.description)\n ? Description.fromJSON(object.description)\n : undefined,\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n commission_rate: isSet(object.commission_rate)\n ? String(object.commission_rate)\n : \"\",\n min_self_delegation: isSet(object.min_self_delegation)\n ? String(object.min_self_delegation)\n : \"\",\n };\n },\n\n toJSON(message: MsgEditValidator): unknown {\n const obj: any = {};\n message.description !== undefined &&\n (obj.description = message.description\n ? Description.toJSON(message.description)\n : undefined);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n message.commission_rate !== undefined &&\n (obj.commission_rate = message.commission_rate);\n message.min_self_delegation !== undefined &&\n (obj.min_self_delegation = message.min_self_delegation);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgEditValidator {\n const message = createBaseMsgEditValidator();\n message.description =\n object.description !== undefined && object.description !== null\n ? Description.fromPartial(object.description)\n : undefined;\n message.validator_address = object.validator_address ?? \"\";\n message.commission_rate = object.commission_rate ?? \"\";\n message.min_self_delegation = object.min_self_delegation ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgEditValidatorResponse(): MsgEditValidatorResponse {\n return {};\n}\n\nexport const MsgEditValidatorResponse = {\n encode(\n _: MsgEditValidatorResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgEditValidatorResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgEditValidatorResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgEditValidatorResponse {\n return {};\n },\n\n toJSON(_: MsgEditValidatorResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgEditValidatorResponse {\n const message = createBaseMsgEditValidatorResponse();\n return message;\n },\n};\n\nfunction createBaseMsgDelegate(): MsgDelegate {\n return { delegator_address: \"\", validator_address: \"\", amount: undefined };\n}\n\nexport const MsgDelegate = {\n encode(\n message: MsgDelegate,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_address !== \"\") {\n writer.uint32(18).string(message.validator_address);\n }\n if (message.amount !== undefined) {\n Coin.encode(message.amount, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgDelegate {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgDelegate();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_address = reader.string();\n break;\n case 3:\n message.amount = Coin.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgDelegate {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined,\n };\n },\n\n toJSON(message: MsgDelegate): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n message.amount !== undefined &&\n (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgDelegate {\n const message = createBaseMsgDelegate();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_address = object.validator_address ?? \"\";\n message.amount =\n object.amount !== undefined && object.amount !== null\n ? Coin.fromPartial(object.amount)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgDelegateResponse(): MsgDelegateResponse {\n return {};\n}\n\nexport const MsgDelegateResponse = {\n encode(\n _: MsgDelegateResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgDelegateResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgDelegateResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgDelegateResponse {\n return {};\n },\n\n toJSON(_: MsgDelegateResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgDelegateResponse {\n const message = createBaseMsgDelegateResponse();\n return message;\n },\n};\n\nfunction createBaseMsgBeginRedelegate(): MsgBeginRedelegate {\n return {\n delegator_address: \"\",\n validator_src_address: \"\",\n validator_dst_address: \"\",\n amount: undefined,\n };\n}\n\nexport const MsgBeginRedelegate = {\n encode(\n message: MsgBeginRedelegate,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_src_address !== \"\") {\n writer.uint32(18).string(message.validator_src_address);\n }\n if (message.validator_dst_address !== \"\") {\n writer.uint32(26).string(message.validator_dst_address);\n }\n if (message.amount !== undefined) {\n Coin.encode(message.amount, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgBeginRedelegate {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgBeginRedelegate();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_src_address = reader.string();\n break;\n case 3:\n message.validator_dst_address = reader.string();\n break;\n case 4:\n message.amount = Coin.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgBeginRedelegate {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_src_address: isSet(object.validator_src_address)\n ? String(object.validator_src_address)\n : \"\",\n validator_dst_address: isSet(object.validator_dst_address)\n ? String(object.validator_dst_address)\n : \"\",\n amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined,\n };\n },\n\n toJSON(message: MsgBeginRedelegate): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_src_address !== undefined &&\n (obj.validator_src_address = message.validator_src_address);\n message.validator_dst_address !== undefined &&\n (obj.validator_dst_address = message.validator_dst_address);\n message.amount !== undefined &&\n (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgBeginRedelegate {\n const message = createBaseMsgBeginRedelegate();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_src_address = object.validator_src_address ?? \"\";\n message.validator_dst_address = object.validator_dst_address ?? \"\";\n message.amount =\n object.amount !== undefined && object.amount !== null\n ? Coin.fromPartial(object.amount)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgBeginRedelegateResponse(): MsgBeginRedelegateResponse {\n return { completion_time: undefined };\n}\n\nexport const MsgBeginRedelegateResponse = {\n encode(\n message: MsgBeginRedelegateResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.completion_time !== undefined) {\n Timestamp.encode(\n message.completion_time,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgBeginRedelegateResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgBeginRedelegateResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.completion_time = Timestamp.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgBeginRedelegateResponse {\n return {\n completion_time: isSet(object.completion_time)\n ? fromJsonTimestamp(object.completion_time)\n : undefined,\n };\n },\n\n toJSON(message: MsgBeginRedelegateResponse): unknown {\n const obj: any = {};\n message.completion_time !== undefined &&\n (obj.completion_time = fromTimestamp(\n message.completion_time,\n ).toISOString());\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgBeginRedelegateResponse {\n const message = createBaseMsgBeginRedelegateResponse();\n message.completion_time =\n object.completion_time !== undefined && object.completion_time !== null\n ? Timestamp.fromPartial(object.completion_time)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgUndelegate(): MsgUndelegate {\n return { delegator_address: \"\", validator_address: \"\", amount: undefined };\n}\n\nexport const MsgUndelegate = {\n encode(\n message: MsgUndelegate,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.delegator_address !== \"\") {\n writer.uint32(10).string(message.delegator_address);\n }\n if (message.validator_address !== \"\") {\n writer.uint32(18).string(message.validator_address);\n }\n if (message.amount !== undefined) {\n Coin.encode(message.amount, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgUndelegate {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUndelegate();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.delegator_address = reader.string();\n break;\n case 2:\n message.validator_address = reader.string();\n break;\n case 3:\n message.amount = Coin.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgUndelegate {\n return {\n delegator_address: isSet(object.delegator_address)\n ? String(object.delegator_address)\n : \"\",\n validator_address: isSet(object.validator_address)\n ? String(object.validator_address)\n : \"\",\n amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined,\n };\n },\n\n toJSON(message: MsgUndelegate): unknown {\n const obj: any = {};\n message.delegator_address !== undefined &&\n (obj.delegator_address = message.delegator_address);\n message.validator_address !== undefined &&\n (obj.validator_address = message.validator_address);\n message.amount !== undefined &&\n (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgUndelegate {\n const message = createBaseMsgUndelegate();\n message.delegator_address = object.delegator_address ?? \"\";\n message.validator_address = object.validator_address ?? \"\";\n message.amount =\n object.amount !== undefined && object.amount !== null\n ? Coin.fromPartial(object.amount)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgUndelegateResponse(): MsgUndelegateResponse {\n return { completion_time: undefined };\n}\n\nexport const MsgUndelegateResponse = {\n encode(\n message: MsgUndelegateResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.completion_time !== undefined) {\n Timestamp.encode(\n message.completion_time,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgUndelegateResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUndelegateResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.completion_time = Timestamp.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgUndelegateResponse {\n return {\n completion_time: isSet(object.completion_time)\n ? fromJsonTimestamp(object.completion_time)\n : undefined,\n };\n },\n\n toJSON(message: MsgUndelegateResponse): unknown {\n const obj: any = {};\n message.completion_time !== undefined &&\n (obj.completion_time = fromTimestamp(\n message.completion_time,\n ).toISOString());\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgUndelegateResponse {\n const message = createBaseMsgUndelegateResponse();\n message.completion_time =\n object.completion_time !== undefined && object.completion_time !== null\n ? Timestamp.fromPartial(object.completion_time)\n : undefined;\n return message;\n },\n};\n\n/** Msg defines the staking Msg service. */\nexport interface Msg {\n /** CreateValidator defines a method for creating a new validator. */\n CreateValidator(\n request: MsgCreateValidator,\n ): Promise;\n /** EditValidator defines a method for editing an existing validator. */\n EditValidator(request: MsgEditValidator): Promise;\n /**\n * Delegate defines a method for performing a delegation of coins\n * from a delegator to a validator.\n */\n Delegate(request: MsgDelegate): Promise;\n /**\n * BeginRedelegate defines a method for performing a redelegation\n * of coins from a delegator and source validator to a destination validator.\n */\n BeginRedelegate(\n request: MsgBeginRedelegate,\n ): Promise;\n /**\n * Undelegate defines a method for performing an undelegation from a\n * delegate and a validator.\n */\n Undelegate(request: MsgUndelegate): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.CreateValidator = this.CreateValidator.bind(this);\n this.EditValidator = this.EditValidator.bind(this);\n this.Delegate = this.Delegate.bind(this);\n this.BeginRedelegate = this.BeginRedelegate.bind(this);\n this.Undelegate = this.Undelegate.bind(this);\n }\n CreateValidator(\n request: MsgCreateValidator,\n ): Promise {\n const data = MsgCreateValidator.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.staking.v1beta1.Msg\",\n \"CreateValidator\",\n data,\n );\n return promise.then((data) =>\n MsgCreateValidatorResponse.decode(new _m0.Reader(data)),\n );\n }\n\n EditValidator(request: MsgEditValidator): Promise {\n const data = MsgEditValidator.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.staking.v1beta1.Msg\",\n \"EditValidator\",\n data,\n );\n return promise.then((data) =>\n MsgEditValidatorResponse.decode(new _m0.Reader(data)),\n );\n }\n\n Delegate(request: MsgDelegate): Promise {\n const data = MsgDelegate.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.staking.v1beta1.Msg\",\n \"Delegate\",\n data,\n );\n return promise.then((data) =>\n MsgDelegateResponse.decode(new _m0.Reader(data)),\n );\n }\n\n BeginRedelegate(\n request: MsgBeginRedelegate,\n ): Promise {\n const data = MsgBeginRedelegate.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.staking.v1beta1.Msg\",\n \"BeginRedelegate\",\n data,\n );\n return promise.then((data) =>\n MsgBeginRedelegateResponse.decode(new _m0.Reader(data)),\n );\n }\n\n Undelegate(request: MsgUndelegate): Promise {\n const data = MsgUndelegate.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.staking.v1beta1.Msg\",\n \"Undelegate\",\n data,\n );\n return promise.then((data) =>\n MsgUndelegateResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1_000).toString();\n const nanos = (date.getTime() % 1_000) * 1_000_000;\n return { seconds, nanos };\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1_000;\n millis += t.nanos / 1_000_000;\n return new Date(millis);\n}\n\nfunction fromJsonTimestamp(o: any): Timestamp {\n if (o instanceof Date) {\n return toTimestamp(o);\n } else if (typeof o === \"string\") {\n return toTimestamp(new Date(o));\n } else {\n return Timestamp.fromJSON(o);\n }\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../../google/protobuf/any\";\nimport { CompactBitArray } from \"../../../crypto/multisig/v1beta1/multisig\";\n\nexport const protobufPackage = \"cosmos.tx.signing.v1beta1\";\n\n/** SignMode represents a signing mode with its own security guarantees. */\nexport enum SignMode {\n /**\n * SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\n * rejected\n */\n SIGN_MODE_UNSPECIFIED = 0,\n /**\n * SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\n * verified with raw bytes from Tx\n */\n SIGN_MODE_DIRECT = 1,\n /**\n * SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some\n * human-readable textual representation on top of the binary representation\n * from SIGN_MODE_DIRECT\n */\n SIGN_MODE_TEXTUAL = 2,\n /**\n * SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\n * Amino JSON and will be removed in the future\n */\n SIGN_MODE_LEGACY_AMINO_JSON = 127,\n /**\n * SIGN_MODE_EIP_191 - SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\n * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n *\n * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\n * but is not implemented on the SDK by default. To enable EIP-191, you need\n * to pass a custom `TxConfig` that has an implementation of\n * `SignModeHandler` for EIP-191. The SDK may decide to fully support\n * EIP-191 in the future.\n *\n * Since: cosmos-sdk 0.45.2\n */\n SIGN_MODE_EIP_191 = 191,\n UNRECOGNIZED = -1,\n}\n\nexport function signModeFromJSON(object: any): SignMode {\n switch (object) {\n case 0:\n case \"SIGN_MODE_UNSPECIFIED\":\n return SignMode.SIGN_MODE_UNSPECIFIED;\n case 1:\n case \"SIGN_MODE_DIRECT\":\n return SignMode.SIGN_MODE_DIRECT;\n case 2:\n case \"SIGN_MODE_TEXTUAL\":\n return SignMode.SIGN_MODE_TEXTUAL;\n case 127:\n case \"SIGN_MODE_LEGACY_AMINO_JSON\":\n return SignMode.SIGN_MODE_LEGACY_AMINO_JSON;\n case 191:\n case \"SIGN_MODE_EIP_191\":\n return SignMode.SIGN_MODE_EIP_191;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return SignMode.UNRECOGNIZED;\n }\n}\n\nexport function signModeToJSON(object: SignMode): string {\n switch (object) {\n case SignMode.SIGN_MODE_UNSPECIFIED:\n return \"SIGN_MODE_UNSPECIFIED\";\n case SignMode.SIGN_MODE_DIRECT:\n return \"SIGN_MODE_DIRECT\";\n case SignMode.SIGN_MODE_TEXTUAL:\n return \"SIGN_MODE_TEXTUAL\";\n case SignMode.SIGN_MODE_LEGACY_AMINO_JSON:\n return \"SIGN_MODE_LEGACY_AMINO_JSON\";\n case SignMode.SIGN_MODE_EIP_191:\n return \"SIGN_MODE_EIP_191\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/** SignatureDescriptors wraps multiple SignatureDescriptor's. */\nexport interface SignatureDescriptors {\n /** signatures are the signature descriptors */\n signatures: SignatureDescriptor[];\n}\n\n/**\n * SignatureDescriptor is a convenience type which represents the full data for\n * a signature including the public key of the signer, signing modes and the\n * signature itself. It is primarily used for coordinating signatures between\n * clients.\n */\nexport interface SignatureDescriptor {\n /** public_key is the public key of the signer */\n public_key?: Any;\n data?: SignatureDescriptor_Data;\n /**\n * sequence is the sequence of the account, which describes the\n * number of committed transactions signed by a given address. It is used to prevent\n * replay attacks.\n */\n sequence: string;\n}\n\n/** Data represents signature data */\nexport interface SignatureDescriptor_Data {\n /** single represents a single signer */\n single?: SignatureDescriptor_Data_Single | undefined;\n /** multi represents a multisig signer */\n multi?: SignatureDescriptor_Data_Multi | undefined;\n}\n\n/** Single is the signature data for a single signer */\nexport interface SignatureDescriptor_Data_Single {\n /** mode is the signing mode of the single signer */\n mode: SignMode;\n /** signature is the raw signature bytes */\n signature: Uint8Array;\n}\n\n/** Multi is the signature data for a multisig public key */\nexport interface SignatureDescriptor_Data_Multi {\n /** bitarray specifies which keys within the multisig are signing */\n bitarray?: CompactBitArray;\n /** signatures is the signatures of the multi-signature */\n signatures: SignatureDescriptor_Data[];\n}\n\nfunction createBaseSignatureDescriptors(): SignatureDescriptors {\n return { signatures: [] };\n}\n\nexport const SignatureDescriptors = {\n encode(\n message: SignatureDescriptors,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.signatures) {\n SignatureDescriptor.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): SignatureDescriptors {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSignatureDescriptors();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.signatures.push(\n SignatureDescriptor.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SignatureDescriptors {\n return {\n signatures: Array.isArray(object?.signatures)\n ? object.signatures.map((e: any) => SignatureDescriptor.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: SignatureDescriptors): unknown {\n const obj: any = {};\n if (message.signatures) {\n obj.signatures = message.signatures.map((e) =>\n e ? SignatureDescriptor.toJSON(e) : undefined,\n );\n } else {\n obj.signatures = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SignatureDescriptors {\n const message = createBaseSignatureDescriptors();\n message.signatures =\n object.signatures?.map((e) => SignatureDescriptor.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseSignatureDescriptor(): SignatureDescriptor {\n return { public_key: undefined, data: undefined, sequence: \"0\" };\n}\n\nexport const SignatureDescriptor = {\n encode(\n message: SignatureDescriptor,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.public_key !== undefined) {\n Any.encode(message.public_key, writer.uint32(10).fork()).ldelim();\n }\n if (message.data !== undefined) {\n SignatureDescriptor_Data.encode(\n message.data,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.sequence !== \"0\") {\n writer.uint32(24).uint64(message.sequence);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SignatureDescriptor {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSignatureDescriptor();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.public_key = Any.decode(reader, reader.uint32());\n break;\n case 2:\n message.data = SignatureDescriptor_Data.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 3:\n message.sequence = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SignatureDescriptor {\n return {\n public_key: isSet(object.public_key)\n ? Any.fromJSON(object.public_key)\n : undefined,\n data: isSet(object.data)\n ? SignatureDescriptor_Data.fromJSON(object.data)\n : undefined,\n sequence: isSet(object.sequence) ? String(object.sequence) : \"0\",\n };\n },\n\n toJSON(message: SignatureDescriptor): unknown {\n const obj: any = {};\n message.public_key !== undefined &&\n (obj.public_key = message.public_key\n ? Any.toJSON(message.public_key)\n : undefined);\n message.data !== undefined &&\n (obj.data = message.data\n ? SignatureDescriptor_Data.toJSON(message.data)\n : undefined);\n message.sequence !== undefined && (obj.sequence = message.sequence);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SignatureDescriptor {\n const message = createBaseSignatureDescriptor();\n message.public_key =\n object.public_key !== undefined && object.public_key !== null\n ? Any.fromPartial(object.public_key)\n : undefined;\n message.data =\n object.data !== undefined && object.data !== null\n ? SignatureDescriptor_Data.fromPartial(object.data)\n : undefined;\n message.sequence = object.sequence ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data {\n return { single: undefined, multi: undefined };\n}\n\nexport const SignatureDescriptor_Data = {\n encode(\n message: SignatureDescriptor_Data,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.single !== undefined) {\n SignatureDescriptor_Data_Single.encode(\n message.single,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.multi !== undefined) {\n SignatureDescriptor_Data_Multi.encode(\n message.multi,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): SignatureDescriptor_Data {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSignatureDescriptor_Data();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.single = SignatureDescriptor_Data_Single.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 2:\n message.multi = SignatureDescriptor_Data_Multi.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SignatureDescriptor_Data {\n return {\n single: isSet(object.single)\n ? SignatureDescriptor_Data_Single.fromJSON(object.single)\n : undefined,\n multi: isSet(object.multi)\n ? SignatureDescriptor_Data_Multi.fromJSON(object.multi)\n : undefined,\n };\n },\n\n toJSON(message: SignatureDescriptor_Data): unknown {\n const obj: any = {};\n message.single !== undefined &&\n (obj.single = message.single\n ? SignatureDescriptor_Data_Single.toJSON(message.single)\n : undefined);\n message.multi !== undefined &&\n (obj.multi = message.multi\n ? SignatureDescriptor_Data_Multi.toJSON(message.multi)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SignatureDescriptor_Data {\n const message = createBaseSignatureDescriptor_Data();\n message.single =\n object.single !== undefined && object.single !== null\n ? SignatureDescriptor_Data_Single.fromPartial(object.single)\n : undefined;\n message.multi =\n object.multi !== undefined && object.multi !== null\n ? SignatureDescriptor_Data_Multi.fromPartial(object.multi)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single {\n return { mode: 0, signature: new Uint8Array() };\n}\n\nexport const SignatureDescriptor_Data_Single = {\n encode(\n message: SignatureDescriptor_Data_Single,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.mode !== 0) {\n writer.uint32(8).int32(message.mode);\n }\n if (message.signature.length !== 0) {\n writer.uint32(18).bytes(message.signature);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): SignatureDescriptor_Data_Single {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSignatureDescriptor_Data_Single();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.mode = reader.int32() as any;\n break;\n case 2:\n message.signature = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SignatureDescriptor_Data_Single {\n return {\n mode: isSet(object.mode) ? signModeFromJSON(object.mode) : 0,\n signature: isSet(object.signature)\n ? bytesFromBase64(object.signature)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: SignatureDescriptor_Data_Single): unknown {\n const obj: any = {};\n message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));\n message.signature !== undefined &&\n (obj.signature = base64FromBytes(\n message.signature !== undefined ? message.signature : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SignatureDescriptor_Data_Single {\n const message = createBaseSignatureDescriptor_Data_Single();\n message.mode = object.mode ?? 0;\n message.signature = object.signature ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi {\n return { bitarray: undefined, signatures: [] };\n}\n\nexport const SignatureDescriptor_Data_Multi = {\n encode(\n message: SignatureDescriptor_Data_Multi,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.bitarray !== undefined) {\n CompactBitArray.encode(\n message.bitarray,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n for (const v of message.signatures) {\n SignatureDescriptor_Data.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): SignatureDescriptor_Data_Multi {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSignatureDescriptor_Data_Multi();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.bitarray = CompactBitArray.decode(reader, reader.uint32());\n break;\n case 2:\n message.signatures.push(\n SignatureDescriptor_Data.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SignatureDescriptor_Data_Multi {\n return {\n bitarray: isSet(object.bitarray)\n ? CompactBitArray.fromJSON(object.bitarray)\n : undefined,\n signatures: Array.isArray(object?.signatures)\n ? object.signatures.map((e: any) =>\n SignatureDescriptor_Data.fromJSON(e),\n )\n : [],\n };\n },\n\n toJSON(message: SignatureDescriptor_Data_Multi): unknown {\n const obj: any = {};\n message.bitarray !== undefined &&\n (obj.bitarray = message.bitarray\n ? CompactBitArray.toJSON(message.bitarray)\n : undefined);\n if (message.signatures) {\n obj.signatures = message.signatures.map((e) =>\n e ? SignatureDescriptor_Data.toJSON(e) : undefined,\n );\n } else {\n obj.signatures = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SignatureDescriptor_Data_Multi {\n const message = createBaseSignatureDescriptor_Data_Multi();\n message.bitarray =\n object.bitarray !== undefined && object.bitarray !== null\n ? CompactBitArray.fromPartial(object.bitarray)\n : undefined;\n message.signatures =\n object.signatures?.map((e) => SignatureDescriptor_Data.fromPartial(e)) ||\n [];\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../google/protobuf/any\";\nimport {\n SignMode,\n signModeFromJSON,\n signModeToJSON,\n} from \"../signing/v1beta1/signing\";\nimport { CompactBitArray } from \"../../crypto/multisig/v1beta1/multisig\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.tx.v1beta1\";\n\n/** Txs is an array of Tx, used to generate the code needed for the enclave to unpack txs and validate them */\nexport interface Txs {\n tx: Uint8Array[];\n}\n\n/** Tx is the standard type used for broadcasting transactions. */\nexport interface Tx {\n /** body is the processable content of the transaction */\n body?: TxBody;\n /**\n * auth_info is the authorization related content of the transaction,\n * specifically signers, signer modes and fee\n */\n auth_info?: AuthInfo;\n /**\n * signatures is a list of signatures that matches the length and order of\n * AuthInfo's signer_infos to allow connecting signature meta information like\n * public key and signing mode by position.\n */\n signatures: Uint8Array[];\n}\n\n/**\n * TxRaw is a variant of Tx that pins the signer's exact binary representation\n * of body and auth_info. This is used for signing, broadcasting and\n * verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and\n * the hash `sha256(serialize(tx: TxRaw))` becomes the \"txhash\", commonly used\n * as the transaction ID.\n */\nexport interface TxRaw {\n /**\n * body_bytes is a protobuf serialization of a TxBody that matches the\n * representation in SignDoc.\n */\n body_bytes: Uint8Array;\n /**\n * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the\n * representation in SignDoc.\n */\n auth_info_bytes: Uint8Array;\n /**\n * signatures is a list of signatures that matches the length and order of\n * AuthInfo's signer_infos to allow connecting signature meta information like\n * public key and signing mode by position.\n */\n signatures: Uint8Array[];\n}\n\n/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */\nexport interface SignDoc {\n /**\n * body_bytes is protobuf serialization of a TxBody that matches the\n * representation in TxRaw.\n */\n body_bytes: Uint8Array;\n /**\n * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the\n * representation in TxRaw.\n */\n auth_info_bytes: Uint8Array;\n /**\n * chain_id is the unique identifier of the chain this transaction targets.\n * It prevents signed transactions from being used on another chain by an\n * attacker\n */\n chain_id: string;\n /** account_number is the account number of the account in state */\n account_number: string;\n}\n\n/** TxBody is the body of a transaction that all signers sign over. */\nexport interface TxBody {\n /**\n * messages is a list of messages to be executed. The required signers of\n * those messages define the number and order of elements in AuthInfo's\n * signer_infos and Tx's signatures. Each required signer address is added to\n * the list only the first time it occurs.\n * By convention, the first required signer (usually from the first message)\n * is referred to as the primary signer and pays the fee for the whole\n * transaction.\n */\n messages: Any[];\n /**\n * memo is any arbitrary note/comment to be added to the transaction.\n * WARNING: in clients, any publicly exposed text should not be called memo,\n * but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).\n */\n memo: string;\n /**\n * timeout is the block height after which this transaction will not\n * be processed by the chain\n */\n timeout_height: string;\n /**\n * extension_options are arbitrary options that can be added by chains\n * when the default options are not sufficient. If any of these are present\n * and can't be handled, the transaction will be rejected\n */\n extension_options: Any[];\n /**\n * extension_options are arbitrary options that can be added by chains\n * when the default options are not sufficient. If any of these are present\n * and can't be handled, they will be ignored\n */\n non_critical_extension_options: Any[];\n}\n\n/**\n * AuthInfo describes the fee and signer modes that are used to sign a\n * transaction.\n */\nexport interface AuthInfo {\n /**\n * signer_infos defines the signing modes for the required signers. The number\n * and order of elements must match the required signers from TxBody's\n * messages. The first element is the primary signer and the one which pays\n * the fee.\n */\n signer_infos: SignerInfo[];\n /**\n * Fee is the fee and gas limit for the transaction. The first signer is the\n * primary signer and the one which pays the fee. The fee can be calculated\n * based on the cost of evaluating the body and doing signature verification\n * of the signers. This can be estimated via simulation.\n */\n fee?: Fee;\n}\n\n/**\n * SignerInfo describes the public key and signing mode of a single top-level\n * signer.\n */\nexport interface SignerInfo {\n /**\n * public_key is the public key of the signer. It is optional for accounts\n * that already exist in state. If unset, the verifier can use the required \\\n * signer address for this position and lookup the public key.\n */\n public_key?: Any;\n /**\n * mode_info describes the signing mode of the signer and is a nested\n * structure to support nested multisig pubkey's\n */\n mode_info?: ModeInfo;\n /**\n * sequence is the sequence of the account, which describes the\n * number of committed transactions signed by a given address. It is used to\n * prevent replay attacks.\n */\n sequence: string;\n}\n\n/** ModeInfo describes the signing mode of a single or nested multisig signer. */\nexport interface ModeInfo {\n /** single represents a single signer */\n single?: ModeInfo_Single | undefined;\n /** multi represents a nested multisig signer */\n multi?: ModeInfo_Multi | undefined;\n}\n\n/**\n * Single is the mode info for a single signer. It is structured as a message\n * to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the\n * future\n */\nexport interface ModeInfo_Single {\n /** mode is the signing mode of the single signer */\n mode: SignMode;\n}\n\n/** Multi is the mode info for a multisig public key */\nexport interface ModeInfo_Multi {\n /** bitarray specifies which keys within the multisig are signing */\n bitarray?: CompactBitArray;\n /**\n * mode_infos is the corresponding modes of the signers of the multisig\n * which could include nested multisig public keys\n */\n mode_infos: ModeInfo[];\n}\n\n/**\n * Fee includes the amount of coins paid in fees and the maximum\n * gas to be used by the transaction. The ratio yields an effective \"gasprice\",\n * which must be above some miminum to be accepted into the mempool.\n */\nexport interface Fee {\n /** amount is the amount of coins to be paid as a fee */\n amount: Coin[];\n /**\n * gas_limit is the maximum gas that can be used in transaction processing\n * before an out of gas error occurs\n */\n gas_limit: string;\n /**\n * if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.\n * the payer must be a tx signer (and thus have signed this field in AuthInfo).\n * setting this field does *not* change the ordering of required signers for the transaction.\n */\n payer: string;\n /**\n * if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used\n * to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does\n * not support fee grants, this will fail\n */\n granter: string;\n}\n\nfunction createBaseTxs(): Txs {\n return { tx: [] };\n}\n\nexport const Txs = {\n encode(message: Txs, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n for (const v of message.tx) {\n writer.uint32(10).bytes(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Txs {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTxs();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.tx.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Txs {\n return {\n tx: Array.isArray(object?.tx)\n ? object.tx.map((e: any) => bytesFromBase64(e))\n : [],\n };\n },\n\n toJSON(message: Txs): unknown {\n const obj: any = {};\n if (message.tx) {\n obj.tx = message.tx.map((e) =>\n base64FromBytes(e !== undefined ? e : new Uint8Array()),\n );\n } else {\n obj.tx = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Txs {\n const message = createBaseTxs();\n message.tx = object.tx?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseTx(): Tx {\n return { body: undefined, auth_info: undefined, signatures: [] };\n}\n\nexport const Tx = {\n encode(message: Tx, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.body !== undefined) {\n TxBody.encode(message.body, writer.uint32(10).fork()).ldelim();\n }\n if (message.auth_info !== undefined) {\n AuthInfo.encode(message.auth_info, writer.uint32(18).fork()).ldelim();\n }\n for (const v of message.signatures) {\n writer.uint32(26).bytes(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Tx {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTx();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.body = TxBody.decode(reader, reader.uint32());\n break;\n case 2:\n message.auth_info = AuthInfo.decode(reader, reader.uint32());\n break;\n case 3:\n message.signatures.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Tx {\n return {\n body: isSet(object.body) ? TxBody.fromJSON(object.body) : undefined,\n auth_info: isSet(object.auth_info)\n ? AuthInfo.fromJSON(object.auth_info)\n : undefined,\n signatures: Array.isArray(object?.signatures)\n ? object.signatures.map((e: any) => bytesFromBase64(e))\n : [],\n };\n },\n\n toJSON(message: Tx): unknown {\n const obj: any = {};\n message.body !== undefined &&\n (obj.body = message.body ? TxBody.toJSON(message.body) : undefined);\n message.auth_info !== undefined &&\n (obj.auth_info = message.auth_info\n ? AuthInfo.toJSON(message.auth_info)\n : undefined);\n if (message.signatures) {\n obj.signatures = message.signatures.map((e) =>\n base64FromBytes(e !== undefined ? e : new Uint8Array()),\n );\n } else {\n obj.signatures = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Tx {\n const message = createBaseTx();\n message.body =\n object.body !== undefined && object.body !== null\n ? TxBody.fromPartial(object.body)\n : undefined;\n message.auth_info =\n object.auth_info !== undefined && object.auth_info !== null\n ? AuthInfo.fromPartial(object.auth_info)\n : undefined;\n message.signatures = object.signatures?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseTxRaw(): TxRaw {\n return {\n body_bytes: new Uint8Array(),\n auth_info_bytes: new Uint8Array(),\n signatures: [],\n };\n}\n\nexport const TxRaw = {\n encode(message: TxRaw, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.body_bytes.length !== 0) {\n writer.uint32(10).bytes(message.body_bytes);\n }\n if (message.auth_info_bytes.length !== 0) {\n writer.uint32(18).bytes(message.auth_info_bytes);\n }\n for (const v of message.signatures) {\n writer.uint32(26).bytes(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TxRaw {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTxRaw();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.body_bytes = reader.bytes();\n break;\n case 2:\n message.auth_info_bytes = reader.bytes();\n break;\n case 3:\n message.signatures.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TxRaw {\n return {\n body_bytes: isSet(object.body_bytes)\n ? bytesFromBase64(object.body_bytes)\n : new Uint8Array(),\n auth_info_bytes: isSet(object.auth_info_bytes)\n ? bytesFromBase64(object.auth_info_bytes)\n : new Uint8Array(),\n signatures: Array.isArray(object?.signatures)\n ? object.signatures.map((e: any) => bytesFromBase64(e))\n : [],\n };\n },\n\n toJSON(message: TxRaw): unknown {\n const obj: any = {};\n message.body_bytes !== undefined &&\n (obj.body_bytes = base64FromBytes(\n message.body_bytes !== undefined\n ? message.body_bytes\n : new Uint8Array(),\n ));\n message.auth_info_bytes !== undefined &&\n (obj.auth_info_bytes = base64FromBytes(\n message.auth_info_bytes !== undefined\n ? message.auth_info_bytes\n : new Uint8Array(),\n ));\n if (message.signatures) {\n obj.signatures = message.signatures.map((e) =>\n base64FromBytes(e !== undefined ? e : new Uint8Array()),\n );\n } else {\n obj.signatures = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): TxRaw {\n const message = createBaseTxRaw();\n message.body_bytes = object.body_bytes ?? new Uint8Array();\n message.auth_info_bytes = object.auth_info_bytes ?? new Uint8Array();\n message.signatures = object.signatures?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseSignDoc(): SignDoc {\n return {\n body_bytes: new Uint8Array(),\n auth_info_bytes: new Uint8Array(),\n chain_id: \"\",\n account_number: \"0\",\n };\n}\n\nexport const SignDoc = {\n encode(\n message: SignDoc,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.body_bytes.length !== 0) {\n writer.uint32(10).bytes(message.body_bytes);\n }\n if (message.auth_info_bytes.length !== 0) {\n writer.uint32(18).bytes(message.auth_info_bytes);\n }\n if (message.chain_id !== \"\") {\n writer.uint32(26).string(message.chain_id);\n }\n if (message.account_number !== \"0\") {\n writer.uint32(32).uint64(message.account_number);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SignDoc {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSignDoc();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.body_bytes = reader.bytes();\n break;\n case 2:\n message.auth_info_bytes = reader.bytes();\n break;\n case 3:\n message.chain_id = reader.string();\n break;\n case 4:\n message.account_number = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SignDoc {\n return {\n body_bytes: isSet(object.body_bytes)\n ? bytesFromBase64(object.body_bytes)\n : new Uint8Array(),\n auth_info_bytes: isSet(object.auth_info_bytes)\n ? bytesFromBase64(object.auth_info_bytes)\n : new Uint8Array(),\n chain_id: isSet(object.chain_id) ? String(object.chain_id) : \"\",\n account_number: isSet(object.account_number)\n ? String(object.account_number)\n : \"0\",\n };\n },\n\n toJSON(message: SignDoc): unknown {\n const obj: any = {};\n message.body_bytes !== undefined &&\n (obj.body_bytes = base64FromBytes(\n message.body_bytes !== undefined\n ? message.body_bytes\n : new Uint8Array(),\n ));\n message.auth_info_bytes !== undefined &&\n (obj.auth_info_bytes = base64FromBytes(\n message.auth_info_bytes !== undefined\n ? message.auth_info_bytes\n : new Uint8Array(),\n ));\n message.chain_id !== undefined && (obj.chain_id = message.chain_id);\n message.account_number !== undefined &&\n (obj.account_number = message.account_number);\n return obj;\n },\n\n fromPartial, I>>(object: I): SignDoc {\n const message = createBaseSignDoc();\n message.body_bytes = object.body_bytes ?? new Uint8Array();\n message.auth_info_bytes = object.auth_info_bytes ?? new Uint8Array();\n message.chain_id = object.chain_id ?? \"\";\n message.account_number = object.account_number ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseTxBody(): TxBody {\n return {\n messages: [],\n memo: \"\",\n timeout_height: \"0\",\n extension_options: [],\n non_critical_extension_options: [],\n };\n}\n\nexport const TxBody = {\n encode(\n message: TxBody,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.messages) {\n Any.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.memo !== \"\") {\n writer.uint32(18).string(message.memo);\n }\n if (message.timeout_height !== \"0\") {\n writer.uint32(24).uint64(message.timeout_height);\n }\n for (const v of message.extension_options) {\n Any.encode(v!, writer.uint32(8186).fork()).ldelim();\n }\n for (const v of message.non_critical_extension_options) {\n Any.encode(v!, writer.uint32(16378).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TxBody {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTxBody();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.messages.push(Any.decode(reader, reader.uint32()));\n break;\n case 2:\n message.memo = reader.string();\n break;\n case 3:\n message.timeout_height = longToString(reader.uint64() as Long);\n break;\n case 1023:\n message.extension_options.push(Any.decode(reader, reader.uint32()));\n break;\n case 2047:\n message.non_critical_extension_options.push(\n Any.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TxBody {\n return {\n messages: Array.isArray(object?.messages)\n ? object.messages.map((e: any) => Any.fromJSON(e))\n : [],\n memo: isSet(object.memo) ? String(object.memo) : \"\",\n timeout_height: isSet(object.timeout_height)\n ? String(object.timeout_height)\n : \"0\",\n extension_options: Array.isArray(object?.extension_options)\n ? object.extension_options.map((e: any) => Any.fromJSON(e))\n : [],\n non_critical_extension_options: Array.isArray(\n object?.non_critical_extension_options,\n )\n ? object.non_critical_extension_options.map((e: any) => Any.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: TxBody): unknown {\n const obj: any = {};\n if (message.messages) {\n obj.messages = message.messages.map((e) =>\n e ? Any.toJSON(e) : undefined,\n );\n } else {\n obj.messages = [];\n }\n message.memo !== undefined && (obj.memo = message.memo);\n message.timeout_height !== undefined &&\n (obj.timeout_height = message.timeout_height);\n if (message.extension_options) {\n obj.extension_options = message.extension_options.map((e) =>\n e ? Any.toJSON(e) : undefined,\n );\n } else {\n obj.extension_options = [];\n }\n if (message.non_critical_extension_options) {\n obj.non_critical_extension_options =\n message.non_critical_extension_options.map((e) =>\n e ? Any.toJSON(e) : undefined,\n );\n } else {\n obj.non_critical_extension_options = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): TxBody {\n const message = createBaseTxBody();\n message.messages = object.messages?.map((e) => Any.fromPartial(e)) || [];\n message.memo = object.memo ?? \"\";\n message.timeout_height = object.timeout_height ?? \"0\";\n message.extension_options =\n object.extension_options?.map((e) => Any.fromPartial(e)) || [];\n message.non_critical_extension_options =\n object.non_critical_extension_options?.map((e) => Any.fromPartial(e)) ||\n [];\n return message;\n },\n};\n\nfunction createBaseAuthInfo(): AuthInfo {\n return { signer_infos: [], fee: undefined };\n}\n\nexport const AuthInfo = {\n encode(\n message: AuthInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.signer_infos) {\n SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.fee !== undefined) {\n Fee.encode(message.fee, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): AuthInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseAuthInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.signer_infos.push(SignerInfo.decode(reader, reader.uint32()));\n break;\n case 2:\n message.fee = Fee.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): AuthInfo {\n return {\n signer_infos: Array.isArray(object?.signer_infos)\n ? object.signer_infos.map((e: any) => SignerInfo.fromJSON(e))\n : [],\n fee: isSet(object.fee) ? Fee.fromJSON(object.fee) : undefined,\n };\n },\n\n toJSON(message: AuthInfo): unknown {\n const obj: any = {};\n if (message.signer_infos) {\n obj.signer_infos = message.signer_infos.map((e) =>\n e ? SignerInfo.toJSON(e) : undefined,\n );\n } else {\n obj.signer_infos = [];\n }\n message.fee !== undefined &&\n (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): AuthInfo {\n const message = createBaseAuthInfo();\n message.signer_infos =\n object.signer_infos?.map((e) => SignerInfo.fromPartial(e)) || [];\n message.fee =\n object.fee !== undefined && object.fee !== null\n ? Fee.fromPartial(object.fee)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseSignerInfo(): SignerInfo {\n return { public_key: undefined, mode_info: undefined, sequence: \"0\" };\n}\n\nexport const SignerInfo = {\n encode(\n message: SignerInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.public_key !== undefined) {\n Any.encode(message.public_key, writer.uint32(10).fork()).ldelim();\n }\n if (message.mode_info !== undefined) {\n ModeInfo.encode(message.mode_info, writer.uint32(18).fork()).ldelim();\n }\n if (message.sequence !== \"0\") {\n writer.uint32(24).uint64(message.sequence);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SignerInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSignerInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.public_key = Any.decode(reader, reader.uint32());\n break;\n case 2:\n message.mode_info = ModeInfo.decode(reader, reader.uint32());\n break;\n case 3:\n message.sequence = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SignerInfo {\n return {\n public_key: isSet(object.public_key)\n ? Any.fromJSON(object.public_key)\n : undefined,\n mode_info: isSet(object.mode_info)\n ? ModeInfo.fromJSON(object.mode_info)\n : undefined,\n sequence: isSet(object.sequence) ? String(object.sequence) : \"0\",\n };\n },\n\n toJSON(message: SignerInfo): unknown {\n const obj: any = {};\n message.public_key !== undefined &&\n (obj.public_key = message.public_key\n ? Any.toJSON(message.public_key)\n : undefined);\n message.mode_info !== undefined &&\n (obj.mode_info = message.mode_info\n ? ModeInfo.toJSON(message.mode_info)\n : undefined);\n message.sequence !== undefined && (obj.sequence = message.sequence);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SignerInfo {\n const message = createBaseSignerInfo();\n message.public_key =\n object.public_key !== undefined && object.public_key !== null\n ? Any.fromPartial(object.public_key)\n : undefined;\n message.mode_info =\n object.mode_info !== undefined && object.mode_info !== null\n ? ModeInfo.fromPartial(object.mode_info)\n : undefined;\n message.sequence = object.sequence ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseModeInfo(): ModeInfo {\n return { single: undefined, multi: undefined };\n}\n\nexport const ModeInfo = {\n encode(\n message: ModeInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.single !== undefined) {\n ModeInfo_Single.encode(message.single, writer.uint32(10).fork()).ldelim();\n }\n if (message.multi !== undefined) {\n ModeInfo_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ModeInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseModeInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.single = ModeInfo_Single.decode(reader, reader.uint32());\n break;\n case 2:\n message.multi = ModeInfo_Multi.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ModeInfo {\n return {\n single: isSet(object.single)\n ? ModeInfo_Single.fromJSON(object.single)\n : undefined,\n multi: isSet(object.multi)\n ? ModeInfo_Multi.fromJSON(object.multi)\n : undefined,\n };\n },\n\n toJSON(message: ModeInfo): unknown {\n const obj: any = {};\n message.single !== undefined &&\n (obj.single = message.single\n ? ModeInfo_Single.toJSON(message.single)\n : undefined);\n message.multi !== undefined &&\n (obj.multi = message.multi\n ? ModeInfo_Multi.toJSON(message.multi)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): ModeInfo {\n const message = createBaseModeInfo();\n message.single =\n object.single !== undefined && object.single !== null\n ? ModeInfo_Single.fromPartial(object.single)\n : undefined;\n message.multi =\n object.multi !== undefined && object.multi !== null\n ? ModeInfo_Multi.fromPartial(object.multi)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseModeInfo_Single(): ModeInfo_Single {\n return { mode: 0 };\n}\n\nexport const ModeInfo_Single = {\n encode(\n message: ModeInfo_Single,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.mode !== 0) {\n writer.uint32(8).int32(message.mode);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ModeInfo_Single {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseModeInfo_Single();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.mode = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ModeInfo_Single {\n return {\n mode: isSet(object.mode) ? signModeFromJSON(object.mode) : 0,\n };\n },\n\n toJSON(message: ModeInfo_Single): unknown {\n const obj: any = {};\n message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ModeInfo_Single {\n const message = createBaseModeInfo_Single();\n message.mode = object.mode ?? 0;\n return message;\n },\n};\n\nfunction createBaseModeInfo_Multi(): ModeInfo_Multi {\n return { bitarray: undefined, mode_infos: [] };\n}\n\nexport const ModeInfo_Multi = {\n encode(\n message: ModeInfo_Multi,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.bitarray !== undefined) {\n CompactBitArray.encode(\n message.bitarray,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n for (const v of message.mode_infos) {\n ModeInfo.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ModeInfo_Multi {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseModeInfo_Multi();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.bitarray = CompactBitArray.decode(reader, reader.uint32());\n break;\n case 2:\n message.mode_infos.push(ModeInfo.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ModeInfo_Multi {\n return {\n bitarray: isSet(object.bitarray)\n ? CompactBitArray.fromJSON(object.bitarray)\n : undefined,\n mode_infos: Array.isArray(object?.mode_infos)\n ? object.mode_infos.map((e: any) => ModeInfo.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ModeInfo_Multi): unknown {\n const obj: any = {};\n message.bitarray !== undefined &&\n (obj.bitarray = message.bitarray\n ? CompactBitArray.toJSON(message.bitarray)\n : undefined);\n if (message.mode_infos) {\n obj.mode_infos = message.mode_infos.map((e) =>\n e ? ModeInfo.toJSON(e) : undefined,\n );\n } else {\n obj.mode_infos = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ModeInfo_Multi {\n const message = createBaseModeInfo_Multi();\n message.bitarray =\n object.bitarray !== undefined && object.bitarray !== null\n ? CompactBitArray.fromPartial(object.bitarray)\n : undefined;\n message.mode_infos =\n object.mode_infos?.map((e) => ModeInfo.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseFee(): Fee {\n return { amount: [], gas_limit: \"0\", payer: \"\", granter: \"\" };\n}\n\nexport const Fee = {\n encode(message: Fee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n for (const v of message.amount) {\n Coin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.gas_limit !== \"0\") {\n writer.uint32(16).uint64(message.gas_limit);\n }\n if (message.payer !== \"\") {\n writer.uint32(26).string(message.payer);\n }\n if (message.granter !== \"\") {\n writer.uint32(34).string(message.granter);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Fee {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseFee();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.amount.push(Coin.decode(reader, reader.uint32()));\n break;\n case 2:\n message.gas_limit = longToString(reader.uint64() as Long);\n break;\n case 3:\n message.payer = reader.string();\n break;\n case 4:\n message.granter = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Fee {\n return {\n amount: Array.isArray(object?.amount)\n ? object.amount.map((e: any) => Coin.fromJSON(e))\n : [],\n gas_limit: isSet(object.gas_limit) ? String(object.gas_limit) : \"0\",\n payer: isSet(object.payer) ? String(object.payer) : \"\",\n granter: isSet(object.granter) ? String(object.granter) : \"\",\n };\n },\n\n toJSON(message: Fee): unknown {\n const obj: any = {};\n if (message.amount) {\n obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.amount = [];\n }\n message.gas_limit !== undefined && (obj.gas_limit = message.gas_limit);\n message.payer !== undefined && (obj.payer = message.payer);\n message.granter !== undefined && (obj.granter = message.granter);\n return obj;\n },\n\n fromPartial, I>>(object: I): Fee {\n const message = createBaseFee();\n message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];\n message.gas_limit = object.gas_limit ?? \"0\";\n message.payer = object.payer ?? \"\";\n message.granter = object.granter ?? \"\";\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Timestamp } from \"../../../google/protobuf/timestamp\";\nimport { Any } from \"../../../google/protobuf/any\";\n\nexport const protobufPackage = \"cosmos.upgrade.v1beta1\";\n\n/** Plan specifies information about a planned upgrade and when it should occur. */\nexport interface Plan {\n /**\n * Sets the name for the upgrade. This name will be used by the upgraded\n * version of the software to apply any special \"on-upgrade\" commands during\n * the first BeginBlock method after the upgrade is applied. It is also used\n * to detect whether a software version can handle a given upgrade. If no\n * upgrade handler with this name has been set in the software, it will be\n * assumed that the software is out-of-date when the upgrade Time or Height is\n * reached and the software will exit.\n */\n name: string;\n /**\n * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic\n * has been removed from the SDK.\n * If this field is not empty, an error will be thrown.\n *\n * @deprecated\n */\n time?: Timestamp;\n /**\n * The height at which the upgrade must be performed.\n * Only used if Time is not set.\n */\n height: string;\n /**\n * Any application specific upgrade info to be included on-chain\n * such as a git commit that validators could automatically upgrade to\n */\n info: string;\n /**\n * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been\n * moved to the IBC module in the sub module 02-client.\n * If this field is not empty, an error will be thrown.\n *\n * @deprecated\n */\n upgraded_client_state?: Any;\n}\n\n/**\n * SoftwareUpgradeProposal is a gov Content type for initiating a software\n * upgrade.\n */\nexport interface SoftwareUpgradeProposal {\n title: string;\n description: string;\n plan?: Plan;\n}\n\n/**\n * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software\n * upgrade.\n */\nexport interface CancelSoftwareUpgradeProposal {\n title: string;\n description: string;\n}\n\n/**\n * ModuleVersion specifies a module and its consensus version.\n *\n * Since: cosmos-sdk 0.43\n */\nexport interface ModuleVersion {\n /** name of the app module */\n name: string;\n /** consensus version of the app module */\n version: string;\n}\n\nfunction createBasePlan(): Plan {\n return {\n name: \"\",\n time: undefined,\n height: \"0\",\n info: \"\",\n upgraded_client_state: undefined,\n };\n}\n\nexport const Plan = {\n encode(message: Plan, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.name !== \"\") {\n writer.uint32(10).string(message.name);\n }\n if (message.time !== undefined) {\n Timestamp.encode(message.time, writer.uint32(18).fork()).ldelim();\n }\n if (message.height !== \"0\") {\n writer.uint32(24).int64(message.height);\n }\n if (message.info !== \"\") {\n writer.uint32(34).string(message.info);\n }\n if (message.upgraded_client_state !== undefined) {\n Any.encode(\n message.upgraded_client_state,\n writer.uint32(42).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Plan {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePlan();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message.time = Timestamp.decode(reader, reader.uint32());\n break;\n case 3:\n message.height = longToString(reader.int64() as Long);\n break;\n case 4:\n message.info = reader.string();\n break;\n case 5:\n message.upgraded_client_state = Any.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Plan {\n return {\n name: isSet(object.name) ? String(object.name) : \"\",\n time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,\n height: isSet(object.height) ? String(object.height) : \"0\",\n info: isSet(object.info) ? String(object.info) : \"\",\n upgraded_client_state: isSet(object.upgraded_client_state)\n ? Any.fromJSON(object.upgraded_client_state)\n : undefined,\n };\n },\n\n toJSON(message: Plan): unknown {\n const obj: any = {};\n message.name !== undefined && (obj.name = message.name);\n message.time !== undefined &&\n (obj.time = fromTimestamp(message.time).toISOString());\n message.height !== undefined && (obj.height = message.height);\n message.info !== undefined && (obj.info = message.info);\n message.upgraded_client_state !== undefined &&\n (obj.upgraded_client_state = message.upgraded_client_state\n ? Any.toJSON(message.upgraded_client_state)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): Plan {\n const message = createBasePlan();\n message.name = object.name ?? \"\";\n message.time =\n object.time !== undefined && object.time !== null\n ? Timestamp.fromPartial(object.time)\n : undefined;\n message.height = object.height ?? \"0\";\n message.info = object.info ?? \"\";\n message.upgraded_client_state =\n object.upgraded_client_state !== undefined &&\n object.upgraded_client_state !== null\n ? Any.fromPartial(object.upgraded_client_state)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseSoftwareUpgradeProposal(): SoftwareUpgradeProposal {\n return { title: \"\", description: \"\", plan: undefined };\n}\n\nexport const SoftwareUpgradeProposal = {\n encode(\n message: SoftwareUpgradeProposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.title !== \"\") {\n writer.uint32(10).string(message.title);\n }\n if (message.description !== \"\") {\n writer.uint32(18).string(message.description);\n }\n if (message.plan !== undefined) {\n Plan.encode(message.plan, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): SoftwareUpgradeProposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSoftwareUpgradeProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.title = reader.string();\n break;\n case 2:\n message.description = reader.string();\n break;\n case 3:\n message.plan = Plan.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SoftwareUpgradeProposal {\n return {\n title: isSet(object.title) ? String(object.title) : \"\",\n description: isSet(object.description) ? String(object.description) : \"\",\n plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined,\n };\n },\n\n toJSON(message: SoftwareUpgradeProposal): unknown {\n const obj: any = {};\n message.title !== undefined && (obj.title = message.title);\n message.description !== undefined &&\n (obj.description = message.description);\n message.plan !== undefined &&\n (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SoftwareUpgradeProposal {\n const message = createBaseSoftwareUpgradeProposal();\n message.title = object.title ?? \"\";\n message.description = object.description ?? \"\";\n message.plan =\n object.plan !== undefined && object.plan !== null\n ? Plan.fromPartial(object.plan)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseCancelSoftwareUpgradeProposal(): CancelSoftwareUpgradeProposal {\n return { title: \"\", description: \"\" };\n}\n\nexport const CancelSoftwareUpgradeProposal = {\n encode(\n message: CancelSoftwareUpgradeProposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.title !== \"\") {\n writer.uint32(10).string(message.title);\n }\n if (message.description !== \"\") {\n writer.uint32(18).string(message.description);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): CancelSoftwareUpgradeProposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCancelSoftwareUpgradeProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.title = reader.string();\n break;\n case 2:\n message.description = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CancelSoftwareUpgradeProposal {\n return {\n title: isSet(object.title) ? String(object.title) : \"\",\n description: isSet(object.description) ? String(object.description) : \"\",\n };\n },\n\n toJSON(message: CancelSoftwareUpgradeProposal): unknown {\n const obj: any = {};\n message.title !== undefined && (obj.title = message.title);\n message.description !== undefined &&\n (obj.description = message.description);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CancelSoftwareUpgradeProposal {\n const message = createBaseCancelSoftwareUpgradeProposal();\n message.title = object.title ?? \"\";\n message.description = object.description ?? \"\";\n return message;\n },\n};\n\nfunction createBaseModuleVersion(): ModuleVersion {\n return { name: \"\", version: \"0\" };\n}\n\nexport const ModuleVersion = {\n encode(\n message: ModuleVersion,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.name !== \"\") {\n writer.uint32(10).string(message.name);\n }\n if (message.version !== \"0\") {\n writer.uint32(16).uint64(message.version);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ModuleVersion {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseModuleVersion();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message.version = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ModuleVersion {\n return {\n name: isSet(object.name) ? String(object.name) : \"\",\n version: isSet(object.version) ? String(object.version) : \"0\",\n };\n },\n\n toJSON(message: ModuleVersion): unknown {\n const obj: any = {};\n message.name !== undefined && (obj.name = message.name);\n message.version !== undefined && (obj.version = message.version);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ModuleVersion {\n const message = createBaseModuleVersion();\n message.name = object.name ?? \"\";\n message.version = object.version ?? \"0\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1_000).toString();\n const nanos = (date.getTime() % 1_000) * 1_000_000;\n return { seconds, nanos };\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1_000;\n millis += t.nanos / 1_000_000;\n return new Date(millis);\n}\n\nfunction fromJsonTimestamp(o: any): Timestamp {\n if (o instanceof Date) {\n return toTimestamp(o);\n } else if (typeof o === \"string\") {\n return toTimestamp(new Date(o));\n } else {\n return Timestamp.fromJSON(o);\n }\n}\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Coin } from \"../../base/v1beta1/coin\";\n\nexport const protobufPackage = \"cosmos.vesting.v1beta1\";\n\n/**\n * MsgCreateVestingAccount defines a message that enables creating a vesting\n * account.\n */\nexport interface MsgCreateVestingAccount {\n from_address: string;\n to_address: string;\n amount: Coin[];\n end_time: string;\n delayed: boolean;\n}\n\n/** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */\nexport interface MsgCreateVestingAccountResponse {}\n\nfunction createBaseMsgCreateVestingAccount(): MsgCreateVestingAccount {\n return {\n from_address: \"\",\n to_address: \"\",\n amount: [],\n end_time: \"0\",\n delayed: false,\n };\n}\n\nexport const MsgCreateVestingAccount = {\n encode(\n message: MsgCreateVestingAccount,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.from_address !== \"\") {\n writer.uint32(10).string(message.from_address);\n }\n if (message.to_address !== \"\") {\n writer.uint32(18).string(message.to_address);\n }\n for (const v of message.amount) {\n Coin.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n if (message.end_time !== \"0\") {\n writer.uint32(32).int64(message.end_time);\n }\n if (message.delayed === true) {\n writer.uint32(40).bool(message.delayed);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgCreateVestingAccount {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgCreateVestingAccount();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.from_address = reader.string();\n break;\n case 2:\n message.to_address = reader.string();\n break;\n case 3:\n message.amount.push(Coin.decode(reader, reader.uint32()));\n break;\n case 4:\n message.end_time = longToString(reader.int64() as Long);\n break;\n case 5:\n message.delayed = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgCreateVestingAccount {\n return {\n from_address: isSet(object.from_address)\n ? String(object.from_address)\n : \"\",\n to_address: isSet(object.to_address) ? String(object.to_address) : \"\",\n amount: Array.isArray(object?.amount)\n ? object.amount.map((e: any) => Coin.fromJSON(e))\n : [],\n end_time: isSet(object.end_time) ? String(object.end_time) : \"0\",\n delayed: isSet(object.delayed) ? Boolean(object.delayed) : false,\n };\n },\n\n toJSON(message: MsgCreateVestingAccount): unknown {\n const obj: any = {};\n message.from_address !== undefined &&\n (obj.from_address = message.from_address);\n message.to_address !== undefined && (obj.to_address = message.to_address);\n if (message.amount) {\n obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));\n } else {\n obj.amount = [];\n }\n message.end_time !== undefined && (obj.end_time = message.end_time);\n message.delayed !== undefined && (obj.delayed = message.delayed);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgCreateVestingAccount {\n const message = createBaseMsgCreateVestingAccount();\n message.from_address = object.from_address ?? \"\";\n message.to_address = object.to_address ?? \"\";\n message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];\n message.end_time = object.end_time ?? \"0\";\n message.delayed = object.delayed ?? false;\n return message;\n },\n};\n\nfunction createBaseMsgCreateVestingAccountResponse(): MsgCreateVestingAccountResponse {\n return {};\n}\n\nexport const MsgCreateVestingAccountResponse = {\n encode(\n _: MsgCreateVestingAccountResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgCreateVestingAccountResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgCreateVestingAccountResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgCreateVestingAccountResponse {\n return {};\n },\n\n toJSON(_: MsgCreateVestingAccountResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgCreateVestingAccountResponse {\n const message = createBaseMsgCreateVestingAccountResponse();\n return message;\n },\n};\n\n/** Msg defines the bank Msg service. */\nexport interface Msg {\n /**\n * CreateVestingAccount defines a method that enables creating a vesting\n * account.\n */\n CreateVestingAccount(\n request: MsgCreateVestingAccount,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.CreateVestingAccount = this.CreateVestingAccount.bind(this);\n }\n CreateVestingAccount(\n request: MsgCreateVestingAccount,\n ): Promise {\n const data = MsgCreateVestingAccount.encode(request).finish();\n const promise = this.rpc.request(\n \"cosmos.vesting.v1beta1.Msg\",\n \"CreateVestingAccount\",\n data,\n );\n return promise.then((data) =>\n MsgCreateVestingAccountResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"google.protobuf\";\n\n/**\n * `Any` contains an arbitrary serialized protocol buffer message along with a\n * URL that describes the type of the serialized message.\n *\n * Protobuf library provides support to pack/unpack Any values in the form\n * of utility functions or additional generated methods of the Any type.\n *\n * Example 1: Pack and unpack a message in C++.\n *\n * Foo foo = ...;\n * Any any;\n * any.PackFrom(foo);\n * ...\n * if (any.UnpackTo(&foo)) {\n * ...\n * }\n *\n * Example 2: Pack and unpack a message in Java.\n *\n * Foo foo = ...;\n * Any any = Any.pack(foo);\n * ...\n * if (any.is(Foo.class)) {\n * foo = any.unpack(Foo.class);\n * }\n *\n * Example 3: Pack and unpack a message in Python.\n *\n * foo = Foo(...)\n * any = Any()\n * any.Pack(foo)\n * ...\n * if any.Is(Foo.DESCRIPTOR):\n * any.Unpack(foo)\n * ...\n *\n * Example 4: Pack and unpack a message in Go\n *\n * foo := &pb.Foo{...}\n * any, err := ptypes.MarshalAny(foo)\n * ...\n * foo := &pb.Foo{}\n * if err := ptypes.UnmarshalAny(any, foo); err != nil {\n * ...\n * }\n *\n * The pack methods provided by protobuf library will by default use\n * 'type.googleapis.com/full.type.name' as the type URL and the unpack\n * methods only use the fully qualified type name after the last '/'\n * in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n * name \"y.z\".\n *\n *\n * JSON\n * ====\n * The JSON representation of an `Any` value uses the regular\n * representation of the deserialized, embedded message, with an\n * additional field `@type` which contains the type URL. Example:\n *\n * package google.profile;\n * message Person {\n * string first_name = 1;\n * string last_name = 2;\n * }\n *\n * {\n * \"@type\": \"type.googleapis.com/google.profile.Person\",\n * \"firstName\": ,\n * \"lastName\": \n * }\n *\n * If the embedded message type is well-known and has a custom JSON\n * representation, that representation will be embedded adding a field\n * `value` which holds the custom JSON in addition to the `@type`\n * field. Example (for message [google.protobuf.Duration][]):\n *\n * {\n * \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n * \"value\": \"1.212s\"\n * }\n */\nexport interface Any {\n /**\n * A URL/resource name that uniquely identifies the type of the serialized\n * protocol buffer message. This string must contain at least\n * one \"/\" character. The last segment of the URL's path must represent\n * the fully qualified name of the type (as in\n * `path/google.protobuf.Duration`). The name should be in a canonical form\n * (e.g., leading \".\" is not accepted).\n *\n * In practice, teams usually precompile into the binary all types that they\n * expect it to use in the context of Any. However, for URLs which use the\n * scheme `http`, `https`, or no scheme, one can optionally set up a type\n * server that maps type URLs to message definitions as follows:\n *\n * * If no scheme is provided, `https` is assumed.\n * * An HTTP GET on the URL must yield a [google.protobuf.Type][]\n * value in binary format, or produce an error.\n * * Applications are allowed to cache lookup results based on the\n * URL, or have them precompiled into a binary to avoid any\n * lookup. Therefore, binary compatibility needs to be preserved\n * on changes to types. (Use versioned type names to manage\n * breaking changes.)\n *\n * Note: this functionality is not currently available in the official\n * protobuf release, and it is not used for type URLs beginning with\n * type.googleapis.com.\n *\n * Schemes other than `http`, `https` (or the empty scheme) might be\n * used with implementation specific semantics.\n */\n type_url: string;\n /** Must be a valid serialized protocol buffer of the above specified type. */\n value: Uint8Array;\n}\n\nfunction createBaseAny(): Any {\n return { type_url: \"\", value: new Uint8Array() };\n}\n\nexport const Any = {\n encode(message: Any, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.type_url !== \"\") {\n writer.uint32(10).string(message.type_url);\n }\n if (message.value.length !== 0) {\n writer.uint32(18).bytes(message.value);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Any {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseAny();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.type_url = reader.string();\n break;\n case 2:\n message.value = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Any {\n return {\n type_url: isSet(object.type_url) ? String(object.type_url) : \"\",\n value: isSet(object.value)\n ? bytesFromBase64(object.value)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: Any): unknown {\n const obj: any = {};\n message.type_url !== undefined && (obj.type_url = message.type_url);\n message.value !== undefined &&\n (obj.value = base64FromBytes(\n message.value !== undefined ? message.value : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): Any {\n const message = createBaseAny();\n message.type_url = object.type_url ?? \"\";\n message.value = object.value ?? new Uint8Array();\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"google.protobuf\";\n\n/**\n * A Duration represents a signed, fixed-length span of time represented\n * as a count of seconds and fractions of seconds at nanosecond\n * resolution. It is independent of any calendar and concepts like \"day\"\n * or \"month\". It is related to Timestamp in that the difference between\n * two Timestamp values is a Duration and it can be added or subtracted\n * from a Timestamp. Range is approximately +-10,000 years.\n *\n * # Examples\n *\n * Example 1: Compute Duration from two Timestamps in pseudo code.\n *\n * Timestamp start = ...;\n * Timestamp end = ...;\n * Duration duration = ...;\n *\n * duration.seconds = end.seconds - start.seconds;\n * duration.nanos = end.nanos - start.nanos;\n *\n * if (duration.seconds < 0 && duration.nanos > 0) {\n * duration.seconds += 1;\n * duration.nanos -= 1000000000;\n * } else if (durations.seconds > 0 && duration.nanos < 0) {\n * duration.seconds -= 1;\n * duration.nanos += 1000000000;\n * }\n *\n * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n *\n * Timestamp start = ...;\n * Duration duration = ...;\n * Timestamp end = ...;\n *\n * end.seconds = start.seconds + duration.seconds;\n * end.nanos = start.nanos + duration.nanos;\n *\n * if (end.nanos < 0) {\n * end.seconds -= 1;\n * end.nanos += 1000000000;\n * } else if (end.nanos >= 1000000000) {\n * end.seconds += 1;\n * end.nanos -= 1000000000;\n * }\n *\n * Example 3: Compute Duration from datetime.timedelta in Python.\n *\n * td = datetime.timedelta(days=3, minutes=10)\n * duration = Duration()\n * duration.FromTimedelta(td)\n *\n * # JSON Mapping\n *\n * In JSON format, the Duration type is encoded as a string rather than an\n * object, where the string ends in the suffix \"s\" (indicating seconds) and\n * is preceded by the number of seconds, with nanoseconds expressed as\n * fractional seconds. For example, 3 seconds with 0 nanoseconds should be\n * encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\n * be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1\n * microsecond should be expressed in JSON format as \"3.000001s\".\n */\nexport interface Duration {\n /**\n * Signed seconds of the span of time. Must be from -315,576,000,000\n * to +315,576,000,000 inclusive. Note: these bounds are computed from:\n * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years\n */\n seconds: string;\n /**\n * Signed fractions of a second at nanosecond resolution of the span\n * of time. Durations less than one second are represented with a 0\n * `seconds` field and a positive or negative `nanos` field. For durations\n * of one second or more, a non-zero value for the `nanos` field must be\n * of the same sign as the `seconds` field. Must be from -999,999,999\n * to +999,999,999 inclusive.\n */\n nanos: number;\n}\n\nfunction createBaseDuration(): Duration {\n return { seconds: \"0\", nanos: 0 };\n}\n\nexport const Duration = {\n encode(\n message: Duration,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.seconds !== \"0\") {\n writer.uint32(8).int64(message.seconds);\n }\n if (message.nanos !== 0) {\n writer.uint32(16).int32(message.nanos);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Duration {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDuration();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.seconds = longToString(reader.int64() as Long);\n break;\n case 2:\n message.nanos = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Duration {\n return {\n seconds: isSet(object.seconds) ? String(object.seconds) : \"0\",\n nanos: isSet(object.nanos) ? Number(object.nanos) : 0,\n };\n },\n\n toJSON(message: Duration): unknown {\n const obj: any = {};\n message.seconds !== undefined && (obj.seconds = message.seconds);\n message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));\n return obj;\n },\n\n fromPartial, I>>(object: I): Duration {\n const message = createBaseDuration();\n message.seconds = object.seconds ?? \"0\";\n message.nanos = object.nanos ?? 0;\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"google.protobuf\";\n\n/**\n * A Timestamp represents a point in time independent of any time zone or local\n * calendar, encoded as a count of seconds and fractions of seconds at\n * nanosecond resolution. The count is relative to an epoch at UTC midnight on\n * January 1, 1970, in the proleptic Gregorian calendar which extends the\n * Gregorian calendar backwards to year one.\n *\n * All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n * second table is needed for interpretation, using a [24-hour linear\n * smear](https://developers.google.com/time/smear).\n *\n * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n * restricting to that range, we ensure that we can convert to and from [RFC\n * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n *\n * # Examples\n *\n * Example 1: Compute Timestamp from POSIX `time()`.\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(time(NULL));\n * timestamp.set_nanos(0);\n *\n * Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n *\n * struct timeval tv;\n * gettimeofday(&tv, NULL);\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(tv.tv_sec);\n * timestamp.set_nanos(tv.tv_usec * 1000);\n *\n * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n *\n * FILETIME ft;\n * GetSystemTimeAsFileTime(&ft);\n * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n *\n * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n * Timestamp timestamp;\n * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n *\n * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n *\n * long millis = System.currentTimeMillis();\n *\n * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n * .setNanos((int) ((millis % 1000) * 1000000)).build();\n *\n *\n * Example 5: Compute Timestamp from current time in Python.\n *\n * timestamp = Timestamp()\n * timestamp.GetCurrentTime()\n *\n * # JSON Mapping\n *\n * In JSON format, the Timestamp type is encoded as a string in the\n * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n * format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n * where {year} is always expressed using four digits while {month}, {day},\n * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n * are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n * is required. A proto3 JSON serializer should always use UTC (as indicated by\n * \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n * able to accept both UTC and other timezones (as indicated by an offset).\n *\n * For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n * 01:30 UTC on January 15, 2017.\n *\n * In JavaScript, one can convert a Date object to this format using the\n * standard\n * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n * method. In Python, a standard `datetime.datetime` object can be converted\n * to this format using\n * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n * the Joda Time's [`ISODateTimeFormat.dateTime()`](\n * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D\n * ) to obtain a formatter capable of generating timestamps in this format.\n */\nexport interface Timestamp {\n /**\n * Represents seconds of UTC time since Unix epoch\n * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59Z inclusive.\n */\n seconds: string;\n /**\n * Non-negative fractions of a second at nanosecond resolution. Negative\n * second values with fractions must still have non-negative nanos values\n * that count forward in time. Must be from 0 to 999,999,999\n * inclusive.\n */\n nanos: number;\n}\n\nfunction createBaseTimestamp(): Timestamp {\n return { seconds: \"0\", nanos: 0 };\n}\n\nexport const Timestamp = {\n encode(\n message: Timestamp,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.seconds !== \"0\") {\n writer.uint32(8).int64(message.seconds);\n }\n if (message.nanos !== 0) {\n writer.uint32(16).int32(message.nanos);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTimestamp();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.seconds = longToString(reader.int64() as Long);\n break;\n case 2:\n message.nanos = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Timestamp {\n return {\n seconds: isSet(object.seconds) ? String(object.seconds) : \"0\",\n nanos: isSet(object.nanos) ? Number(object.nanos) : 0,\n };\n },\n\n toJSON(message: Timestamp): unknown {\n const obj: any = {};\n message.seconds !== undefined && (obj.seconds = message.seconds);\n message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Timestamp {\n const message = createBaseTimestamp();\n message.seconds = object.seconds ?? \"0\";\n message.nanos = object.nanos ?? 0;\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { PacketId } from \"../../../core/channel/v1/channel\";\nimport { Coin } from \"../../../../cosmos/base/v1beta1/coin\";\n\nexport const protobufPackage = \"ibc.applications.fee.v1\";\n\n/** Fee defines the ICS29 receive, acknowledgement and timeout fees */\nexport interface Fee {\n /** the packet receive fee */\n recv_fee: Coin[];\n /** the packet acknowledgement fee */\n ack_fee: Coin[];\n /** the packet timeout fee */\n timeout_fee: Coin[];\n}\n\n/** PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers */\nexport interface PacketFee {\n /** fee encapsulates the recv, ack and timeout fees associated with an IBC packet */\n fee?: Fee;\n /** the refund address for unspent fees */\n refund_address: string;\n /** optional list of relayers permitted to receive fees */\n relayers: string[];\n}\n\n/** PacketFees contains a list of type PacketFee */\nexport interface PacketFees {\n /** list of packet fees */\n packet_fees: PacketFee[];\n}\n\n/** IdentifiedPacketFees contains a list of type PacketFee and associated PacketId */\nexport interface IdentifiedPacketFees {\n /** unique packet identifier comprised of the channel ID, port ID and sequence */\n packet_id?: PacketId;\n /** list of packet fees */\n packet_fees: PacketFee[];\n}\n\nfunction createBaseFee(): Fee {\n return { recv_fee: [], ack_fee: [], timeout_fee: [] };\n}\n\nexport const Fee = {\n encode(message: Fee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n for (const v of message.recv_fee) {\n Coin.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.ack_fee) {\n Coin.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n for (const v of message.timeout_fee) {\n Coin.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Fee {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseFee();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.recv_fee.push(Coin.decode(reader, reader.uint32()));\n break;\n case 2:\n message.ack_fee.push(Coin.decode(reader, reader.uint32()));\n break;\n case 3:\n message.timeout_fee.push(Coin.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Fee {\n return {\n recv_fee: Array.isArray(object?.recv_fee)\n ? object.recv_fee.map((e: any) => Coin.fromJSON(e))\n : [],\n ack_fee: Array.isArray(object?.ack_fee)\n ? object.ack_fee.map((e: any) => Coin.fromJSON(e))\n : [],\n timeout_fee: Array.isArray(object?.timeout_fee)\n ? object.timeout_fee.map((e: any) => Coin.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Fee): unknown {\n const obj: any = {};\n if (message.recv_fee) {\n obj.recv_fee = message.recv_fee.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.recv_fee = [];\n }\n if (message.ack_fee) {\n obj.ack_fee = message.ack_fee.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.ack_fee = [];\n }\n if (message.timeout_fee) {\n obj.timeout_fee = message.timeout_fee.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.timeout_fee = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Fee {\n const message = createBaseFee();\n message.recv_fee = object.recv_fee?.map((e) => Coin.fromPartial(e)) || [];\n message.ack_fee = object.ack_fee?.map((e) => Coin.fromPartial(e)) || [];\n message.timeout_fee =\n object.timeout_fee?.map((e) => Coin.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBasePacketFee(): PacketFee {\n return { fee: undefined, refund_address: \"\", relayers: [] };\n}\n\nexport const PacketFee = {\n encode(\n message: PacketFee,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.fee !== undefined) {\n Fee.encode(message.fee, writer.uint32(10).fork()).ldelim();\n }\n if (message.refund_address !== \"\") {\n writer.uint32(18).string(message.refund_address);\n }\n for (const v of message.relayers) {\n writer.uint32(26).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PacketFee {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePacketFee();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.fee = Fee.decode(reader, reader.uint32());\n break;\n case 2:\n message.refund_address = reader.string();\n break;\n case 3:\n message.relayers.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PacketFee {\n return {\n fee: isSet(object.fee) ? Fee.fromJSON(object.fee) : undefined,\n refund_address: isSet(object.refund_address)\n ? String(object.refund_address)\n : \"\",\n relayers: Array.isArray(object?.relayers)\n ? object.relayers.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: PacketFee): unknown {\n const obj: any = {};\n message.fee !== undefined &&\n (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);\n message.refund_address !== undefined &&\n (obj.refund_address = message.refund_address);\n if (message.relayers) {\n obj.relayers = message.relayers.map((e) => e);\n } else {\n obj.relayers = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): PacketFee {\n const message = createBasePacketFee();\n message.fee =\n object.fee !== undefined && object.fee !== null\n ? Fee.fromPartial(object.fee)\n : undefined;\n message.refund_address = object.refund_address ?? \"\";\n message.relayers = object.relayers?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBasePacketFees(): PacketFees {\n return { packet_fees: [] };\n}\n\nexport const PacketFees = {\n encode(\n message: PacketFees,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.packet_fees) {\n PacketFee.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PacketFees {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePacketFees();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.packet_fees.push(PacketFee.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PacketFees {\n return {\n packet_fees: Array.isArray(object?.packet_fees)\n ? object.packet_fees.map((e: any) => PacketFee.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: PacketFees): unknown {\n const obj: any = {};\n if (message.packet_fees) {\n obj.packet_fees = message.packet_fees.map((e) =>\n e ? PacketFee.toJSON(e) : undefined,\n );\n } else {\n obj.packet_fees = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): PacketFees {\n const message = createBasePacketFees();\n message.packet_fees =\n object.packet_fees?.map((e) => PacketFee.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseIdentifiedPacketFees(): IdentifiedPacketFees {\n return { packet_id: undefined, packet_fees: [] };\n}\n\nexport const IdentifiedPacketFees = {\n encode(\n message: IdentifiedPacketFees,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.packet_id !== undefined) {\n PacketId.encode(message.packet_id, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.packet_fees) {\n PacketFee.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): IdentifiedPacketFees {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseIdentifiedPacketFees();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.packet_id = PacketId.decode(reader, reader.uint32());\n break;\n case 2:\n message.packet_fees.push(PacketFee.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): IdentifiedPacketFees {\n return {\n packet_id: isSet(object.packet_id)\n ? PacketId.fromJSON(object.packet_id)\n : undefined,\n packet_fees: Array.isArray(object?.packet_fees)\n ? object.packet_fees.map((e: any) => PacketFee.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: IdentifiedPacketFees): unknown {\n const obj: any = {};\n message.packet_id !== undefined &&\n (obj.packet_id = message.packet_id\n ? PacketId.toJSON(message.packet_id)\n : undefined);\n if (message.packet_fees) {\n obj.packet_fees = message.packet_fees.map((e) =>\n e ? PacketFee.toJSON(e) : undefined,\n );\n } else {\n obj.packet_fees = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): IdentifiedPacketFees {\n const message = createBaseIdentifiedPacketFees();\n message.packet_id =\n object.packet_id !== undefined && object.packet_id !== null\n ? PacketId.fromPartial(object.packet_id)\n : undefined;\n message.packet_fees =\n object.packet_fees?.map((e) => PacketFee.fromPartial(e)) || [];\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Fee, PacketFee } from \"./fee\";\nimport { PacketId } from \"../../../core/channel/v1/channel\";\n\nexport const protobufPackage = \"ibc.applications.fee.v1\";\n\n/** MsgRegisterPayee defines the request type for the RegisterPayee rpc */\nexport interface MsgRegisterPayee {\n /** unique port identifier */\n port_id: string;\n /** unique channel identifier */\n channel_id: string;\n /** the relayer address */\n relayer: string;\n /** the payee address */\n payee: string;\n}\n\n/** MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc */\nexport interface MsgRegisterPayeeResponse {}\n\n/** MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc */\nexport interface MsgRegisterCounterpartyPayee {\n /** unique port identifier */\n port_id: string;\n /** unique channel identifier */\n channel_id: string;\n /** the relayer address */\n relayer: string;\n /** the counterparty payee address */\n counterparty_payee: string;\n}\n\n/** MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc */\nexport interface MsgRegisterCounterpartyPayeeResponse {}\n\n/**\n * MsgPayPacketFee defines the request type for the PayPacketFee rpc\n * This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be\n * paid for\n */\nexport interface MsgPayPacketFee {\n /** fee encapsulates the recv, ack and timeout fees associated with an IBC packet */\n fee?: Fee;\n /** the source port unique identifier */\n source_port_id: string;\n /** the source channel unique identifer */\n source_channel_id: string;\n /** account address to refund fee if necessary */\n signer: string;\n /** optional list of relayers permitted to the receive packet fees */\n relayers: string[];\n}\n\n/** MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc */\nexport interface MsgPayPacketFeeResponse {}\n\n/**\n * MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc\n * This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send)\n */\nexport interface MsgPayPacketFeeAsync {\n /** unique packet identifier comprised of the channel ID, port ID and sequence */\n packet_id?: PacketId;\n /** the packet fee associated with a particular IBC packet */\n packet_fee?: PacketFee;\n}\n\n/** MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc */\nexport interface MsgPayPacketFeeAsyncResponse {}\n\nfunction createBaseMsgRegisterPayee(): MsgRegisterPayee {\n return { port_id: \"\", channel_id: \"\", relayer: \"\", payee: \"\" };\n}\n\nexport const MsgRegisterPayee = {\n encode(\n message: MsgRegisterPayee,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n if (message.relayer !== \"\") {\n writer.uint32(26).string(message.relayer);\n }\n if (message.payee !== \"\") {\n writer.uint32(34).string(message.payee);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterPayee {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRegisterPayee();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n case 3:\n message.relayer = reader.string();\n break;\n case 4:\n message.payee = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgRegisterPayee {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n relayer: isSet(object.relayer) ? String(object.relayer) : \"\",\n payee: isSet(object.payee) ? String(object.payee) : \"\",\n };\n },\n\n toJSON(message: MsgRegisterPayee): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.relayer !== undefined && (obj.relayer = message.relayer);\n message.payee !== undefined && (obj.payee = message.payee);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgRegisterPayee {\n const message = createBaseMsgRegisterPayee();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n message.relayer = object.relayer ?? \"\";\n message.payee = object.payee ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgRegisterPayeeResponse(): MsgRegisterPayeeResponse {\n return {};\n}\n\nexport const MsgRegisterPayeeResponse = {\n encode(\n _: MsgRegisterPayeeResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgRegisterPayeeResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRegisterPayeeResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgRegisterPayeeResponse {\n return {};\n },\n\n toJSON(_: MsgRegisterPayeeResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgRegisterPayeeResponse {\n const message = createBaseMsgRegisterPayeeResponse();\n return message;\n },\n};\n\nfunction createBaseMsgRegisterCounterpartyPayee(): MsgRegisterCounterpartyPayee {\n return { port_id: \"\", channel_id: \"\", relayer: \"\", counterparty_payee: \"\" };\n}\n\nexport const MsgRegisterCounterpartyPayee = {\n encode(\n message: MsgRegisterCounterpartyPayee,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n if (message.relayer !== \"\") {\n writer.uint32(26).string(message.relayer);\n }\n if (message.counterparty_payee !== \"\") {\n writer.uint32(34).string(message.counterparty_payee);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgRegisterCounterpartyPayee {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRegisterCounterpartyPayee();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n case 3:\n message.relayer = reader.string();\n break;\n case 4:\n message.counterparty_payee = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgRegisterCounterpartyPayee {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n relayer: isSet(object.relayer) ? String(object.relayer) : \"\",\n counterparty_payee: isSet(object.counterparty_payee)\n ? String(object.counterparty_payee)\n : \"\",\n };\n },\n\n toJSON(message: MsgRegisterCounterpartyPayee): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.relayer !== undefined && (obj.relayer = message.relayer);\n message.counterparty_payee !== undefined &&\n (obj.counterparty_payee = message.counterparty_payee);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgRegisterCounterpartyPayee {\n const message = createBaseMsgRegisterCounterpartyPayee();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n message.relayer = object.relayer ?? \"\";\n message.counterparty_payee = object.counterparty_payee ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgRegisterCounterpartyPayeeResponse(): MsgRegisterCounterpartyPayeeResponse {\n return {};\n}\n\nexport const MsgRegisterCounterpartyPayeeResponse = {\n encode(\n _: MsgRegisterCounterpartyPayeeResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgRegisterCounterpartyPayeeResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRegisterCounterpartyPayeeResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgRegisterCounterpartyPayeeResponse {\n return {};\n },\n\n toJSON(_: MsgRegisterCounterpartyPayeeResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial<\n I extends Exact, I>,\n >(_: I): MsgRegisterCounterpartyPayeeResponse {\n const message = createBaseMsgRegisterCounterpartyPayeeResponse();\n return message;\n },\n};\n\nfunction createBaseMsgPayPacketFee(): MsgPayPacketFee {\n return {\n fee: undefined,\n source_port_id: \"\",\n source_channel_id: \"\",\n signer: \"\",\n relayers: [],\n };\n}\n\nexport const MsgPayPacketFee = {\n encode(\n message: MsgPayPacketFee,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.fee !== undefined) {\n Fee.encode(message.fee, writer.uint32(10).fork()).ldelim();\n }\n if (message.source_port_id !== \"\") {\n writer.uint32(18).string(message.source_port_id);\n }\n if (message.source_channel_id !== \"\") {\n writer.uint32(26).string(message.source_channel_id);\n }\n if (message.signer !== \"\") {\n writer.uint32(34).string(message.signer);\n }\n for (const v of message.relayers) {\n writer.uint32(42).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgPayPacketFee {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgPayPacketFee();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.fee = Fee.decode(reader, reader.uint32());\n break;\n case 2:\n message.source_port_id = reader.string();\n break;\n case 3:\n message.source_channel_id = reader.string();\n break;\n case 4:\n message.signer = reader.string();\n break;\n case 5:\n message.relayers.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgPayPacketFee {\n return {\n fee: isSet(object.fee) ? Fee.fromJSON(object.fee) : undefined,\n source_port_id: isSet(object.source_port_id)\n ? String(object.source_port_id)\n : \"\",\n source_channel_id: isSet(object.source_channel_id)\n ? String(object.source_channel_id)\n : \"\",\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n relayers: Array.isArray(object?.relayers)\n ? object.relayers.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: MsgPayPacketFee): unknown {\n const obj: any = {};\n message.fee !== undefined &&\n (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);\n message.source_port_id !== undefined &&\n (obj.source_port_id = message.source_port_id);\n message.source_channel_id !== undefined &&\n (obj.source_channel_id = message.source_channel_id);\n message.signer !== undefined && (obj.signer = message.signer);\n if (message.relayers) {\n obj.relayers = message.relayers.map((e) => e);\n } else {\n obj.relayers = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgPayPacketFee {\n const message = createBaseMsgPayPacketFee();\n message.fee =\n object.fee !== undefined && object.fee !== null\n ? Fee.fromPartial(object.fee)\n : undefined;\n message.source_port_id = object.source_port_id ?? \"\";\n message.source_channel_id = object.source_channel_id ?? \"\";\n message.signer = object.signer ?? \"\";\n message.relayers = object.relayers?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseMsgPayPacketFeeResponse(): MsgPayPacketFeeResponse {\n return {};\n}\n\nexport const MsgPayPacketFeeResponse = {\n encode(\n _: MsgPayPacketFeeResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgPayPacketFeeResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgPayPacketFeeResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgPayPacketFeeResponse {\n return {};\n },\n\n toJSON(_: MsgPayPacketFeeResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgPayPacketFeeResponse {\n const message = createBaseMsgPayPacketFeeResponse();\n return message;\n },\n};\n\nfunction createBaseMsgPayPacketFeeAsync(): MsgPayPacketFeeAsync {\n return { packet_id: undefined, packet_fee: undefined };\n}\n\nexport const MsgPayPacketFeeAsync = {\n encode(\n message: MsgPayPacketFeeAsync,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.packet_id !== undefined) {\n PacketId.encode(message.packet_id, writer.uint32(10).fork()).ldelim();\n }\n if (message.packet_fee !== undefined) {\n PacketFee.encode(message.packet_fee, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgPayPacketFeeAsync {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgPayPacketFeeAsync();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.packet_id = PacketId.decode(reader, reader.uint32());\n break;\n case 2:\n message.packet_fee = PacketFee.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgPayPacketFeeAsync {\n return {\n packet_id: isSet(object.packet_id)\n ? PacketId.fromJSON(object.packet_id)\n : undefined,\n packet_fee: isSet(object.packet_fee)\n ? PacketFee.fromJSON(object.packet_fee)\n : undefined,\n };\n },\n\n toJSON(message: MsgPayPacketFeeAsync): unknown {\n const obj: any = {};\n message.packet_id !== undefined &&\n (obj.packet_id = message.packet_id\n ? PacketId.toJSON(message.packet_id)\n : undefined);\n message.packet_fee !== undefined &&\n (obj.packet_fee = message.packet_fee\n ? PacketFee.toJSON(message.packet_fee)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgPayPacketFeeAsync {\n const message = createBaseMsgPayPacketFeeAsync();\n message.packet_id =\n object.packet_id !== undefined && object.packet_id !== null\n ? PacketId.fromPartial(object.packet_id)\n : undefined;\n message.packet_fee =\n object.packet_fee !== undefined && object.packet_fee !== null\n ? PacketFee.fromPartial(object.packet_fee)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseMsgPayPacketFeeAsyncResponse(): MsgPayPacketFeeAsyncResponse {\n return {};\n}\n\nexport const MsgPayPacketFeeAsyncResponse = {\n encode(\n _: MsgPayPacketFeeAsyncResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgPayPacketFeeAsyncResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgPayPacketFeeAsyncResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgPayPacketFeeAsyncResponse {\n return {};\n },\n\n toJSON(_: MsgPayPacketFeeAsyncResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgPayPacketFeeAsyncResponse {\n const message = createBaseMsgPayPacketFeeAsyncResponse();\n return message;\n },\n};\n\n/** Msg defines the ICS29 Msg service. */\nexport interface Msg {\n /**\n * RegisterPayee defines a rpc handler method for MsgRegisterPayee\n * RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional\n * payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on\n * the source chain from which packets originate as this is where fee distribution takes place. This function may be\n * called more than once by a relayer, in which case, the latest payee is always used.\n */\n RegisterPayee(request: MsgRegisterPayee): Promise;\n /**\n * RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee\n * RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty\n * payee address before relaying. This ensures they will be properly compensated for forward relaying since\n * the destination chain must include the registered counterparty payee address in the acknowledgement. This function\n * may be called more than once by a relayer, in which case, the latest counterparty payee address is always used.\n */\n RegisterCounterpartyPayee(\n request: MsgRegisterCounterpartyPayee,\n ): Promise;\n /**\n * PayPacketFee defines a rpc handler method for MsgPayPacketFee\n * PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to\n * incentivize the relaying of the packet at the next sequence\n * NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows\n * initiates the lifecycle of the incentivized packet\n */\n PayPacketFee(request: MsgPayPacketFee): Promise;\n /**\n * PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync\n * PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to\n * incentivize the relaying of a known packet (i.e. at a particular sequence)\n */\n PayPacketFeeAsync(\n request: MsgPayPacketFeeAsync,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.RegisterPayee = this.RegisterPayee.bind(this);\n this.RegisterCounterpartyPayee = this.RegisterCounterpartyPayee.bind(this);\n this.PayPacketFee = this.PayPacketFee.bind(this);\n this.PayPacketFeeAsync = this.PayPacketFeeAsync.bind(this);\n }\n RegisterPayee(request: MsgRegisterPayee): Promise {\n const data = MsgRegisterPayee.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.applications.fee.v1.Msg\",\n \"RegisterPayee\",\n data,\n );\n return promise.then((data) =>\n MsgRegisterPayeeResponse.decode(new _m0.Reader(data)),\n );\n }\n\n RegisterCounterpartyPayee(\n request: MsgRegisterCounterpartyPayee,\n ): Promise {\n const data = MsgRegisterCounterpartyPayee.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.applications.fee.v1.Msg\",\n \"RegisterCounterpartyPayee\",\n data,\n );\n return promise.then((data) =>\n MsgRegisterCounterpartyPayeeResponse.decode(new _m0.Reader(data)),\n );\n }\n\n PayPacketFee(request: MsgPayPacketFee): Promise {\n const data = MsgPayPacketFee.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.applications.fee.v1.Msg\",\n \"PayPacketFee\",\n data,\n );\n return promise.then((data) =>\n MsgPayPacketFeeResponse.decode(new _m0.Reader(data)),\n );\n }\n\n PayPacketFeeAsync(\n request: MsgPayPacketFeeAsync,\n ): Promise {\n const data = MsgPayPacketFeeAsync.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.applications.fee.v1.Msg\",\n \"PayPacketFeeAsync\",\n data,\n );\n return promise.then((data) =>\n MsgPayPacketFeeAsyncResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Coin } from \"../../../../cosmos/base/v1beta1/coin\";\nimport { Height } from \"../../../core/client/v1/client\";\n\nexport const protobufPackage = \"ibc.applications.transfer.v1\";\n\n/**\n * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between\n * ICS20 enabled chains. See ICS Spec here:\n * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures\n */\nexport interface MsgTransfer {\n /** the port on which the packet will be sent */\n source_port: string;\n /** the channel by which the packet will be sent */\n source_channel: string;\n /** the tokens to be transferred */\n token?: Coin;\n /** the sender address */\n sender: string;\n /** the recipient address on the destination chain */\n receiver: string;\n /**\n * Timeout height relative to the current block height.\n * The timeout is disabled when set to 0.\n */\n timeout_height?: Height;\n /**\n * Timeout timestamp in absolute nanoseconds since unix epoch.\n * The timeout is disabled when set to 0.\n */\n timeout_timestamp: string;\n /** optional memo */\n memo: string;\n}\n\n/** MsgTransferResponse defines the Msg/Transfer response type. */\nexport interface MsgTransferResponse {\n /** sequence number of the transfer packet sent */\n sequence: string;\n}\n\nfunction createBaseMsgTransfer(): MsgTransfer {\n return {\n source_port: \"\",\n source_channel: \"\",\n token: undefined,\n sender: \"\",\n receiver: \"\",\n timeout_height: undefined,\n timeout_timestamp: \"0\",\n memo: \"\",\n };\n}\n\nexport const MsgTransfer = {\n encode(\n message: MsgTransfer,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.source_port !== \"\") {\n writer.uint32(10).string(message.source_port);\n }\n if (message.source_channel !== \"\") {\n writer.uint32(18).string(message.source_channel);\n }\n if (message.token !== undefined) {\n Coin.encode(message.token, writer.uint32(26).fork()).ldelim();\n }\n if (message.sender !== \"\") {\n writer.uint32(34).string(message.sender);\n }\n if (message.receiver !== \"\") {\n writer.uint32(42).string(message.receiver);\n }\n if (message.timeout_height !== undefined) {\n Height.encode(message.timeout_height, writer.uint32(50).fork()).ldelim();\n }\n if (message.timeout_timestamp !== \"0\") {\n writer.uint32(56).uint64(message.timeout_timestamp);\n }\n if (message.memo !== \"\") {\n writer.uint32(66).string(message.memo);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgTransfer {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgTransfer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.source_port = reader.string();\n break;\n case 2:\n message.source_channel = reader.string();\n break;\n case 3:\n message.token = Coin.decode(reader, reader.uint32());\n break;\n case 4:\n message.sender = reader.string();\n break;\n case 5:\n message.receiver = reader.string();\n break;\n case 6:\n message.timeout_height = Height.decode(reader, reader.uint32());\n break;\n case 7:\n message.timeout_timestamp = longToString(reader.uint64() as Long);\n break;\n case 8:\n message.memo = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgTransfer {\n return {\n source_port: isSet(object.source_port) ? String(object.source_port) : \"\",\n source_channel: isSet(object.source_channel)\n ? String(object.source_channel)\n : \"\",\n token: isSet(object.token) ? Coin.fromJSON(object.token) : undefined,\n sender: isSet(object.sender) ? String(object.sender) : \"\",\n receiver: isSet(object.receiver) ? String(object.receiver) : \"\",\n timeout_height: isSet(object.timeout_height)\n ? Height.fromJSON(object.timeout_height)\n : undefined,\n timeout_timestamp: isSet(object.timeout_timestamp)\n ? String(object.timeout_timestamp)\n : \"0\",\n memo: isSet(object.memo) ? String(object.memo) : \"\",\n };\n },\n\n toJSON(message: MsgTransfer): unknown {\n const obj: any = {};\n message.source_port !== undefined &&\n (obj.source_port = message.source_port);\n message.source_channel !== undefined &&\n (obj.source_channel = message.source_channel);\n message.token !== undefined &&\n (obj.token = message.token ? Coin.toJSON(message.token) : undefined);\n message.sender !== undefined && (obj.sender = message.sender);\n message.receiver !== undefined && (obj.receiver = message.receiver);\n message.timeout_height !== undefined &&\n (obj.timeout_height = message.timeout_height\n ? Height.toJSON(message.timeout_height)\n : undefined);\n message.timeout_timestamp !== undefined &&\n (obj.timeout_timestamp = message.timeout_timestamp);\n message.memo !== undefined && (obj.memo = message.memo);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgTransfer {\n const message = createBaseMsgTransfer();\n message.source_port = object.source_port ?? \"\";\n message.source_channel = object.source_channel ?? \"\";\n message.token =\n object.token !== undefined && object.token !== null\n ? Coin.fromPartial(object.token)\n : undefined;\n message.sender = object.sender ?? \"\";\n message.receiver = object.receiver ?? \"\";\n message.timeout_height =\n object.timeout_height !== undefined && object.timeout_height !== null\n ? Height.fromPartial(object.timeout_height)\n : undefined;\n message.timeout_timestamp = object.timeout_timestamp ?? \"0\";\n message.memo = object.memo ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgTransferResponse(): MsgTransferResponse {\n return { sequence: \"0\" };\n}\n\nexport const MsgTransferResponse = {\n encode(\n message: MsgTransferResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sequence !== \"0\") {\n writer.uint32(8).uint64(message.sequence);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgTransferResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgTransferResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sequence = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgTransferResponse {\n return {\n sequence: isSet(object.sequence) ? String(object.sequence) : \"0\",\n };\n },\n\n toJSON(message: MsgTransferResponse): unknown {\n const obj: any = {};\n message.sequence !== undefined && (obj.sequence = message.sequence);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgTransferResponse {\n const message = createBaseMsgTransferResponse();\n message.sequence = object.sequence ?? \"0\";\n return message;\n },\n};\n\n/** Msg defines the ibc/transfer Msg service. */\nexport interface Msg {\n /** Transfer defines a rpc handler method for MsgTransfer. */\n Transfer(request: MsgTransfer): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.Transfer = this.Transfer.bind(this);\n }\n Transfer(request: MsgTransfer): Promise {\n const data = MsgTransfer.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.applications.transfer.v1.Msg\",\n \"Transfer\",\n data,\n );\n return promise.then((data) =>\n MsgTransferResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Height } from \"../../client/v1/client\";\n\nexport const protobufPackage = \"ibc.core.channel.v1\";\n\n/**\n * State defines if a channel is in one of the following states:\n * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED.\n */\nexport enum State {\n /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */\n STATE_UNINITIALIZED_UNSPECIFIED = 0,\n /** STATE_INIT - A channel has just started the opening handshake. */\n STATE_INIT = 1,\n /** STATE_TRYOPEN - A channel has acknowledged the handshake step on the counterparty chain. */\n STATE_TRYOPEN = 2,\n /**\n * STATE_OPEN - A channel has completed the handshake. Open channels are\n * ready to send and receive packets.\n */\n STATE_OPEN = 3,\n /**\n * STATE_CLOSED - A channel has been closed and can no longer be used to send or receive\n * packets.\n */\n STATE_CLOSED = 4,\n UNRECOGNIZED = -1,\n}\n\nexport function stateFromJSON(object: any): State {\n switch (object) {\n case 0:\n case \"STATE_UNINITIALIZED_UNSPECIFIED\":\n return State.STATE_UNINITIALIZED_UNSPECIFIED;\n case 1:\n case \"STATE_INIT\":\n return State.STATE_INIT;\n case 2:\n case \"STATE_TRYOPEN\":\n return State.STATE_TRYOPEN;\n case 3:\n case \"STATE_OPEN\":\n return State.STATE_OPEN;\n case 4:\n case \"STATE_CLOSED\":\n return State.STATE_CLOSED;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return State.UNRECOGNIZED;\n }\n}\n\nexport function stateToJSON(object: State): string {\n switch (object) {\n case State.STATE_UNINITIALIZED_UNSPECIFIED:\n return \"STATE_UNINITIALIZED_UNSPECIFIED\";\n case State.STATE_INIT:\n return \"STATE_INIT\";\n case State.STATE_TRYOPEN:\n return \"STATE_TRYOPEN\";\n case State.STATE_OPEN:\n return \"STATE_OPEN\";\n case State.STATE_CLOSED:\n return \"STATE_CLOSED\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/** Order defines if a channel is ORDERED or UNORDERED */\nexport enum Order {\n /** ORDER_NONE_UNSPECIFIED - zero-value for channel ordering */\n ORDER_NONE_UNSPECIFIED = 0,\n /**\n * ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in\n * which they were sent.\n */\n ORDER_UNORDERED = 1,\n /** ORDER_ORDERED - packets are delivered exactly in the order which they were sent */\n ORDER_ORDERED = 2,\n UNRECOGNIZED = -1,\n}\n\nexport function orderFromJSON(object: any): Order {\n switch (object) {\n case 0:\n case \"ORDER_NONE_UNSPECIFIED\":\n return Order.ORDER_NONE_UNSPECIFIED;\n case 1:\n case \"ORDER_UNORDERED\":\n return Order.ORDER_UNORDERED;\n case 2:\n case \"ORDER_ORDERED\":\n return Order.ORDER_ORDERED;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return Order.UNRECOGNIZED;\n }\n}\n\nexport function orderToJSON(object: Order): string {\n switch (object) {\n case Order.ORDER_NONE_UNSPECIFIED:\n return \"ORDER_NONE_UNSPECIFIED\";\n case Order.ORDER_UNORDERED:\n return \"ORDER_UNORDERED\";\n case Order.ORDER_ORDERED:\n return \"ORDER_ORDERED\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * Channel defines pipeline for exactly-once packet delivery between specific\n * modules on separate blockchains, which has at least one end capable of\n * sending packets and one end capable of receiving packets.\n */\nexport interface Channel {\n /** current state of the channel end */\n state: State;\n /** whether the channel is ordered or unordered */\n ordering: Order;\n /** counterparty channel end */\n counterparty?: Counterparty;\n /**\n * list of connection identifiers, in order, along which packets sent on\n * this channel will travel\n */\n connection_hops: string[];\n /** opaque channel version, which is agreed upon during the handshake */\n version: string;\n}\n\n/**\n * IdentifiedChannel defines a channel with additional port and channel\n * identifier fields.\n */\nexport interface IdentifiedChannel {\n /** current state of the channel end */\n state: State;\n /** whether the channel is ordered or unordered */\n ordering: Order;\n /** counterparty channel end */\n counterparty?: Counterparty;\n /**\n * list of connection identifiers, in order, along which packets sent on\n * this channel will travel\n */\n connection_hops: string[];\n /** opaque channel version, which is agreed upon during the handshake */\n version: string;\n /** port identifier */\n port_id: string;\n /** channel identifier */\n channel_id: string;\n}\n\n/** Counterparty defines a channel end counterparty */\nexport interface Counterparty {\n /** port on the counterparty chain which owns the other end of the channel. */\n port_id: string;\n /** channel end on the counterparty chain */\n channel_id: string;\n}\n\n/** Packet defines a type that carries data across different chains through IBC */\nexport interface Packet {\n /**\n * number corresponds to the order of sends and receives, where a Packet\n * with an earlier sequence number must be sent and received before a Packet\n * with a later sequence number.\n */\n sequence: string;\n /** identifies the port on the sending chain. */\n source_port: string;\n /** identifies the channel end on the sending chain. */\n source_channel: string;\n /** identifies the port on the receiving chain. */\n destination_port: string;\n /** identifies the channel end on the receiving chain. */\n destination_channel: string;\n /** actual opaque bytes transferred directly to the application module */\n data: Uint8Array;\n /** block height after which the packet times out */\n timeout_height?: Height;\n /** block timestamp (in nanoseconds) after which the packet times out */\n timeout_timestamp: string;\n}\n\n/**\n * PacketState defines the generic type necessary to retrieve and store\n * packet commitments, acknowledgements, and receipts.\n * Caller is responsible for knowing the context necessary to interpret this\n * state as a commitment, acknowledgement, or a receipt.\n */\nexport interface PacketState {\n /** channel port identifier. */\n port_id: string;\n /** channel unique identifier. */\n channel_id: string;\n /** packet sequence. */\n sequence: string;\n /** embedded data that represents packet state. */\n data: Uint8Array;\n}\n\n/**\n * PacketId is an identifer for a unique Packet\n * Source chains refer to packets by source port/channel\n * Destination chains refer to packets by destination port/channel\n */\nexport interface PacketId {\n /** channel port identifier */\n port_id: string;\n /** channel unique identifier */\n channel_id: string;\n /** packet sequence */\n sequence: string;\n}\n\n/**\n * Acknowledgement is the recommended acknowledgement format to be used by\n * app-specific protocols.\n * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental\n * conflicts with other protobuf message formats used for acknowledgements.\n * The first byte of any message with this format will be the non-ASCII values\n * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS:\n * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope\n */\nexport interface Acknowledgement {\n result: Uint8Array | undefined;\n error: string | undefined;\n}\n\nfunction createBaseChannel(): Channel {\n return {\n state: 0,\n ordering: 0,\n counterparty: undefined,\n connection_hops: [],\n version: \"\",\n };\n}\n\nexport const Channel = {\n encode(\n message: Channel,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.state !== 0) {\n writer.uint32(8).int32(message.state);\n }\n if (message.ordering !== 0) {\n writer.uint32(16).int32(message.ordering);\n }\n if (message.counterparty !== undefined) {\n Counterparty.encode(\n message.counterparty,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n for (const v of message.connection_hops) {\n writer.uint32(34).string(v!);\n }\n if (message.version !== \"\") {\n writer.uint32(42).string(message.version);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Channel {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseChannel();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.state = reader.int32() as any;\n break;\n case 2:\n message.ordering = reader.int32() as any;\n break;\n case 3:\n message.counterparty = Counterparty.decode(reader, reader.uint32());\n break;\n case 4:\n message.connection_hops.push(reader.string());\n break;\n case 5:\n message.version = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Channel {\n return {\n state: isSet(object.state) ? stateFromJSON(object.state) : 0,\n ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : 0,\n counterparty: isSet(object.counterparty)\n ? Counterparty.fromJSON(object.counterparty)\n : undefined,\n connection_hops: Array.isArray(object?.connection_hops)\n ? object.connection_hops.map((e: any) => String(e))\n : [],\n version: isSet(object.version) ? String(object.version) : \"\",\n };\n },\n\n toJSON(message: Channel): unknown {\n const obj: any = {};\n message.state !== undefined && (obj.state = stateToJSON(message.state));\n message.ordering !== undefined &&\n (obj.ordering = orderToJSON(message.ordering));\n message.counterparty !== undefined &&\n (obj.counterparty = message.counterparty\n ? Counterparty.toJSON(message.counterparty)\n : undefined);\n if (message.connection_hops) {\n obj.connection_hops = message.connection_hops.map((e) => e);\n } else {\n obj.connection_hops = [];\n }\n message.version !== undefined && (obj.version = message.version);\n return obj;\n },\n\n fromPartial, I>>(object: I): Channel {\n const message = createBaseChannel();\n message.state = object.state ?? 0;\n message.ordering = object.ordering ?? 0;\n message.counterparty =\n object.counterparty !== undefined && object.counterparty !== null\n ? Counterparty.fromPartial(object.counterparty)\n : undefined;\n message.connection_hops = object.connection_hops?.map((e) => e) || [];\n message.version = object.version ?? \"\";\n return message;\n },\n};\n\nfunction createBaseIdentifiedChannel(): IdentifiedChannel {\n return {\n state: 0,\n ordering: 0,\n counterparty: undefined,\n connection_hops: [],\n version: \"\",\n port_id: \"\",\n channel_id: \"\",\n };\n}\n\nexport const IdentifiedChannel = {\n encode(\n message: IdentifiedChannel,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.state !== 0) {\n writer.uint32(8).int32(message.state);\n }\n if (message.ordering !== 0) {\n writer.uint32(16).int32(message.ordering);\n }\n if (message.counterparty !== undefined) {\n Counterparty.encode(\n message.counterparty,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n for (const v of message.connection_hops) {\n writer.uint32(34).string(v!);\n }\n if (message.version !== \"\") {\n writer.uint32(42).string(message.version);\n }\n if (message.port_id !== \"\") {\n writer.uint32(50).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(58).string(message.channel_id);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): IdentifiedChannel {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseIdentifiedChannel();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.state = reader.int32() as any;\n break;\n case 2:\n message.ordering = reader.int32() as any;\n break;\n case 3:\n message.counterparty = Counterparty.decode(reader, reader.uint32());\n break;\n case 4:\n message.connection_hops.push(reader.string());\n break;\n case 5:\n message.version = reader.string();\n break;\n case 6:\n message.port_id = reader.string();\n break;\n case 7:\n message.channel_id = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): IdentifiedChannel {\n return {\n state: isSet(object.state) ? stateFromJSON(object.state) : 0,\n ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : 0,\n counterparty: isSet(object.counterparty)\n ? Counterparty.fromJSON(object.counterparty)\n : undefined,\n connection_hops: Array.isArray(object?.connection_hops)\n ? object.connection_hops.map((e: any) => String(e))\n : [],\n version: isSet(object.version) ? String(object.version) : \"\",\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n };\n },\n\n toJSON(message: IdentifiedChannel): unknown {\n const obj: any = {};\n message.state !== undefined && (obj.state = stateToJSON(message.state));\n message.ordering !== undefined &&\n (obj.ordering = orderToJSON(message.ordering));\n message.counterparty !== undefined &&\n (obj.counterparty = message.counterparty\n ? Counterparty.toJSON(message.counterparty)\n : undefined);\n if (message.connection_hops) {\n obj.connection_hops = message.connection_hops.map((e) => e);\n } else {\n obj.connection_hops = [];\n }\n message.version !== undefined && (obj.version = message.version);\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): IdentifiedChannel {\n const message = createBaseIdentifiedChannel();\n message.state = object.state ?? 0;\n message.ordering = object.ordering ?? 0;\n message.counterparty =\n object.counterparty !== undefined && object.counterparty !== null\n ? Counterparty.fromPartial(object.counterparty)\n : undefined;\n message.connection_hops = object.connection_hops?.map((e) => e) || [];\n message.version = object.version ?? \"\";\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCounterparty(): Counterparty {\n return { port_id: \"\", channel_id: \"\" };\n}\n\nexport const Counterparty = {\n encode(\n message: Counterparty,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Counterparty {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCounterparty();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Counterparty {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n };\n },\n\n toJSON(message: Counterparty): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Counterparty {\n const message = createBaseCounterparty();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n return message;\n },\n};\n\nfunction createBasePacket(): Packet {\n return {\n sequence: \"0\",\n source_port: \"\",\n source_channel: \"\",\n destination_port: \"\",\n destination_channel: \"\",\n data: new Uint8Array(),\n timeout_height: undefined,\n timeout_timestamp: \"0\",\n };\n}\n\nexport const Packet = {\n encode(\n message: Packet,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sequence !== \"0\") {\n writer.uint32(8).uint64(message.sequence);\n }\n if (message.source_port !== \"\") {\n writer.uint32(18).string(message.source_port);\n }\n if (message.source_channel !== \"\") {\n writer.uint32(26).string(message.source_channel);\n }\n if (message.destination_port !== \"\") {\n writer.uint32(34).string(message.destination_port);\n }\n if (message.destination_channel !== \"\") {\n writer.uint32(42).string(message.destination_channel);\n }\n if (message.data.length !== 0) {\n writer.uint32(50).bytes(message.data);\n }\n if (message.timeout_height !== undefined) {\n Height.encode(message.timeout_height, writer.uint32(58).fork()).ldelim();\n }\n if (message.timeout_timestamp !== \"0\") {\n writer.uint32(64).uint64(message.timeout_timestamp);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Packet {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePacket();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sequence = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.source_port = reader.string();\n break;\n case 3:\n message.source_channel = reader.string();\n break;\n case 4:\n message.destination_port = reader.string();\n break;\n case 5:\n message.destination_channel = reader.string();\n break;\n case 6:\n message.data = reader.bytes();\n break;\n case 7:\n message.timeout_height = Height.decode(reader, reader.uint32());\n break;\n case 8:\n message.timeout_timestamp = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Packet {\n return {\n sequence: isSet(object.sequence) ? String(object.sequence) : \"0\",\n source_port: isSet(object.source_port) ? String(object.source_port) : \"\",\n source_channel: isSet(object.source_channel)\n ? String(object.source_channel)\n : \"\",\n destination_port: isSet(object.destination_port)\n ? String(object.destination_port)\n : \"\",\n destination_channel: isSet(object.destination_channel)\n ? String(object.destination_channel)\n : \"\",\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n timeout_height: isSet(object.timeout_height)\n ? Height.fromJSON(object.timeout_height)\n : undefined,\n timeout_timestamp: isSet(object.timeout_timestamp)\n ? String(object.timeout_timestamp)\n : \"0\",\n };\n },\n\n toJSON(message: Packet): unknown {\n const obj: any = {};\n message.sequence !== undefined && (obj.sequence = message.sequence);\n message.source_port !== undefined &&\n (obj.source_port = message.source_port);\n message.source_channel !== undefined &&\n (obj.source_channel = message.source_channel);\n message.destination_port !== undefined &&\n (obj.destination_port = message.destination_port);\n message.destination_channel !== undefined &&\n (obj.destination_channel = message.destination_channel);\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n message.timeout_height !== undefined &&\n (obj.timeout_height = message.timeout_height\n ? Height.toJSON(message.timeout_height)\n : undefined);\n message.timeout_timestamp !== undefined &&\n (obj.timeout_timestamp = message.timeout_timestamp);\n return obj;\n },\n\n fromPartial, I>>(object: I): Packet {\n const message = createBasePacket();\n message.sequence = object.sequence ?? \"0\";\n message.source_port = object.source_port ?? \"\";\n message.source_channel = object.source_channel ?? \"\";\n message.destination_port = object.destination_port ?? \"\";\n message.destination_channel = object.destination_channel ?? \"\";\n message.data = object.data ?? new Uint8Array();\n message.timeout_height =\n object.timeout_height !== undefined && object.timeout_height !== null\n ? Height.fromPartial(object.timeout_height)\n : undefined;\n message.timeout_timestamp = object.timeout_timestamp ?? \"0\";\n return message;\n },\n};\n\nfunction createBasePacketState(): PacketState {\n return { port_id: \"\", channel_id: \"\", sequence: \"0\", data: new Uint8Array() };\n}\n\nexport const PacketState = {\n encode(\n message: PacketState,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n if (message.sequence !== \"0\") {\n writer.uint32(24).uint64(message.sequence);\n }\n if (message.data.length !== 0) {\n writer.uint32(34).bytes(message.data);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PacketState {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePacketState();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n case 3:\n message.sequence = longToString(reader.uint64() as Long);\n break;\n case 4:\n message.data = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PacketState {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n sequence: isSet(object.sequence) ? String(object.sequence) : \"0\",\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: PacketState): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.sequence !== undefined && (obj.sequence = message.sequence);\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): PacketState {\n const message = createBasePacketState();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n message.sequence = object.sequence ?? \"0\";\n message.data = object.data ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBasePacketId(): PacketId {\n return { port_id: \"\", channel_id: \"\", sequence: \"0\" };\n}\n\nexport const PacketId = {\n encode(\n message: PacketId,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n if (message.sequence !== \"0\") {\n writer.uint32(24).uint64(message.sequence);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PacketId {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePacketId();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n case 3:\n message.sequence = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PacketId {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n sequence: isSet(object.sequence) ? String(object.sequence) : \"0\",\n };\n },\n\n toJSON(message: PacketId): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.sequence !== undefined && (obj.sequence = message.sequence);\n return obj;\n },\n\n fromPartial, I>>(object: I): PacketId {\n const message = createBasePacketId();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n message.sequence = object.sequence ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseAcknowledgement(): Acknowledgement {\n return { result: undefined, error: undefined };\n}\n\nexport const Acknowledgement = {\n encode(\n message: Acknowledgement,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.result !== undefined) {\n writer.uint32(170).bytes(message.result);\n }\n if (message.error !== undefined) {\n writer.uint32(178).string(message.error);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Acknowledgement {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseAcknowledgement();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 21:\n message.result = reader.bytes();\n break;\n case 22:\n message.error = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Acknowledgement {\n return {\n result: isSet(object.result) ? bytesFromBase64(object.result) : undefined,\n error: isSet(object.error) ? String(object.error) : undefined,\n };\n },\n\n toJSON(message: Acknowledgement): unknown {\n const obj: any = {};\n message.result !== undefined &&\n (obj.result =\n message.result !== undefined\n ? base64FromBytes(message.result)\n : undefined);\n message.error !== undefined && (obj.error = message.error);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Acknowledgement {\n const message = createBaseAcknowledgement();\n message.result = object.result ?? undefined;\n message.error = object.error ?? undefined;\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Channel, Packet } from \"./channel\";\nimport { Height } from \"../../client/v1/client\";\n\nexport const protobufPackage = \"ibc.core.channel.v1\";\n\n/** ResponseResultType defines the possible outcomes of the execution of a message */\nexport enum ResponseResultType {\n /** RESPONSE_RESULT_TYPE_UNSPECIFIED - Default zero value enumeration */\n RESPONSE_RESULT_TYPE_UNSPECIFIED = 0,\n /** RESPONSE_RESULT_TYPE_NOOP - The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) */\n RESPONSE_RESULT_TYPE_NOOP = 1,\n /** RESPONSE_RESULT_TYPE_SUCCESS - The message was executed successfully */\n RESPONSE_RESULT_TYPE_SUCCESS = 2,\n UNRECOGNIZED = -1,\n}\n\nexport function responseResultTypeFromJSON(object: any): ResponseResultType {\n switch (object) {\n case 0:\n case \"RESPONSE_RESULT_TYPE_UNSPECIFIED\":\n return ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED;\n case 1:\n case \"RESPONSE_RESULT_TYPE_NOOP\":\n return ResponseResultType.RESPONSE_RESULT_TYPE_NOOP;\n case 2:\n case \"RESPONSE_RESULT_TYPE_SUCCESS\":\n return ResponseResultType.RESPONSE_RESULT_TYPE_SUCCESS;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return ResponseResultType.UNRECOGNIZED;\n }\n}\n\nexport function responseResultTypeToJSON(object: ResponseResultType): string {\n switch (object) {\n case ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED:\n return \"RESPONSE_RESULT_TYPE_UNSPECIFIED\";\n case ResponseResultType.RESPONSE_RESULT_TYPE_NOOP:\n return \"RESPONSE_RESULT_TYPE_NOOP\";\n case ResponseResultType.RESPONSE_RESULT_TYPE_SUCCESS:\n return \"RESPONSE_RESULT_TYPE_SUCCESS\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It\n * is called by a relayer on Chain A.\n */\nexport interface MsgChannelOpenInit {\n port_id: string;\n channel?: Channel;\n signer: string;\n}\n\n/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */\nexport interface MsgChannelOpenInitResponse {\n channel_id: string;\n version: string;\n}\n\n/**\n * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel\n * on Chain B. The version field within the Channel field has been deprecated. Its\n * value will be ignored by core IBC.\n */\nexport interface MsgChannelOpenTry {\n port_id: string;\n /**\n * Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC.\n *\n * @deprecated\n */\n previous_channel_id: string;\n /** NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. */\n channel?: Channel;\n counterparty_version: string;\n proof_init: Uint8Array;\n proof_height?: Height;\n signer: string;\n}\n\n/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */\nexport interface MsgChannelOpenTryResponse {\n version: string;\n}\n\n/**\n * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge\n * the change of channel state to TRYOPEN on Chain B.\n */\nexport interface MsgChannelOpenAck {\n port_id: string;\n channel_id: string;\n counterparty_channel_id: string;\n counterparty_version: string;\n proof_try: Uint8Array;\n proof_height?: Height;\n signer: string;\n}\n\n/** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */\nexport interface MsgChannelOpenAckResponse {}\n\n/**\n * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to\n * acknowledge the change of channel state to OPEN on Chain A.\n */\nexport interface MsgChannelOpenConfirm {\n port_id: string;\n channel_id: string;\n proof_ack: Uint8Array;\n proof_height?: Height;\n signer: string;\n}\n\n/**\n * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response\n * type.\n */\nexport interface MsgChannelOpenConfirmResponse {}\n\n/**\n * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A\n * to close a channel with Chain B.\n */\nexport interface MsgChannelCloseInit {\n port_id: string;\n channel_id: string;\n signer: string;\n}\n\n/** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */\nexport interface MsgChannelCloseInitResponse {}\n\n/**\n * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B\n * to acknowledge the change of channel state to CLOSED on Chain A.\n */\nexport interface MsgChannelCloseConfirm {\n port_id: string;\n channel_id: string;\n proof_init: Uint8Array;\n proof_height?: Height;\n signer: string;\n}\n\n/**\n * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response\n * type.\n */\nexport interface MsgChannelCloseConfirmResponse {}\n\n/** MsgRecvPacket receives incoming IBC packet */\nexport interface MsgRecvPacket {\n packet?: Packet;\n proof_commitment: Uint8Array;\n proof_height?: Height;\n signer: string;\n}\n\n/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */\nexport interface MsgRecvPacketResponse {\n result: ResponseResultType;\n}\n\n/** MsgTimeout receives timed-out packet */\nexport interface MsgTimeout {\n packet?: Packet;\n proof_unreceived: Uint8Array;\n proof_height?: Height;\n next_sequence_recv: string;\n signer: string;\n}\n\n/** MsgTimeoutResponse defines the Msg/Timeout response type. */\nexport interface MsgTimeoutResponse {\n result: ResponseResultType;\n}\n\n/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */\nexport interface MsgTimeoutOnClose {\n packet?: Packet;\n proof_unreceived: Uint8Array;\n proof_close: Uint8Array;\n proof_height?: Height;\n next_sequence_recv: string;\n signer: string;\n}\n\n/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */\nexport interface MsgTimeoutOnCloseResponse {\n result: ResponseResultType;\n}\n\n/** MsgAcknowledgement receives incoming IBC acknowledgement */\nexport interface MsgAcknowledgement {\n packet?: Packet;\n acknowledgement: Uint8Array;\n proof_acked: Uint8Array;\n proof_height?: Height;\n signer: string;\n}\n\n/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */\nexport interface MsgAcknowledgementResponse {\n result: ResponseResultType;\n}\n\nfunction createBaseMsgChannelOpenInit(): MsgChannelOpenInit {\n return { port_id: \"\", channel: undefined, signer: \"\" };\n}\n\nexport const MsgChannelOpenInit = {\n encode(\n message: MsgChannelOpenInit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel !== undefined) {\n Channel.encode(message.channel, writer.uint32(18).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(26).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenInit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelOpenInit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel = Channel.decode(reader, reader.uint32());\n break;\n case 3:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgChannelOpenInit {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel: isSet(object.channel)\n ? Channel.fromJSON(object.channel)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgChannelOpenInit): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel !== undefined &&\n (obj.channel = message.channel\n ? Channel.toJSON(message.channel)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgChannelOpenInit {\n const message = createBaseMsgChannelOpenInit();\n message.port_id = object.port_id ?? \"\";\n message.channel =\n object.channel !== undefined && object.channel !== null\n ? Channel.fromPartial(object.channel)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse {\n return { channel_id: \"\", version: \"\" };\n}\n\nexport const MsgChannelOpenInitResponse = {\n encode(\n message: MsgChannelOpenInitResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.channel_id !== \"\") {\n writer.uint32(10).string(message.channel_id);\n }\n if (message.version !== \"\") {\n writer.uint32(18).string(message.version);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgChannelOpenInitResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelOpenInitResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.channel_id = reader.string();\n break;\n case 2:\n message.version = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgChannelOpenInitResponse {\n return {\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n version: isSet(object.version) ? String(object.version) : \"\",\n };\n },\n\n toJSON(message: MsgChannelOpenInitResponse): unknown {\n const obj: any = {};\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.version !== undefined && (obj.version = message.version);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgChannelOpenInitResponse {\n const message = createBaseMsgChannelOpenInitResponse();\n message.channel_id = object.channel_id ?? \"\";\n message.version = object.version ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgChannelOpenTry(): MsgChannelOpenTry {\n return {\n port_id: \"\",\n previous_channel_id: \"\",\n channel: undefined,\n counterparty_version: \"\",\n proof_init: new Uint8Array(),\n proof_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgChannelOpenTry = {\n encode(\n message: MsgChannelOpenTry,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.previous_channel_id !== \"\") {\n writer.uint32(18).string(message.previous_channel_id);\n }\n if (message.channel !== undefined) {\n Channel.encode(message.channel, writer.uint32(26).fork()).ldelim();\n }\n if (message.counterparty_version !== \"\") {\n writer.uint32(34).string(message.counterparty_version);\n }\n if (message.proof_init.length !== 0) {\n writer.uint32(42).bytes(message.proof_init);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(50).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(58).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenTry {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelOpenTry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.previous_channel_id = reader.string();\n break;\n case 3:\n message.channel = Channel.decode(reader, reader.uint32());\n break;\n case 4:\n message.counterparty_version = reader.string();\n break;\n case 5:\n message.proof_init = reader.bytes();\n break;\n case 6:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 7:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgChannelOpenTry {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n previous_channel_id: isSet(object.previous_channel_id)\n ? String(object.previous_channel_id)\n : \"\",\n channel: isSet(object.channel)\n ? Channel.fromJSON(object.channel)\n : undefined,\n counterparty_version: isSet(object.counterparty_version)\n ? String(object.counterparty_version)\n : \"\",\n proof_init: isSet(object.proof_init)\n ? bytesFromBase64(object.proof_init)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgChannelOpenTry): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.previous_channel_id !== undefined &&\n (obj.previous_channel_id = message.previous_channel_id);\n message.channel !== undefined &&\n (obj.channel = message.channel\n ? Channel.toJSON(message.channel)\n : undefined);\n message.counterparty_version !== undefined &&\n (obj.counterparty_version = message.counterparty_version);\n message.proof_init !== undefined &&\n (obj.proof_init = base64FromBytes(\n message.proof_init !== undefined\n ? message.proof_init\n : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgChannelOpenTry {\n const message = createBaseMsgChannelOpenTry();\n message.port_id = object.port_id ?? \"\";\n message.previous_channel_id = object.previous_channel_id ?? \"\";\n message.channel =\n object.channel !== undefined && object.channel !== null\n ? Channel.fromPartial(object.channel)\n : undefined;\n message.counterparty_version = object.counterparty_version ?? \"\";\n message.proof_init = object.proof_init ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse {\n return { version: \"\" };\n}\n\nexport const MsgChannelOpenTryResponse = {\n encode(\n message: MsgChannelOpenTryResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.version !== \"\") {\n writer.uint32(10).string(message.version);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgChannelOpenTryResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelOpenTryResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.version = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgChannelOpenTryResponse {\n return {\n version: isSet(object.version) ? String(object.version) : \"\",\n };\n },\n\n toJSON(message: MsgChannelOpenTryResponse): unknown {\n const obj: any = {};\n message.version !== undefined && (obj.version = message.version);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgChannelOpenTryResponse {\n const message = createBaseMsgChannelOpenTryResponse();\n message.version = object.version ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgChannelOpenAck(): MsgChannelOpenAck {\n return {\n port_id: \"\",\n channel_id: \"\",\n counterparty_channel_id: \"\",\n counterparty_version: \"\",\n proof_try: new Uint8Array(),\n proof_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgChannelOpenAck = {\n encode(\n message: MsgChannelOpenAck,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n if (message.counterparty_channel_id !== \"\") {\n writer.uint32(26).string(message.counterparty_channel_id);\n }\n if (message.counterparty_version !== \"\") {\n writer.uint32(34).string(message.counterparty_version);\n }\n if (message.proof_try.length !== 0) {\n writer.uint32(42).bytes(message.proof_try);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(50).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(58).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenAck {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelOpenAck();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n case 3:\n message.counterparty_channel_id = reader.string();\n break;\n case 4:\n message.counterparty_version = reader.string();\n break;\n case 5:\n message.proof_try = reader.bytes();\n break;\n case 6:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 7:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgChannelOpenAck {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n counterparty_channel_id: isSet(object.counterparty_channel_id)\n ? String(object.counterparty_channel_id)\n : \"\",\n counterparty_version: isSet(object.counterparty_version)\n ? String(object.counterparty_version)\n : \"\",\n proof_try: isSet(object.proof_try)\n ? bytesFromBase64(object.proof_try)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgChannelOpenAck): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.counterparty_channel_id !== undefined &&\n (obj.counterparty_channel_id = message.counterparty_channel_id);\n message.counterparty_version !== undefined &&\n (obj.counterparty_version = message.counterparty_version);\n message.proof_try !== undefined &&\n (obj.proof_try = base64FromBytes(\n message.proof_try !== undefined ? message.proof_try : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgChannelOpenAck {\n const message = createBaseMsgChannelOpenAck();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n message.counterparty_channel_id = object.counterparty_channel_id ?? \"\";\n message.counterparty_version = object.counterparty_version ?? \"\";\n message.proof_try = object.proof_try ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse {\n return {};\n}\n\nexport const MsgChannelOpenAckResponse = {\n encode(\n _: MsgChannelOpenAckResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgChannelOpenAckResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelOpenAckResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgChannelOpenAckResponse {\n return {};\n },\n\n toJSON(_: MsgChannelOpenAckResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgChannelOpenAckResponse {\n const message = createBaseMsgChannelOpenAckResponse();\n return message;\n },\n};\n\nfunction createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm {\n return {\n port_id: \"\",\n channel_id: \"\",\n proof_ack: new Uint8Array(),\n proof_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgChannelOpenConfirm = {\n encode(\n message: MsgChannelOpenConfirm,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n if (message.proof_ack.length !== 0) {\n writer.uint32(26).bytes(message.proof_ack);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(42).string(message.signer);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgChannelOpenConfirm {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelOpenConfirm();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n case 3:\n message.proof_ack = reader.bytes();\n break;\n case 4:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 5:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgChannelOpenConfirm {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n proof_ack: isSet(object.proof_ack)\n ? bytesFromBase64(object.proof_ack)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgChannelOpenConfirm): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.proof_ack !== undefined &&\n (obj.proof_ack = base64FromBytes(\n message.proof_ack !== undefined ? message.proof_ack : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgChannelOpenConfirm {\n const message = createBaseMsgChannelOpenConfirm();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n message.proof_ack = object.proof_ack ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmResponse {\n return {};\n}\n\nexport const MsgChannelOpenConfirmResponse = {\n encode(\n _: MsgChannelOpenConfirmResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgChannelOpenConfirmResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelOpenConfirmResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgChannelOpenConfirmResponse {\n return {};\n },\n\n toJSON(_: MsgChannelOpenConfirmResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgChannelOpenConfirmResponse {\n const message = createBaseMsgChannelOpenConfirmResponse();\n return message;\n },\n};\n\nfunction createBaseMsgChannelCloseInit(): MsgChannelCloseInit {\n return { port_id: \"\", channel_id: \"\", signer: \"\" };\n}\n\nexport const MsgChannelCloseInit = {\n encode(\n message: MsgChannelCloseInit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n if (message.signer !== \"\") {\n writer.uint32(26).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelCloseInit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelCloseInit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n case 3:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgChannelCloseInit {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgChannelCloseInit): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgChannelCloseInit {\n const message = createBaseMsgChannelCloseInit();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse {\n return {};\n}\n\nexport const MsgChannelCloseInitResponse = {\n encode(\n _: MsgChannelCloseInitResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgChannelCloseInitResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelCloseInitResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgChannelCloseInitResponse {\n return {};\n },\n\n toJSON(_: MsgChannelCloseInitResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgChannelCloseInitResponse {\n const message = createBaseMsgChannelCloseInitResponse();\n return message;\n },\n};\n\nfunction createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm {\n return {\n port_id: \"\",\n channel_id: \"\",\n proof_init: new Uint8Array(),\n proof_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgChannelCloseConfirm = {\n encode(\n message: MsgChannelCloseConfirm,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.port_id !== \"\") {\n writer.uint32(10).string(message.port_id);\n }\n if (message.channel_id !== \"\") {\n writer.uint32(18).string(message.channel_id);\n }\n if (message.proof_init.length !== 0) {\n writer.uint32(26).bytes(message.proof_init);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(42).string(message.signer);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgChannelCloseConfirm {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelCloseConfirm();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.port_id = reader.string();\n break;\n case 2:\n message.channel_id = reader.string();\n break;\n case 3:\n message.proof_init = reader.bytes();\n break;\n case 4:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 5:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgChannelCloseConfirm {\n return {\n port_id: isSet(object.port_id) ? String(object.port_id) : \"\",\n channel_id: isSet(object.channel_id) ? String(object.channel_id) : \"\",\n proof_init: isSet(object.proof_init)\n ? bytesFromBase64(object.proof_init)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgChannelCloseConfirm): unknown {\n const obj: any = {};\n message.port_id !== undefined && (obj.port_id = message.port_id);\n message.channel_id !== undefined && (obj.channel_id = message.channel_id);\n message.proof_init !== undefined &&\n (obj.proof_init = base64FromBytes(\n message.proof_init !== undefined\n ? message.proof_init\n : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgChannelCloseConfirm {\n const message = createBaseMsgChannelCloseConfirm();\n message.port_id = object.port_id ?? \"\";\n message.channel_id = object.channel_id ?? \"\";\n message.proof_init = object.proof_init ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmResponse {\n return {};\n}\n\nexport const MsgChannelCloseConfirmResponse = {\n encode(\n _: MsgChannelCloseConfirmResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgChannelCloseConfirmResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgChannelCloseConfirmResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgChannelCloseConfirmResponse {\n return {};\n },\n\n toJSON(_: MsgChannelCloseConfirmResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgChannelCloseConfirmResponse {\n const message = createBaseMsgChannelCloseConfirmResponse();\n return message;\n },\n};\n\nfunction createBaseMsgRecvPacket(): MsgRecvPacket {\n return {\n packet: undefined,\n proof_commitment: new Uint8Array(),\n proof_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgRecvPacket = {\n encode(\n message: MsgRecvPacket,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.packet !== undefined) {\n Packet.encode(message.packet, writer.uint32(10).fork()).ldelim();\n }\n if (message.proof_commitment.length !== 0) {\n writer.uint32(18).bytes(message.proof_commitment);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(34).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgRecvPacket {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRecvPacket();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.packet = Packet.decode(reader, reader.uint32());\n break;\n case 2:\n message.proof_commitment = reader.bytes();\n break;\n case 3:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 4:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgRecvPacket {\n return {\n packet: isSet(object.packet) ? Packet.fromJSON(object.packet) : undefined,\n proof_commitment: isSet(object.proof_commitment)\n ? bytesFromBase64(object.proof_commitment)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgRecvPacket): unknown {\n const obj: any = {};\n message.packet !== undefined &&\n (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined);\n message.proof_commitment !== undefined &&\n (obj.proof_commitment = base64FromBytes(\n message.proof_commitment !== undefined\n ? message.proof_commitment\n : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgRecvPacket {\n const message = createBaseMsgRecvPacket();\n message.packet =\n object.packet !== undefined && object.packet !== null\n ? Packet.fromPartial(object.packet)\n : undefined;\n message.proof_commitment = object.proof_commitment ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse {\n return { result: 0 };\n}\n\nexport const MsgRecvPacketResponse = {\n encode(\n message: MsgRecvPacketResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.result !== 0) {\n writer.uint32(8).int32(message.result);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgRecvPacketResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgRecvPacketResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.result = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgRecvPacketResponse {\n return {\n result: isSet(object.result)\n ? responseResultTypeFromJSON(object.result)\n : 0,\n };\n },\n\n toJSON(message: MsgRecvPacketResponse): unknown {\n const obj: any = {};\n message.result !== undefined &&\n (obj.result = responseResultTypeToJSON(message.result));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgRecvPacketResponse {\n const message = createBaseMsgRecvPacketResponse();\n message.result = object.result ?? 0;\n return message;\n },\n};\n\nfunction createBaseMsgTimeout(): MsgTimeout {\n return {\n packet: undefined,\n proof_unreceived: new Uint8Array(),\n proof_height: undefined,\n next_sequence_recv: \"0\",\n signer: \"\",\n };\n}\n\nexport const MsgTimeout = {\n encode(\n message: MsgTimeout,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.packet !== undefined) {\n Packet.encode(message.packet, writer.uint32(10).fork()).ldelim();\n }\n if (message.proof_unreceived.length !== 0) {\n writer.uint32(18).bytes(message.proof_unreceived);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim();\n }\n if (message.next_sequence_recv !== \"0\") {\n writer.uint32(32).uint64(message.next_sequence_recv);\n }\n if (message.signer !== \"\") {\n writer.uint32(42).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgTimeout {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgTimeout();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.packet = Packet.decode(reader, reader.uint32());\n break;\n case 2:\n message.proof_unreceived = reader.bytes();\n break;\n case 3:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 4:\n message.next_sequence_recv = longToString(reader.uint64() as Long);\n break;\n case 5:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgTimeout {\n return {\n packet: isSet(object.packet) ? Packet.fromJSON(object.packet) : undefined,\n proof_unreceived: isSet(object.proof_unreceived)\n ? bytesFromBase64(object.proof_unreceived)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n next_sequence_recv: isSet(object.next_sequence_recv)\n ? String(object.next_sequence_recv)\n : \"0\",\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgTimeout): unknown {\n const obj: any = {};\n message.packet !== undefined &&\n (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined);\n message.proof_unreceived !== undefined &&\n (obj.proof_unreceived = base64FromBytes(\n message.proof_unreceived !== undefined\n ? message.proof_unreceived\n : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.next_sequence_recv !== undefined &&\n (obj.next_sequence_recv = message.next_sequence_recv);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgTimeout {\n const message = createBaseMsgTimeout();\n message.packet =\n object.packet !== undefined && object.packet !== null\n ? Packet.fromPartial(object.packet)\n : undefined;\n message.proof_unreceived = object.proof_unreceived ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.next_sequence_recv = object.next_sequence_recv ?? \"0\";\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgTimeoutResponse(): MsgTimeoutResponse {\n return { result: 0 };\n}\n\nexport const MsgTimeoutResponse = {\n encode(\n message: MsgTimeoutResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.result !== 0) {\n writer.uint32(8).int32(message.result);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgTimeoutResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgTimeoutResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.result = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgTimeoutResponse {\n return {\n result: isSet(object.result)\n ? responseResultTypeFromJSON(object.result)\n : 0,\n };\n },\n\n toJSON(message: MsgTimeoutResponse): unknown {\n const obj: any = {};\n message.result !== undefined &&\n (obj.result = responseResultTypeToJSON(message.result));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgTimeoutResponse {\n const message = createBaseMsgTimeoutResponse();\n message.result = object.result ?? 0;\n return message;\n },\n};\n\nfunction createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose {\n return {\n packet: undefined,\n proof_unreceived: new Uint8Array(),\n proof_close: new Uint8Array(),\n proof_height: undefined,\n next_sequence_recv: \"0\",\n signer: \"\",\n };\n}\n\nexport const MsgTimeoutOnClose = {\n encode(\n message: MsgTimeoutOnClose,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.packet !== undefined) {\n Packet.encode(message.packet, writer.uint32(10).fork()).ldelim();\n }\n if (message.proof_unreceived.length !== 0) {\n writer.uint32(18).bytes(message.proof_unreceived);\n }\n if (message.proof_close.length !== 0) {\n writer.uint32(26).bytes(message.proof_close);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim();\n }\n if (message.next_sequence_recv !== \"0\") {\n writer.uint32(40).uint64(message.next_sequence_recv);\n }\n if (message.signer !== \"\") {\n writer.uint32(50).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgTimeoutOnClose {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgTimeoutOnClose();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.packet = Packet.decode(reader, reader.uint32());\n break;\n case 2:\n message.proof_unreceived = reader.bytes();\n break;\n case 3:\n message.proof_close = reader.bytes();\n break;\n case 4:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 5:\n message.next_sequence_recv = longToString(reader.uint64() as Long);\n break;\n case 6:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgTimeoutOnClose {\n return {\n packet: isSet(object.packet) ? Packet.fromJSON(object.packet) : undefined,\n proof_unreceived: isSet(object.proof_unreceived)\n ? bytesFromBase64(object.proof_unreceived)\n : new Uint8Array(),\n proof_close: isSet(object.proof_close)\n ? bytesFromBase64(object.proof_close)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n next_sequence_recv: isSet(object.next_sequence_recv)\n ? String(object.next_sequence_recv)\n : \"0\",\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgTimeoutOnClose): unknown {\n const obj: any = {};\n message.packet !== undefined &&\n (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined);\n message.proof_unreceived !== undefined &&\n (obj.proof_unreceived = base64FromBytes(\n message.proof_unreceived !== undefined\n ? message.proof_unreceived\n : new Uint8Array(),\n ));\n message.proof_close !== undefined &&\n (obj.proof_close = base64FromBytes(\n message.proof_close !== undefined\n ? message.proof_close\n : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.next_sequence_recv !== undefined &&\n (obj.next_sequence_recv = message.next_sequence_recv);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgTimeoutOnClose {\n const message = createBaseMsgTimeoutOnClose();\n message.packet =\n object.packet !== undefined && object.packet !== null\n ? Packet.fromPartial(object.packet)\n : undefined;\n message.proof_unreceived = object.proof_unreceived ?? new Uint8Array();\n message.proof_close = object.proof_close ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.next_sequence_recv = object.next_sequence_recv ?? \"0\";\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse {\n return { result: 0 };\n}\n\nexport const MsgTimeoutOnCloseResponse = {\n encode(\n message: MsgTimeoutOnCloseResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.result !== 0) {\n writer.uint32(8).int32(message.result);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgTimeoutOnCloseResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgTimeoutOnCloseResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.result = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgTimeoutOnCloseResponse {\n return {\n result: isSet(object.result)\n ? responseResultTypeFromJSON(object.result)\n : 0,\n };\n },\n\n toJSON(message: MsgTimeoutOnCloseResponse): unknown {\n const obj: any = {};\n message.result !== undefined &&\n (obj.result = responseResultTypeToJSON(message.result));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgTimeoutOnCloseResponse {\n const message = createBaseMsgTimeoutOnCloseResponse();\n message.result = object.result ?? 0;\n return message;\n },\n};\n\nfunction createBaseMsgAcknowledgement(): MsgAcknowledgement {\n return {\n packet: undefined,\n acknowledgement: new Uint8Array(),\n proof_acked: new Uint8Array(),\n proof_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgAcknowledgement = {\n encode(\n message: MsgAcknowledgement,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.packet !== undefined) {\n Packet.encode(message.packet, writer.uint32(10).fork()).ldelim();\n }\n if (message.acknowledgement.length !== 0) {\n writer.uint32(18).bytes(message.acknowledgement);\n }\n if (message.proof_acked.length !== 0) {\n writer.uint32(26).bytes(message.proof_acked);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(34).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(42).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgAcknowledgement {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgAcknowledgement();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.packet = Packet.decode(reader, reader.uint32());\n break;\n case 2:\n message.acknowledgement = reader.bytes();\n break;\n case 3:\n message.proof_acked = reader.bytes();\n break;\n case 4:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 5:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgAcknowledgement {\n return {\n packet: isSet(object.packet) ? Packet.fromJSON(object.packet) : undefined,\n acknowledgement: isSet(object.acknowledgement)\n ? bytesFromBase64(object.acknowledgement)\n : new Uint8Array(),\n proof_acked: isSet(object.proof_acked)\n ? bytesFromBase64(object.proof_acked)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgAcknowledgement): unknown {\n const obj: any = {};\n message.packet !== undefined &&\n (obj.packet = message.packet ? Packet.toJSON(message.packet) : undefined);\n message.acknowledgement !== undefined &&\n (obj.acknowledgement = base64FromBytes(\n message.acknowledgement !== undefined\n ? message.acknowledgement\n : new Uint8Array(),\n ));\n message.proof_acked !== undefined &&\n (obj.proof_acked = base64FromBytes(\n message.proof_acked !== undefined\n ? message.proof_acked\n : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgAcknowledgement {\n const message = createBaseMsgAcknowledgement();\n message.packet =\n object.packet !== undefined && object.packet !== null\n ? Packet.fromPartial(object.packet)\n : undefined;\n message.acknowledgement = object.acknowledgement ?? new Uint8Array();\n message.proof_acked = object.proof_acked ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse {\n return { result: 0 };\n}\n\nexport const MsgAcknowledgementResponse = {\n encode(\n message: MsgAcknowledgementResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.result !== 0) {\n writer.uint32(8).int32(message.result);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgAcknowledgementResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgAcknowledgementResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.result = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgAcknowledgementResponse {\n return {\n result: isSet(object.result)\n ? responseResultTypeFromJSON(object.result)\n : 0,\n };\n },\n\n toJSON(message: MsgAcknowledgementResponse): unknown {\n const obj: any = {};\n message.result !== undefined &&\n (obj.result = responseResultTypeToJSON(message.result));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgAcknowledgementResponse {\n const message = createBaseMsgAcknowledgementResponse();\n message.result = object.result ?? 0;\n return message;\n },\n};\n\n/** Msg defines the ibc/channel Msg service. */\nexport interface Msg {\n /** ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. */\n ChannelOpenInit(\n request: MsgChannelOpenInit,\n ): Promise;\n /** ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. */\n ChannelOpenTry(\n request: MsgChannelOpenTry,\n ): Promise;\n /** ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */\n ChannelOpenAck(\n request: MsgChannelOpenAck,\n ): Promise;\n /** ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */\n ChannelOpenConfirm(\n request: MsgChannelOpenConfirm,\n ): Promise;\n /** ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */\n ChannelCloseInit(\n request: MsgChannelCloseInit,\n ): Promise;\n /**\n * ChannelCloseConfirm defines a rpc handler method for\n * MsgChannelCloseConfirm.\n */\n ChannelCloseConfirm(\n request: MsgChannelCloseConfirm,\n ): Promise;\n /** RecvPacket defines a rpc handler method for MsgRecvPacket. */\n RecvPacket(request: MsgRecvPacket): Promise;\n /** Timeout defines a rpc handler method for MsgTimeout. */\n Timeout(request: MsgTimeout): Promise;\n /** TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */\n TimeoutOnClose(\n request: MsgTimeoutOnClose,\n ): Promise;\n /** Acknowledgement defines a rpc handler method for MsgAcknowledgement. */\n Acknowledgement(\n request: MsgAcknowledgement,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.ChannelOpenInit = this.ChannelOpenInit.bind(this);\n this.ChannelOpenTry = this.ChannelOpenTry.bind(this);\n this.ChannelOpenAck = this.ChannelOpenAck.bind(this);\n this.ChannelOpenConfirm = this.ChannelOpenConfirm.bind(this);\n this.ChannelCloseInit = this.ChannelCloseInit.bind(this);\n this.ChannelCloseConfirm = this.ChannelCloseConfirm.bind(this);\n this.RecvPacket = this.RecvPacket.bind(this);\n this.Timeout = this.Timeout.bind(this);\n this.TimeoutOnClose = this.TimeoutOnClose.bind(this);\n this.Acknowledgement = this.Acknowledgement.bind(this);\n }\n ChannelOpenInit(\n request: MsgChannelOpenInit,\n ): Promise {\n const data = MsgChannelOpenInit.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"ChannelOpenInit\",\n data,\n );\n return promise.then((data) =>\n MsgChannelOpenInitResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ChannelOpenTry(\n request: MsgChannelOpenTry,\n ): Promise {\n const data = MsgChannelOpenTry.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"ChannelOpenTry\",\n data,\n );\n return promise.then((data) =>\n MsgChannelOpenTryResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ChannelOpenAck(\n request: MsgChannelOpenAck,\n ): Promise {\n const data = MsgChannelOpenAck.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"ChannelOpenAck\",\n data,\n );\n return promise.then((data) =>\n MsgChannelOpenAckResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ChannelOpenConfirm(\n request: MsgChannelOpenConfirm,\n ): Promise {\n const data = MsgChannelOpenConfirm.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"ChannelOpenConfirm\",\n data,\n );\n return promise.then((data) =>\n MsgChannelOpenConfirmResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ChannelCloseInit(\n request: MsgChannelCloseInit,\n ): Promise {\n const data = MsgChannelCloseInit.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"ChannelCloseInit\",\n data,\n );\n return promise.then((data) =>\n MsgChannelCloseInitResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ChannelCloseConfirm(\n request: MsgChannelCloseConfirm,\n ): Promise {\n const data = MsgChannelCloseConfirm.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"ChannelCloseConfirm\",\n data,\n );\n return promise.then((data) =>\n MsgChannelCloseConfirmResponse.decode(new _m0.Reader(data)),\n );\n }\n\n RecvPacket(request: MsgRecvPacket): Promise {\n const data = MsgRecvPacket.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"RecvPacket\",\n data,\n );\n return promise.then((data) =>\n MsgRecvPacketResponse.decode(new _m0.Reader(data)),\n );\n }\n\n Timeout(request: MsgTimeout): Promise {\n const data = MsgTimeout.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"Timeout\",\n data,\n );\n return promise.then((data) =>\n MsgTimeoutResponse.decode(new _m0.Reader(data)),\n );\n }\n\n TimeoutOnClose(\n request: MsgTimeoutOnClose,\n ): Promise {\n const data = MsgTimeoutOnClose.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"TimeoutOnClose\",\n data,\n );\n return promise.then((data) =>\n MsgTimeoutOnCloseResponse.decode(new _m0.Reader(data)),\n );\n }\n\n Acknowledgement(\n request: MsgAcknowledgement,\n ): Promise {\n const data = MsgAcknowledgement.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.channel.v1.Msg\",\n \"Acknowledgement\",\n data,\n );\n return promise.then((data) =>\n MsgAcknowledgementResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../../google/protobuf/any\";\nimport { Plan } from \"../../../../cosmos/upgrade/v1beta1/upgrade\";\n\nexport const protobufPackage = \"ibc.core.client.v1\";\n\n/**\n * IdentifiedClientState defines a client state with an additional client\n * identifier field.\n */\nexport interface IdentifiedClientState {\n /** client identifier */\n client_id: string;\n /** client state */\n client_state?: Any;\n}\n\n/**\n * ConsensusStateWithHeight defines a consensus state with an additional height\n * field.\n */\nexport interface ConsensusStateWithHeight {\n /** consensus state height */\n height?: Height;\n /** consensus state */\n consensus_state?: Any;\n}\n\n/**\n * ClientConsensusStates defines all the stored consensus states for a given\n * client.\n */\nexport interface ClientConsensusStates {\n /** client identifier */\n client_id: string;\n /** consensus states and their heights associated with the client */\n consensus_states: ConsensusStateWithHeight[];\n}\n\n/**\n * ClientUpdateProposal is a governance proposal. If it passes, the substitute\n * client's latest consensus state is copied over to the subject client. The proposal\n * handler may fail if the subject and the substitute do not match in client and\n * chain parameters (with exception to latest height, frozen height, and chain-id).\n */\nexport interface ClientUpdateProposal {\n /** the title of the update proposal */\n title: string;\n /** the description of the proposal */\n description: string;\n /** the client identifier for the client to be updated if the proposal passes */\n subject_client_id: string;\n /**\n * the substitute client identifier for the client standing in for the subject\n * client\n */\n substitute_client_id: string;\n}\n\n/**\n * UpgradeProposal is a gov Content type for initiating an IBC breaking\n * upgrade.\n */\nexport interface UpgradeProposal {\n title: string;\n description: string;\n plan?: Plan;\n /**\n * An UpgradedClientState must be provided to perform an IBC breaking upgrade.\n * This will make the chain commit to the correct upgraded (self) client state\n * before the upgrade occurs, so that connecting chains can verify that the\n * new upgraded client is valid by verifying a proof on the previous version\n * of the chain. This will allow IBC connections to persist smoothly across\n * planned chain upgrades\n */\n upgraded_client_state?: Any;\n}\n\n/**\n * Height is a monotonically increasing data type\n * that can be compared against another Height for the purposes of updating and\n * freezing clients\n *\n * Normally the RevisionHeight is incremented at each height while keeping\n * RevisionNumber the same. However some consensus algorithms may choose to\n * reset the height in certain conditions e.g. hard forks, state-machine\n * breaking changes In these cases, the RevisionNumber is incremented so that\n * height continues to be monitonically increasing even as the RevisionHeight\n * gets reset\n */\nexport interface Height {\n /** the revision that the client is currently on */\n revision_number: string;\n /** the height within the given revision */\n revision_height: string;\n}\n\n/** Params defines the set of IBC light client parameters. */\nexport interface Params {\n /** allowed_clients defines the list of allowed client state types. */\n allowed_clients: string[];\n}\n\nfunction createBaseIdentifiedClientState(): IdentifiedClientState {\n return { client_id: \"\", client_state: undefined };\n}\n\nexport const IdentifiedClientState = {\n encode(\n message: IdentifiedClientState,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n if (message.client_state !== undefined) {\n Any.encode(message.client_state, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): IdentifiedClientState {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseIdentifiedClientState();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.client_state = Any.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): IdentifiedClientState {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n client_state: isSet(object.client_state)\n ? Any.fromJSON(object.client_state)\n : undefined,\n };\n },\n\n toJSON(message: IdentifiedClientState): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n message.client_state !== undefined &&\n (obj.client_state = message.client_state\n ? Any.toJSON(message.client_state)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): IdentifiedClientState {\n const message = createBaseIdentifiedClientState();\n message.client_id = object.client_id ?? \"\";\n message.client_state =\n object.client_state !== undefined && object.client_state !== null\n ? Any.fromPartial(object.client_state)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseConsensusStateWithHeight(): ConsensusStateWithHeight {\n return { height: undefined, consensus_state: undefined };\n}\n\nexport const ConsensusStateWithHeight = {\n encode(\n message: ConsensusStateWithHeight,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.height !== undefined) {\n Height.encode(message.height, writer.uint32(10).fork()).ldelim();\n }\n if (message.consensus_state !== undefined) {\n Any.encode(message.consensus_state, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ConsensusStateWithHeight {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseConsensusStateWithHeight();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.height = Height.decode(reader, reader.uint32());\n break;\n case 2:\n message.consensus_state = Any.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ConsensusStateWithHeight {\n return {\n height: isSet(object.height) ? Height.fromJSON(object.height) : undefined,\n consensus_state: isSet(object.consensus_state)\n ? Any.fromJSON(object.consensus_state)\n : undefined,\n };\n },\n\n toJSON(message: ConsensusStateWithHeight): unknown {\n const obj: any = {};\n message.height !== undefined &&\n (obj.height = message.height ? Height.toJSON(message.height) : undefined);\n message.consensus_state !== undefined &&\n (obj.consensus_state = message.consensus_state\n ? Any.toJSON(message.consensus_state)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ConsensusStateWithHeight {\n const message = createBaseConsensusStateWithHeight();\n message.height =\n object.height !== undefined && object.height !== null\n ? Height.fromPartial(object.height)\n : undefined;\n message.consensus_state =\n object.consensus_state !== undefined && object.consensus_state !== null\n ? Any.fromPartial(object.consensus_state)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseClientConsensusStates(): ClientConsensusStates {\n return { client_id: \"\", consensus_states: [] };\n}\n\nexport const ClientConsensusStates = {\n encode(\n message: ClientConsensusStates,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n for (const v of message.consensus_states) {\n ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ClientConsensusStates {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseClientConsensusStates();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.consensus_states.push(\n ConsensusStateWithHeight.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ClientConsensusStates {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n consensus_states: Array.isArray(object?.consensus_states)\n ? object.consensus_states.map((e: any) =>\n ConsensusStateWithHeight.fromJSON(e),\n )\n : [],\n };\n },\n\n toJSON(message: ClientConsensusStates): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n if (message.consensus_states) {\n obj.consensus_states = message.consensus_states.map((e) =>\n e ? ConsensusStateWithHeight.toJSON(e) : undefined,\n );\n } else {\n obj.consensus_states = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ClientConsensusStates {\n const message = createBaseClientConsensusStates();\n message.client_id = object.client_id ?? \"\";\n message.consensus_states =\n object.consensus_states?.map((e) =>\n ConsensusStateWithHeight.fromPartial(e),\n ) || [];\n return message;\n },\n};\n\nfunction createBaseClientUpdateProposal(): ClientUpdateProposal {\n return {\n title: \"\",\n description: \"\",\n subject_client_id: \"\",\n substitute_client_id: \"\",\n };\n}\n\nexport const ClientUpdateProposal = {\n encode(\n message: ClientUpdateProposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.title !== \"\") {\n writer.uint32(10).string(message.title);\n }\n if (message.description !== \"\") {\n writer.uint32(18).string(message.description);\n }\n if (message.subject_client_id !== \"\") {\n writer.uint32(26).string(message.subject_client_id);\n }\n if (message.substitute_client_id !== \"\") {\n writer.uint32(34).string(message.substitute_client_id);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ClientUpdateProposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseClientUpdateProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.title = reader.string();\n break;\n case 2:\n message.description = reader.string();\n break;\n case 3:\n message.subject_client_id = reader.string();\n break;\n case 4:\n message.substitute_client_id = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ClientUpdateProposal {\n return {\n title: isSet(object.title) ? String(object.title) : \"\",\n description: isSet(object.description) ? String(object.description) : \"\",\n subject_client_id: isSet(object.subject_client_id)\n ? String(object.subject_client_id)\n : \"\",\n substitute_client_id: isSet(object.substitute_client_id)\n ? String(object.substitute_client_id)\n : \"\",\n };\n },\n\n toJSON(message: ClientUpdateProposal): unknown {\n const obj: any = {};\n message.title !== undefined && (obj.title = message.title);\n message.description !== undefined &&\n (obj.description = message.description);\n message.subject_client_id !== undefined &&\n (obj.subject_client_id = message.subject_client_id);\n message.substitute_client_id !== undefined &&\n (obj.substitute_client_id = message.substitute_client_id);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ClientUpdateProposal {\n const message = createBaseClientUpdateProposal();\n message.title = object.title ?? \"\";\n message.description = object.description ?? \"\";\n message.subject_client_id = object.subject_client_id ?? \"\";\n message.substitute_client_id = object.substitute_client_id ?? \"\";\n return message;\n },\n};\n\nfunction createBaseUpgradeProposal(): UpgradeProposal {\n return {\n title: \"\",\n description: \"\",\n plan: undefined,\n upgraded_client_state: undefined,\n };\n}\n\nexport const UpgradeProposal = {\n encode(\n message: UpgradeProposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.title !== \"\") {\n writer.uint32(10).string(message.title);\n }\n if (message.description !== \"\") {\n writer.uint32(18).string(message.description);\n }\n if (message.plan !== undefined) {\n Plan.encode(message.plan, writer.uint32(26).fork()).ldelim();\n }\n if (message.upgraded_client_state !== undefined) {\n Any.encode(\n message.upgraded_client_state,\n writer.uint32(34).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): UpgradeProposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseUpgradeProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.title = reader.string();\n break;\n case 2:\n message.description = reader.string();\n break;\n case 3:\n message.plan = Plan.decode(reader, reader.uint32());\n break;\n case 4:\n message.upgraded_client_state = Any.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): UpgradeProposal {\n return {\n title: isSet(object.title) ? String(object.title) : \"\",\n description: isSet(object.description) ? String(object.description) : \"\",\n plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined,\n upgraded_client_state: isSet(object.upgraded_client_state)\n ? Any.fromJSON(object.upgraded_client_state)\n : undefined,\n };\n },\n\n toJSON(message: UpgradeProposal): unknown {\n const obj: any = {};\n message.title !== undefined && (obj.title = message.title);\n message.description !== undefined &&\n (obj.description = message.description);\n message.plan !== undefined &&\n (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);\n message.upgraded_client_state !== undefined &&\n (obj.upgraded_client_state = message.upgraded_client_state\n ? Any.toJSON(message.upgraded_client_state)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): UpgradeProposal {\n const message = createBaseUpgradeProposal();\n message.title = object.title ?? \"\";\n message.description = object.description ?? \"\";\n message.plan =\n object.plan !== undefined && object.plan !== null\n ? Plan.fromPartial(object.plan)\n : undefined;\n message.upgraded_client_state =\n object.upgraded_client_state !== undefined &&\n object.upgraded_client_state !== null\n ? Any.fromPartial(object.upgraded_client_state)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseHeight(): Height {\n return { revision_number: \"0\", revision_height: \"0\" };\n}\n\nexport const Height = {\n encode(\n message: Height,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.revision_number !== \"0\") {\n writer.uint32(8).uint64(message.revision_number);\n }\n if (message.revision_height !== \"0\") {\n writer.uint32(16).uint64(message.revision_height);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Height {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseHeight();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.revision_number = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.revision_height = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Height {\n return {\n revision_number: isSet(object.revision_number)\n ? String(object.revision_number)\n : \"0\",\n revision_height: isSet(object.revision_height)\n ? String(object.revision_height)\n : \"0\",\n };\n },\n\n toJSON(message: Height): unknown {\n const obj: any = {};\n message.revision_number !== undefined &&\n (obj.revision_number = message.revision_number);\n message.revision_height !== undefined &&\n (obj.revision_height = message.revision_height);\n return obj;\n },\n\n fromPartial, I>>(object: I): Height {\n const message = createBaseHeight();\n message.revision_number = object.revision_number ?? \"0\";\n message.revision_height = object.revision_height ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseParams(): Params {\n return { allowed_clients: [] };\n}\n\nexport const Params = {\n encode(\n message: Params,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.allowed_clients) {\n writer.uint32(10).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Params {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.allowed_clients.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Params {\n return {\n allowed_clients: Array.isArray(object?.allowed_clients)\n ? object.allowed_clients.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: Params): unknown {\n const obj: any = {};\n if (message.allowed_clients) {\n obj.allowed_clients = message.allowed_clients.map((e) => e);\n } else {\n obj.allowed_clients = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Params {\n const message = createBaseParams();\n message.allowed_clients = object.allowed_clients?.map((e) => e) || [];\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Any } from \"../../../../google/protobuf/any\";\n\nexport const protobufPackage = \"ibc.core.client.v1\";\n\n/** MsgCreateClient defines a message to create an IBC client */\nexport interface MsgCreateClient {\n /** light client state */\n client_state?: Any;\n /**\n * consensus state associated with the client that corresponds to a given\n * height.\n */\n consensus_state?: Any;\n /** signer address */\n signer: string;\n}\n\n/** MsgCreateClientResponse defines the Msg/CreateClient response type. */\nexport interface MsgCreateClientResponse {}\n\n/**\n * MsgUpdateClient defines an sdk.Msg to update a IBC client state using\n * the given header.\n */\nexport interface MsgUpdateClient {\n /** client unique identifier */\n client_id: string;\n /** header to update the light client */\n header?: Any;\n /** signer address */\n signer: string;\n}\n\n/** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */\nexport interface MsgUpdateClientResponse {}\n\n/**\n * MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client\n * state\n */\nexport interface MsgUpgradeClient {\n /** client unique identifier */\n client_id: string;\n /** upgraded client state */\n client_state?: Any;\n /**\n * upgraded consensus state, only contains enough information to serve as a\n * basis of trust in update logic\n */\n consensus_state?: Any;\n /** proof that old chain committed to new client */\n proof_upgrade_client: Uint8Array;\n /** proof that old chain committed to new consensus state */\n proof_upgrade_consensus_state: Uint8Array;\n /** signer address */\n signer: string;\n}\n\n/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */\nexport interface MsgUpgradeClientResponse {}\n\n/**\n * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for\n * light client misbehaviour.\n */\nexport interface MsgSubmitMisbehaviour {\n /** client unique identifier */\n client_id: string;\n /** misbehaviour used for freezing the light client */\n misbehaviour?: Any;\n /** signer address */\n signer: string;\n}\n\n/**\n * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response\n * type.\n */\nexport interface MsgSubmitMisbehaviourResponse {}\n\nfunction createBaseMsgCreateClient(): MsgCreateClient {\n return { client_state: undefined, consensus_state: undefined, signer: \"\" };\n}\n\nexport const MsgCreateClient = {\n encode(\n message: MsgCreateClient,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_state !== undefined) {\n Any.encode(message.client_state, writer.uint32(10).fork()).ldelim();\n }\n if (message.consensus_state !== undefined) {\n Any.encode(message.consensus_state, writer.uint32(18).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(26).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateClient {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgCreateClient();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_state = Any.decode(reader, reader.uint32());\n break;\n case 2:\n message.consensus_state = Any.decode(reader, reader.uint32());\n break;\n case 3:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgCreateClient {\n return {\n client_state: isSet(object.client_state)\n ? Any.fromJSON(object.client_state)\n : undefined,\n consensus_state: isSet(object.consensus_state)\n ? Any.fromJSON(object.consensus_state)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgCreateClient): unknown {\n const obj: any = {};\n message.client_state !== undefined &&\n (obj.client_state = message.client_state\n ? Any.toJSON(message.client_state)\n : undefined);\n message.consensus_state !== undefined &&\n (obj.consensus_state = message.consensus_state\n ? Any.toJSON(message.consensus_state)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgCreateClient {\n const message = createBaseMsgCreateClient();\n message.client_state =\n object.client_state !== undefined && object.client_state !== null\n ? Any.fromPartial(object.client_state)\n : undefined;\n message.consensus_state =\n object.consensus_state !== undefined && object.consensus_state !== null\n ? Any.fromPartial(object.consensus_state)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgCreateClientResponse(): MsgCreateClientResponse {\n return {};\n}\n\nexport const MsgCreateClientResponse = {\n encode(\n _: MsgCreateClientResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgCreateClientResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgCreateClientResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgCreateClientResponse {\n return {};\n },\n\n toJSON(_: MsgCreateClientResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgCreateClientResponse {\n const message = createBaseMsgCreateClientResponse();\n return message;\n },\n};\n\nfunction createBaseMsgUpdateClient(): MsgUpdateClient {\n return { client_id: \"\", header: undefined, signer: \"\" };\n}\n\nexport const MsgUpdateClient = {\n encode(\n message: MsgUpdateClient,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n if (message.header !== undefined) {\n Any.encode(message.header, writer.uint32(18).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(26).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateClient {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUpdateClient();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.header = Any.decode(reader, reader.uint32());\n break;\n case 3:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgUpdateClient {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n header: isSet(object.header) ? Any.fromJSON(object.header) : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgUpdateClient): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n message.header !== undefined &&\n (obj.header = message.header ? Any.toJSON(message.header) : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgUpdateClient {\n const message = createBaseMsgUpdateClient();\n message.client_id = object.client_id ?? \"\";\n message.header =\n object.header !== undefined && object.header !== null\n ? Any.fromPartial(object.header)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgUpdateClientResponse(): MsgUpdateClientResponse {\n return {};\n}\n\nexport const MsgUpdateClientResponse = {\n encode(\n _: MsgUpdateClientResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgUpdateClientResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUpdateClientResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgUpdateClientResponse {\n return {};\n },\n\n toJSON(_: MsgUpdateClientResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgUpdateClientResponse {\n const message = createBaseMsgUpdateClientResponse();\n return message;\n },\n};\n\nfunction createBaseMsgUpgradeClient(): MsgUpgradeClient {\n return {\n client_id: \"\",\n client_state: undefined,\n consensus_state: undefined,\n proof_upgrade_client: new Uint8Array(),\n proof_upgrade_consensus_state: new Uint8Array(),\n signer: \"\",\n };\n}\n\nexport const MsgUpgradeClient = {\n encode(\n message: MsgUpgradeClient,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n if (message.client_state !== undefined) {\n Any.encode(message.client_state, writer.uint32(18).fork()).ldelim();\n }\n if (message.consensus_state !== undefined) {\n Any.encode(message.consensus_state, writer.uint32(26).fork()).ldelim();\n }\n if (message.proof_upgrade_client.length !== 0) {\n writer.uint32(34).bytes(message.proof_upgrade_client);\n }\n if (message.proof_upgrade_consensus_state.length !== 0) {\n writer.uint32(42).bytes(message.proof_upgrade_consensus_state);\n }\n if (message.signer !== \"\") {\n writer.uint32(50).string(message.signer);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpgradeClient {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUpgradeClient();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.client_state = Any.decode(reader, reader.uint32());\n break;\n case 3:\n message.consensus_state = Any.decode(reader, reader.uint32());\n break;\n case 4:\n message.proof_upgrade_client = reader.bytes();\n break;\n case 5:\n message.proof_upgrade_consensus_state = reader.bytes();\n break;\n case 6:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgUpgradeClient {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n client_state: isSet(object.client_state)\n ? Any.fromJSON(object.client_state)\n : undefined,\n consensus_state: isSet(object.consensus_state)\n ? Any.fromJSON(object.consensus_state)\n : undefined,\n proof_upgrade_client: isSet(object.proof_upgrade_client)\n ? bytesFromBase64(object.proof_upgrade_client)\n : new Uint8Array(),\n proof_upgrade_consensus_state: isSet(object.proof_upgrade_consensus_state)\n ? bytesFromBase64(object.proof_upgrade_consensus_state)\n : new Uint8Array(),\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgUpgradeClient): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n message.client_state !== undefined &&\n (obj.client_state = message.client_state\n ? Any.toJSON(message.client_state)\n : undefined);\n message.consensus_state !== undefined &&\n (obj.consensus_state = message.consensus_state\n ? Any.toJSON(message.consensus_state)\n : undefined);\n message.proof_upgrade_client !== undefined &&\n (obj.proof_upgrade_client = base64FromBytes(\n message.proof_upgrade_client !== undefined\n ? message.proof_upgrade_client\n : new Uint8Array(),\n ));\n message.proof_upgrade_consensus_state !== undefined &&\n (obj.proof_upgrade_consensus_state = base64FromBytes(\n message.proof_upgrade_consensus_state !== undefined\n ? message.proof_upgrade_consensus_state\n : new Uint8Array(),\n ));\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgUpgradeClient {\n const message = createBaseMsgUpgradeClient();\n message.client_id = object.client_id ?? \"\";\n message.client_state =\n object.client_state !== undefined && object.client_state !== null\n ? Any.fromPartial(object.client_state)\n : undefined;\n message.consensus_state =\n object.consensus_state !== undefined && object.consensus_state !== null\n ? Any.fromPartial(object.consensus_state)\n : undefined;\n message.proof_upgrade_client =\n object.proof_upgrade_client ?? new Uint8Array();\n message.proof_upgrade_consensus_state =\n object.proof_upgrade_consensus_state ?? new Uint8Array();\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgUpgradeClientResponse(): MsgUpgradeClientResponse {\n return {};\n}\n\nexport const MsgUpgradeClientResponse = {\n encode(\n _: MsgUpgradeClientResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgUpgradeClientResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUpgradeClientResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgUpgradeClientResponse {\n return {};\n },\n\n toJSON(_: MsgUpgradeClientResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgUpgradeClientResponse {\n const message = createBaseMsgUpgradeClientResponse();\n return message;\n },\n};\n\nfunction createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour {\n return { client_id: \"\", misbehaviour: undefined, signer: \"\" };\n}\n\nexport const MsgSubmitMisbehaviour = {\n encode(\n message: MsgSubmitMisbehaviour,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n if (message.misbehaviour !== undefined) {\n Any.encode(message.misbehaviour, writer.uint32(18).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(26).string(message.signer);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgSubmitMisbehaviour {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSubmitMisbehaviour();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.misbehaviour = Any.decode(reader, reader.uint32());\n break;\n case 3:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgSubmitMisbehaviour {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n misbehaviour: isSet(object.misbehaviour)\n ? Any.fromJSON(object.misbehaviour)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgSubmitMisbehaviour): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n message.misbehaviour !== undefined &&\n (obj.misbehaviour = message.misbehaviour\n ? Any.toJSON(message.misbehaviour)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgSubmitMisbehaviour {\n const message = createBaseMsgSubmitMisbehaviour();\n message.client_id = object.client_id ?? \"\";\n message.misbehaviour =\n object.misbehaviour !== undefined && object.misbehaviour !== null\n ? Any.fromPartial(object.misbehaviour)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgSubmitMisbehaviourResponse(): MsgSubmitMisbehaviourResponse {\n return {};\n}\n\nexport const MsgSubmitMisbehaviourResponse = {\n encode(\n _: MsgSubmitMisbehaviourResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgSubmitMisbehaviourResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgSubmitMisbehaviourResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgSubmitMisbehaviourResponse {\n return {};\n },\n\n toJSON(_: MsgSubmitMisbehaviourResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgSubmitMisbehaviourResponse {\n const message = createBaseMsgSubmitMisbehaviourResponse();\n return message;\n },\n};\n\n/** Msg defines the ibc/client Msg service. */\nexport interface Msg {\n /** CreateClient defines a rpc handler method for MsgCreateClient. */\n CreateClient(request: MsgCreateClient): Promise;\n /** UpdateClient defines a rpc handler method for MsgUpdateClient. */\n UpdateClient(request: MsgUpdateClient): Promise;\n /** UpgradeClient defines a rpc handler method for MsgUpgradeClient. */\n UpgradeClient(request: MsgUpgradeClient): Promise;\n /** SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */\n SubmitMisbehaviour(\n request: MsgSubmitMisbehaviour,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.CreateClient = this.CreateClient.bind(this);\n this.UpdateClient = this.UpdateClient.bind(this);\n this.UpgradeClient = this.UpgradeClient.bind(this);\n this.SubmitMisbehaviour = this.SubmitMisbehaviour.bind(this);\n }\n CreateClient(request: MsgCreateClient): Promise {\n const data = MsgCreateClient.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.client.v1.Msg\",\n \"CreateClient\",\n data,\n );\n return promise.then((data) =>\n MsgCreateClientResponse.decode(new _m0.Reader(data)),\n );\n }\n\n UpdateClient(request: MsgUpdateClient): Promise {\n const data = MsgUpdateClient.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.client.v1.Msg\",\n \"UpdateClient\",\n data,\n );\n return promise.then((data) =>\n MsgUpdateClientResponse.decode(new _m0.Reader(data)),\n );\n }\n\n UpgradeClient(request: MsgUpgradeClient): Promise {\n const data = MsgUpgradeClient.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.client.v1.Msg\",\n \"UpgradeClient\",\n data,\n );\n return promise.then((data) =>\n MsgUpgradeClientResponse.decode(new _m0.Reader(data)),\n );\n }\n\n SubmitMisbehaviour(\n request: MsgSubmitMisbehaviour,\n ): Promise {\n const data = MsgSubmitMisbehaviour.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.client.v1.Msg\",\n \"SubmitMisbehaviour\",\n data,\n );\n return promise.then((data) =>\n MsgSubmitMisbehaviourResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { CommitmentProof } from \"../../../../confio/proofs\";\n\nexport const protobufPackage = \"ibc.core.commitment.v1\";\n\n/**\n * MerkleRoot defines a merkle root hash.\n * In the Cosmos SDK, the AppHash of a block header becomes the root.\n */\nexport interface MerkleRoot {\n hash: Uint8Array;\n}\n\n/**\n * MerklePrefix is merkle path prefixed to the key.\n * The constructed key from the Path and the key will be append(Path.KeyPath,\n * append(Path.KeyPrefix, key...))\n */\nexport interface MerklePrefix {\n key_prefix: Uint8Array;\n}\n\n/**\n * MerklePath is the path used to verify commitment proofs, which can be an\n * arbitrary structured object (defined by a commitment type).\n * MerklePath is represented from root-to-leaf\n */\nexport interface MerklePath {\n key_path: string[];\n}\n\n/**\n * MerkleProof is a wrapper type over a chain of CommitmentProofs.\n * It demonstrates membership or non-membership for an element or set of\n * elements, verifiable in conjunction with a known commitment root. Proofs\n * should be succinct.\n * MerkleProofs are ordered from leaf-to-root\n */\nexport interface MerkleProof {\n proofs: CommitmentProof[];\n}\n\nfunction createBaseMerkleRoot(): MerkleRoot {\n return { hash: new Uint8Array() };\n}\n\nexport const MerkleRoot = {\n encode(\n message: MerkleRoot,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.hash.length !== 0) {\n writer.uint32(10).bytes(message.hash);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MerkleRoot {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMerkleRoot();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.hash = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MerkleRoot {\n return {\n hash: isSet(object.hash)\n ? bytesFromBase64(object.hash)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MerkleRoot): unknown {\n const obj: any = {};\n message.hash !== undefined &&\n (obj.hash = base64FromBytes(\n message.hash !== undefined ? message.hash : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MerkleRoot {\n const message = createBaseMerkleRoot();\n message.hash = object.hash ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMerklePrefix(): MerklePrefix {\n return { key_prefix: new Uint8Array() };\n}\n\nexport const MerklePrefix = {\n encode(\n message: MerklePrefix,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key_prefix.length !== 0) {\n writer.uint32(10).bytes(message.key_prefix);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MerklePrefix {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMerklePrefix();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key_prefix = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MerklePrefix {\n return {\n key_prefix: isSet(object.key_prefix)\n ? bytesFromBase64(object.key_prefix)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MerklePrefix): unknown {\n const obj: any = {};\n message.key_prefix !== undefined &&\n (obj.key_prefix = base64FromBytes(\n message.key_prefix !== undefined\n ? message.key_prefix\n : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MerklePrefix {\n const message = createBaseMerklePrefix();\n message.key_prefix = object.key_prefix ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMerklePath(): MerklePath {\n return { key_path: [] };\n}\n\nexport const MerklePath = {\n encode(\n message: MerklePath,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.key_path) {\n writer.uint32(10).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MerklePath {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMerklePath();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key_path.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MerklePath {\n return {\n key_path: Array.isArray(object?.key_path)\n ? object.key_path.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: MerklePath): unknown {\n const obj: any = {};\n if (message.key_path) {\n obj.key_path = message.key_path.map((e) => e);\n } else {\n obj.key_path = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MerklePath {\n const message = createBaseMerklePath();\n message.key_path = object.key_path?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseMerkleProof(): MerkleProof {\n return { proofs: [] };\n}\n\nexport const MerkleProof = {\n encode(\n message: MerkleProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.proofs) {\n CommitmentProof.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MerkleProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMerkleProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.proofs.push(CommitmentProof.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MerkleProof {\n return {\n proofs: Array.isArray(object?.proofs)\n ? object.proofs.map((e: any) => CommitmentProof.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: MerkleProof): unknown {\n const obj: any = {};\n if (message.proofs) {\n obj.proofs = message.proofs.map((e) =>\n e ? CommitmentProof.toJSON(e) : undefined,\n );\n } else {\n obj.proofs = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MerkleProof {\n const message = createBaseMerkleProof();\n message.proofs =\n object.proofs?.map((e) => CommitmentProof.fromPartial(e)) || [];\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { MerklePrefix } from \"../../commitment/v1/commitment\";\n\nexport const protobufPackage = \"ibc.core.connection.v1\";\n\n/**\n * State defines if a connection is in one of the following states:\n * INIT, TRYOPEN, OPEN or UNINITIALIZED.\n */\nexport enum State {\n /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */\n STATE_UNINITIALIZED_UNSPECIFIED = 0,\n /** STATE_INIT - A connection end has just started the opening handshake. */\n STATE_INIT = 1,\n /**\n * STATE_TRYOPEN - A connection end has acknowledged the handshake step on the counterparty\n * chain.\n */\n STATE_TRYOPEN = 2,\n /** STATE_OPEN - A connection end has completed the handshake. */\n STATE_OPEN = 3,\n UNRECOGNIZED = -1,\n}\n\nexport function stateFromJSON(object: any): State {\n switch (object) {\n case 0:\n case \"STATE_UNINITIALIZED_UNSPECIFIED\":\n return State.STATE_UNINITIALIZED_UNSPECIFIED;\n case 1:\n case \"STATE_INIT\":\n return State.STATE_INIT;\n case 2:\n case \"STATE_TRYOPEN\":\n return State.STATE_TRYOPEN;\n case 3:\n case \"STATE_OPEN\":\n return State.STATE_OPEN;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return State.UNRECOGNIZED;\n }\n}\n\nexport function stateToJSON(object: State): string {\n switch (object) {\n case State.STATE_UNINITIALIZED_UNSPECIFIED:\n return \"STATE_UNINITIALIZED_UNSPECIFIED\";\n case State.STATE_INIT:\n return \"STATE_INIT\";\n case State.STATE_TRYOPEN:\n return \"STATE_TRYOPEN\";\n case State.STATE_OPEN:\n return \"STATE_OPEN\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * ConnectionEnd defines a stateful object on a chain connected to another\n * separate one.\n * NOTE: there must only be 2 defined ConnectionEnds to establish\n * a connection between two chains.\n */\nexport interface ConnectionEnd {\n /** client associated with this connection. */\n client_id: string;\n /**\n * IBC version which can be utilised to determine encodings or protocols for\n * channels or packets utilising this connection.\n */\n versions: Version[];\n /** current state of the connection end. */\n state: State;\n /** counterparty chain associated with this connection. */\n counterparty?: Counterparty;\n /**\n * delay period that must pass before a consensus state can be used for\n * packet-verification NOTE: delay period logic is only implemented by some\n * clients.\n */\n delay_period: string;\n}\n\n/**\n * IdentifiedConnection defines a connection with additional connection\n * identifier field.\n */\nexport interface IdentifiedConnection {\n /** connection identifier. */\n id: string;\n /** client associated with this connection. */\n client_id: string;\n /**\n * IBC version which can be utilised to determine encodings or protocols for\n * channels or packets utilising this connection\n */\n versions: Version[];\n /** current state of the connection end. */\n state: State;\n /** counterparty chain associated with this connection. */\n counterparty?: Counterparty;\n /** delay period associated with this connection. */\n delay_period: string;\n}\n\n/** Counterparty defines the counterparty chain associated with a connection end. */\nexport interface Counterparty {\n /**\n * identifies the client on the counterparty chain associated with a given\n * connection.\n */\n client_id: string;\n /**\n * identifies the connection end on the counterparty chain associated with a\n * given connection.\n */\n connection_id: string;\n /** commitment merkle prefix of the counterparty chain. */\n prefix?: MerklePrefix;\n}\n\n/** ClientPaths define all the connection paths for a client state. */\nexport interface ClientPaths {\n /** list of connection paths */\n paths: string[];\n}\n\n/** ConnectionPaths define all the connection paths for a given client state. */\nexport interface ConnectionPaths {\n /** client state unique identifier */\n client_id: string;\n /** list of connection paths */\n paths: string[];\n}\n\n/**\n * Version defines the versioning scheme used to negotiate the IBC verison in\n * the connection handshake.\n */\nexport interface Version {\n /** unique version identifier */\n identifier: string;\n /** list of features compatible with the specified identifier */\n features: string[];\n}\n\n/** Params defines the set of Connection parameters. */\nexport interface Params {\n /**\n * maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the\n * largest amount of time that the chain might reasonably take to produce the next block under normal operating\n * conditions. A safe choice is 3-5x the expected time per block.\n */\n max_expected_time_per_block: string;\n}\n\nfunction createBaseConnectionEnd(): ConnectionEnd {\n return {\n client_id: \"\",\n versions: [],\n state: 0,\n counterparty: undefined,\n delay_period: \"0\",\n };\n}\n\nexport const ConnectionEnd = {\n encode(\n message: ConnectionEnd,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n for (const v of message.versions) {\n Version.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n if (message.state !== 0) {\n writer.uint32(24).int32(message.state);\n }\n if (message.counterparty !== undefined) {\n Counterparty.encode(\n message.counterparty,\n writer.uint32(34).fork(),\n ).ldelim();\n }\n if (message.delay_period !== \"0\") {\n writer.uint32(40).uint64(message.delay_period);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ConnectionEnd {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseConnectionEnd();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.versions.push(Version.decode(reader, reader.uint32()));\n break;\n case 3:\n message.state = reader.int32() as any;\n break;\n case 4:\n message.counterparty = Counterparty.decode(reader, reader.uint32());\n break;\n case 5:\n message.delay_period = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ConnectionEnd {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n versions: Array.isArray(object?.versions)\n ? object.versions.map((e: any) => Version.fromJSON(e))\n : [],\n state: isSet(object.state) ? stateFromJSON(object.state) : 0,\n counterparty: isSet(object.counterparty)\n ? Counterparty.fromJSON(object.counterparty)\n : undefined,\n delay_period: isSet(object.delay_period)\n ? String(object.delay_period)\n : \"0\",\n };\n },\n\n toJSON(message: ConnectionEnd): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n if (message.versions) {\n obj.versions = message.versions.map((e) =>\n e ? Version.toJSON(e) : undefined,\n );\n } else {\n obj.versions = [];\n }\n message.state !== undefined && (obj.state = stateToJSON(message.state));\n message.counterparty !== undefined &&\n (obj.counterparty = message.counterparty\n ? Counterparty.toJSON(message.counterparty)\n : undefined);\n message.delay_period !== undefined &&\n (obj.delay_period = message.delay_period);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ConnectionEnd {\n const message = createBaseConnectionEnd();\n message.client_id = object.client_id ?? \"\";\n message.versions =\n object.versions?.map((e) => Version.fromPartial(e)) || [];\n message.state = object.state ?? 0;\n message.counterparty =\n object.counterparty !== undefined && object.counterparty !== null\n ? Counterparty.fromPartial(object.counterparty)\n : undefined;\n message.delay_period = object.delay_period ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseIdentifiedConnection(): IdentifiedConnection {\n return {\n id: \"\",\n client_id: \"\",\n versions: [],\n state: 0,\n counterparty: undefined,\n delay_period: \"0\",\n };\n}\n\nexport const IdentifiedConnection = {\n encode(\n message: IdentifiedConnection,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.id !== \"\") {\n writer.uint32(10).string(message.id);\n }\n if (message.client_id !== \"\") {\n writer.uint32(18).string(message.client_id);\n }\n for (const v of message.versions) {\n Version.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n if (message.state !== 0) {\n writer.uint32(32).int32(message.state);\n }\n if (message.counterparty !== undefined) {\n Counterparty.encode(\n message.counterparty,\n writer.uint32(42).fork(),\n ).ldelim();\n }\n if (message.delay_period !== \"0\") {\n writer.uint32(48).uint64(message.delay_period);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): IdentifiedConnection {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseIdentifiedConnection();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.id = reader.string();\n break;\n case 2:\n message.client_id = reader.string();\n break;\n case 3:\n message.versions.push(Version.decode(reader, reader.uint32()));\n break;\n case 4:\n message.state = reader.int32() as any;\n break;\n case 5:\n message.counterparty = Counterparty.decode(reader, reader.uint32());\n break;\n case 6:\n message.delay_period = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): IdentifiedConnection {\n return {\n id: isSet(object.id) ? String(object.id) : \"\",\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n versions: Array.isArray(object?.versions)\n ? object.versions.map((e: any) => Version.fromJSON(e))\n : [],\n state: isSet(object.state) ? stateFromJSON(object.state) : 0,\n counterparty: isSet(object.counterparty)\n ? Counterparty.fromJSON(object.counterparty)\n : undefined,\n delay_period: isSet(object.delay_period)\n ? String(object.delay_period)\n : \"0\",\n };\n },\n\n toJSON(message: IdentifiedConnection): unknown {\n const obj: any = {};\n message.id !== undefined && (obj.id = message.id);\n message.client_id !== undefined && (obj.client_id = message.client_id);\n if (message.versions) {\n obj.versions = message.versions.map((e) =>\n e ? Version.toJSON(e) : undefined,\n );\n } else {\n obj.versions = [];\n }\n message.state !== undefined && (obj.state = stateToJSON(message.state));\n message.counterparty !== undefined &&\n (obj.counterparty = message.counterparty\n ? Counterparty.toJSON(message.counterparty)\n : undefined);\n message.delay_period !== undefined &&\n (obj.delay_period = message.delay_period);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): IdentifiedConnection {\n const message = createBaseIdentifiedConnection();\n message.id = object.id ?? \"\";\n message.client_id = object.client_id ?? \"\";\n message.versions =\n object.versions?.map((e) => Version.fromPartial(e)) || [];\n message.state = object.state ?? 0;\n message.counterparty =\n object.counterparty !== undefined && object.counterparty !== null\n ? Counterparty.fromPartial(object.counterparty)\n : undefined;\n message.delay_period = object.delay_period ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseCounterparty(): Counterparty {\n return { client_id: \"\", connection_id: \"\", prefix: undefined };\n}\n\nexport const Counterparty = {\n encode(\n message: Counterparty,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n if (message.connection_id !== \"\") {\n writer.uint32(18).string(message.connection_id);\n }\n if (message.prefix !== undefined) {\n MerklePrefix.encode(message.prefix, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Counterparty {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCounterparty();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.connection_id = reader.string();\n break;\n case 3:\n message.prefix = MerklePrefix.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Counterparty {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n connection_id: isSet(object.connection_id)\n ? String(object.connection_id)\n : \"\",\n prefix: isSet(object.prefix)\n ? MerklePrefix.fromJSON(object.prefix)\n : undefined,\n };\n },\n\n toJSON(message: Counterparty): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n message.connection_id !== undefined &&\n (obj.connection_id = message.connection_id);\n message.prefix !== undefined &&\n (obj.prefix = message.prefix\n ? MerklePrefix.toJSON(message.prefix)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Counterparty {\n const message = createBaseCounterparty();\n message.client_id = object.client_id ?? \"\";\n message.connection_id = object.connection_id ?? \"\";\n message.prefix =\n object.prefix !== undefined && object.prefix !== null\n ? MerklePrefix.fromPartial(object.prefix)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseClientPaths(): ClientPaths {\n return { paths: [] };\n}\n\nexport const ClientPaths = {\n encode(\n message: ClientPaths,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.paths) {\n writer.uint32(10).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ClientPaths {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseClientPaths();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.paths.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ClientPaths {\n return {\n paths: Array.isArray(object?.paths)\n ? object.paths.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: ClientPaths): unknown {\n const obj: any = {};\n if (message.paths) {\n obj.paths = message.paths.map((e) => e);\n } else {\n obj.paths = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ClientPaths {\n const message = createBaseClientPaths();\n message.paths = object.paths?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseConnectionPaths(): ConnectionPaths {\n return { client_id: \"\", paths: [] };\n}\n\nexport const ConnectionPaths = {\n encode(\n message: ConnectionPaths,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n for (const v of message.paths) {\n writer.uint32(18).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ConnectionPaths {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseConnectionPaths();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.paths.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ConnectionPaths {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n paths: Array.isArray(object?.paths)\n ? object.paths.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: ConnectionPaths): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n if (message.paths) {\n obj.paths = message.paths.map((e) => e);\n } else {\n obj.paths = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ConnectionPaths {\n const message = createBaseConnectionPaths();\n message.client_id = object.client_id ?? \"\";\n message.paths = object.paths?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseVersion(): Version {\n return { identifier: \"\", features: [] };\n}\n\nexport const Version = {\n encode(\n message: Version,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.identifier !== \"\") {\n writer.uint32(10).string(message.identifier);\n }\n for (const v of message.features) {\n writer.uint32(18).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Version {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVersion();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.identifier = reader.string();\n break;\n case 2:\n message.features.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Version {\n return {\n identifier: isSet(object.identifier) ? String(object.identifier) : \"\",\n features: Array.isArray(object?.features)\n ? object.features.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: Version): unknown {\n const obj: any = {};\n message.identifier !== undefined && (obj.identifier = message.identifier);\n if (message.features) {\n obj.features = message.features.map((e) => e);\n } else {\n obj.features = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Version {\n const message = createBaseVersion();\n message.identifier = object.identifier ?? \"\";\n message.features = object.features?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseParams(): Params {\n return { max_expected_time_per_block: \"0\" };\n}\n\nexport const Params = {\n encode(\n message: Params,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.max_expected_time_per_block !== \"0\") {\n writer.uint32(8).uint64(message.max_expected_time_per_block);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Params {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.max_expected_time_per_block = longToString(\n reader.uint64() as Long,\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Params {\n return {\n max_expected_time_per_block: isSet(object.max_expected_time_per_block)\n ? String(object.max_expected_time_per_block)\n : \"0\",\n };\n },\n\n toJSON(message: Params): unknown {\n const obj: any = {};\n message.max_expected_time_per_block !== undefined &&\n (obj.max_expected_time_per_block = message.max_expected_time_per_block);\n return obj;\n },\n\n fromPartial, I>>(object: I): Params {\n const message = createBaseParams();\n message.max_expected_time_per_block =\n object.max_expected_time_per_block ?? \"0\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Counterparty, Version } from \"./connection\";\nimport { Any } from \"../../../../google/protobuf/any\";\nimport { Height } from \"../../client/v1/client\";\n\nexport const protobufPackage = \"ibc.core.connection.v1\";\n\n/**\n * MsgConnectionOpenInit defines the msg sent by an account on Chain A to\n * initialize a connection with Chain B.\n */\nexport interface MsgConnectionOpenInit {\n client_id: string;\n counterparty?: Counterparty;\n version?: Version;\n delay_period: string;\n signer: string;\n}\n\n/**\n * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response\n * type.\n */\nexport interface MsgConnectionOpenInitResponse {}\n\n/**\n * MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a\n * connection on Chain B.\n */\nexport interface MsgConnectionOpenTry {\n client_id: string;\n /**\n * Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC.\n *\n * @deprecated\n */\n previous_connection_id: string;\n client_state?: Any;\n counterparty?: Counterparty;\n delay_period: string;\n counterparty_versions: Version[];\n proof_height?: Height;\n /**\n * proof of the initialization the connection on Chain A: `UNITIALIZED ->\n * INIT`\n */\n proof_init: Uint8Array;\n /** proof of client state included in message */\n proof_client: Uint8Array;\n /** proof of client consensus state */\n proof_consensus: Uint8Array;\n consensus_height?: Height;\n signer: string;\n}\n\n/** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */\nexport interface MsgConnectionOpenTryResponse {}\n\n/**\n * MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to\n * acknowledge the change of connection state to TRYOPEN on Chain B.\n */\nexport interface MsgConnectionOpenAck {\n connection_id: string;\n counterparty_connection_id: string;\n version?: Version;\n client_state?: Any;\n proof_height?: Height;\n /**\n * proof of the initialization the connection on Chain B: `UNITIALIZED ->\n * TRYOPEN`\n */\n proof_try: Uint8Array;\n /** proof of client state included in message */\n proof_client: Uint8Array;\n /** proof of client consensus state */\n proof_consensus: Uint8Array;\n consensus_height?: Height;\n signer: string;\n}\n\n/** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */\nexport interface MsgConnectionOpenAckResponse {}\n\n/**\n * MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to\n * acknowledge the change of connection state to OPEN on Chain A.\n */\nexport interface MsgConnectionOpenConfirm {\n connection_id: string;\n /** proof for the change of the connection state on Chain A: `INIT -> OPEN` */\n proof_ack: Uint8Array;\n proof_height?: Height;\n signer: string;\n}\n\n/**\n * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm\n * response type.\n */\nexport interface MsgConnectionOpenConfirmResponse {}\n\nfunction createBaseMsgConnectionOpenInit(): MsgConnectionOpenInit {\n return {\n client_id: \"\",\n counterparty: undefined,\n version: undefined,\n delay_period: \"0\",\n signer: \"\",\n };\n}\n\nexport const MsgConnectionOpenInit = {\n encode(\n message: MsgConnectionOpenInit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n if (message.counterparty !== undefined) {\n Counterparty.encode(\n message.counterparty,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.version !== undefined) {\n Version.encode(message.version, writer.uint32(26).fork()).ldelim();\n }\n if (message.delay_period !== \"0\") {\n writer.uint32(32).uint64(message.delay_period);\n }\n if (message.signer !== \"\") {\n writer.uint32(42).string(message.signer);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgConnectionOpenInit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgConnectionOpenInit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.counterparty = Counterparty.decode(reader, reader.uint32());\n break;\n case 3:\n message.version = Version.decode(reader, reader.uint32());\n break;\n case 4:\n message.delay_period = longToString(reader.uint64() as Long);\n break;\n case 5:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgConnectionOpenInit {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n counterparty: isSet(object.counterparty)\n ? Counterparty.fromJSON(object.counterparty)\n : undefined,\n version: isSet(object.version)\n ? Version.fromJSON(object.version)\n : undefined,\n delay_period: isSet(object.delay_period)\n ? String(object.delay_period)\n : \"0\",\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgConnectionOpenInit): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n message.counterparty !== undefined &&\n (obj.counterparty = message.counterparty\n ? Counterparty.toJSON(message.counterparty)\n : undefined);\n message.version !== undefined &&\n (obj.version = message.version\n ? Version.toJSON(message.version)\n : undefined);\n message.delay_period !== undefined &&\n (obj.delay_period = message.delay_period);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgConnectionOpenInit {\n const message = createBaseMsgConnectionOpenInit();\n message.client_id = object.client_id ?? \"\";\n message.counterparty =\n object.counterparty !== undefined && object.counterparty !== null\n ? Counterparty.fromPartial(object.counterparty)\n : undefined;\n message.version =\n object.version !== undefined && object.version !== null\n ? Version.fromPartial(object.version)\n : undefined;\n message.delay_period = object.delay_period ?? \"0\";\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgConnectionOpenInitResponse(): MsgConnectionOpenInitResponse {\n return {};\n}\n\nexport const MsgConnectionOpenInitResponse = {\n encode(\n _: MsgConnectionOpenInitResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgConnectionOpenInitResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgConnectionOpenInitResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgConnectionOpenInitResponse {\n return {};\n },\n\n toJSON(_: MsgConnectionOpenInitResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgConnectionOpenInitResponse {\n const message = createBaseMsgConnectionOpenInitResponse();\n return message;\n },\n};\n\nfunction createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry {\n return {\n client_id: \"\",\n previous_connection_id: \"\",\n client_state: undefined,\n counterparty: undefined,\n delay_period: \"0\",\n counterparty_versions: [],\n proof_height: undefined,\n proof_init: new Uint8Array(),\n proof_client: new Uint8Array(),\n proof_consensus: new Uint8Array(),\n consensus_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgConnectionOpenTry = {\n encode(\n message: MsgConnectionOpenTry,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.client_id !== \"\") {\n writer.uint32(10).string(message.client_id);\n }\n if (message.previous_connection_id !== \"\") {\n writer.uint32(18).string(message.previous_connection_id);\n }\n if (message.client_state !== undefined) {\n Any.encode(message.client_state, writer.uint32(26).fork()).ldelim();\n }\n if (message.counterparty !== undefined) {\n Counterparty.encode(\n message.counterparty,\n writer.uint32(34).fork(),\n ).ldelim();\n }\n if (message.delay_period !== \"0\") {\n writer.uint32(40).uint64(message.delay_period);\n }\n for (const v of message.counterparty_versions) {\n Version.encode(v!, writer.uint32(50).fork()).ldelim();\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(58).fork()).ldelim();\n }\n if (message.proof_init.length !== 0) {\n writer.uint32(66).bytes(message.proof_init);\n }\n if (message.proof_client.length !== 0) {\n writer.uint32(74).bytes(message.proof_client);\n }\n if (message.proof_consensus.length !== 0) {\n writer.uint32(82).bytes(message.proof_consensus);\n }\n if (message.consensus_height !== undefined) {\n Height.encode(\n message.consensus_height,\n writer.uint32(90).fork(),\n ).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(98).string(message.signer);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgConnectionOpenTry {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgConnectionOpenTry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.client_id = reader.string();\n break;\n case 2:\n message.previous_connection_id = reader.string();\n break;\n case 3:\n message.client_state = Any.decode(reader, reader.uint32());\n break;\n case 4:\n message.counterparty = Counterparty.decode(reader, reader.uint32());\n break;\n case 5:\n message.delay_period = longToString(reader.uint64() as Long);\n break;\n case 6:\n message.counterparty_versions.push(\n Version.decode(reader, reader.uint32()),\n );\n break;\n case 7:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 8:\n message.proof_init = reader.bytes();\n break;\n case 9:\n message.proof_client = reader.bytes();\n break;\n case 10:\n message.proof_consensus = reader.bytes();\n break;\n case 11:\n message.consensus_height = Height.decode(reader, reader.uint32());\n break;\n case 12:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgConnectionOpenTry {\n return {\n client_id: isSet(object.client_id) ? String(object.client_id) : \"\",\n previous_connection_id: isSet(object.previous_connection_id)\n ? String(object.previous_connection_id)\n : \"\",\n client_state: isSet(object.client_state)\n ? Any.fromJSON(object.client_state)\n : undefined,\n counterparty: isSet(object.counterparty)\n ? Counterparty.fromJSON(object.counterparty)\n : undefined,\n delay_period: isSet(object.delay_period)\n ? String(object.delay_period)\n : \"0\",\n counterparty_versions: Array.isArray(object?.counterparty_versions)\n ? object.counterparty_versions.map((e: any) => Version.fromJSON(e))\n : [],\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n proof_init: isSet(object.proof_init)\n ? bytesFromBase64(object.proof_init)\n : new Uint8Array(),\n proof_client: isSet(object.proof_client)\n ? bytesFromBase64(object.proof_client)\n : new Uint8Array(),\n proof_consensus: isSet(object.proof_consensus)\n ? bytesFromBase64(object.proof_consensus)\n : new Uint8Array(),\n consensus_height: isSet(object.consensus_height)\n ? Height.fromJSON(object.consensus_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgConnectionOpenTry): unknown {\n const obj: any = {};\n message.client_id !== undefined && (obj.client_id = message.client_id);\n message.previous_connection_id !== undefined &&\n (obj.previous_connection_id = message.previous_connection_id);\n message.client_state !== undefined &&\n (obj.client_state = message.client_state\n ? Any.toJSON(message.client_state)\n : undefined);\n message.counterparty !== undefined &&\n (obj.counterparty = message.counterparty\n ? Counterparty.toJSON(message.counterparty)\n : undefined);\n message.delay_period !== undefined &&\n (obj.delay_period = message.delay_period);\n if (message.counterparty_versions) {\n obj.counterparty_versions = message.counterparty_versions.map((e) =>\n e ? Version.toJSON(e) : undefined,\n );\n } else {\n obj.counterparty_versions = [];\n }\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.proof_init !== undefined &&\n (obj.proof_init = base64FromBytes(\n message.proof_init !== undefined\n ? message.proof_init\n : new Uint8Array(),\n ));\n message.proof_client !== undefined &&\n (obj.proof_client = base64FromBytes(\n message.proof_client !== undefined\n ? message.proof_client\n : new Uint8Array(),\n ));\n message.proof_consensus !== undefined &&\n (obj.proof_consensus = base64FromBytes(\n message.proof_consensus !== undefined\n ? message.proof_consensus\n : new Uint8Array(),\n ));\n message.consensus_height !== undefined &&\n (obj.consensus_height = message.consensus_height\n ? Height.toJSON(message.consensus_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgConnectionOpenTry {\n const message = createBaseMsgConnectionOpenTry();\n message.client_id = object.client_id ?? \"\";\n message.previous_connection_id = object.previous_connection_id ?? \"\";\n message.client_state =\n object.client_state !== undefined && object.client_state !== null\n ? Any.fromPartial(object.client_state)\n : undefined;\n message.counterparty =\n object.counterparty !== undefined && object.counterparty !== null\n ? Counterparty.fromPartial(object.counterparty)\n : undefined;\n message.delay_period = object.delay_period ?? \"0\";\n message.counterparty_versions =\n object.counterparty_versions?.map((e) => Version.fromPartial(e)) || [];\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.proof_init = object.proof_init ?? new Uint8Array();\n message.proof_client = object.proof_client ?? new Uint8Array();\n message.proof_consensus = object.proof_consensus ?? new Uint8Array();\n message.consensus_height =\n object.consensus_height !== undefined && object.consensus_height !== null\n ? Height.fromPartial(object.consensus_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgConnectionOpenTryResponse(): MsgConnectionOpenTryResponse {\n return {};\n}\n\nexport const MsgConnectionOpenTryResponse = {\n encode(\n _: MsgConnectionOpenTryResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgConnectionOpenTryResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgConnectionOpenTryResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgConnectionOpenTryResponse {\n return {};\n },\n\n toJSON(_: MsgConnectionOpenTryResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgConnectionOpenTryResponse {\n const message = createBaseMsgConnectionOpenTryResponse();\n return message;\n },\n};\n\nfunction createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck {\n return {\n connection_id: \"\",\n counterparty_connection_id: \"\",\n version: undefined,\n client_state: undefined,\n proof_height: undefined,\n proof_try: new Uint8Array(),\n proof_client: new Uint8Array(),\n proof_consensus: new Uint8Array(),\n consensus_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgConnectionOpenAck = {\n encode(\n message: MsgConnectionOpenAck,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.connection_id !== \"\") {\n writer.uint32(10).string(message.connection_id);\n }\n if (message.counterparty_connection_id !== \"\") {\n writer.uint32(18).string(message.counterparty_connection_id);\n }\n if (message.version !== undefined) {\n Version.encode(message.version, writer.uint32(26).fork()).ldelim();\n }\n if (message.client_state !== undefined) {\n Any.encode(message.client_state, writer.uint32(34).fork()).ldelim();\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(42).fork()).ldelim();\n }\n if (message.proof_try.length !== 0) {\n writer.uint32(50).bytes(message.proof_try);\n }\n if (message.proof_client.length !== 0) {\n writer.uint32(58).bytes(message.proof_client);\n }\n if (message.proof_consensus.length !== 0) {\n writer.uint32(66).bytes(message.proof_consensus);\n }\n if (message.consensus_height !== undefined) {\n Height.encode(\n message.consensus_height,\n writer.uint32(74).fork(),\n ).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(82).string(message.signer);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgConnectionOpenAck {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgConnectionOpenAck();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.connection_id = reader.string();\n break;\n case 2:\n message.counterparty_connection_id = reader.string();\n break;\n case 3:\n message.version = Version.decode(reader, reader.uint32());\n break;\n case 4:\n message.client_state = Any.decode(reader, reader.uint32());\n break;\n case 5:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 6:\n message.proof_try = reader.bytes();\n break;\n case 7:\n message.proof_client = reader.bytes();\n break;\n case 8:\n message.proof_consensus = reader.bytes();\n break;\n case 9:\n message.consensus_height = Height.decode(reader, reader.uint32());\n break;\n case 10:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgConnectionOpenAck {\n return {\n connection_id: isSet(object.connection_id)\n ? String(object.connection_id)\n : \"\",\n counterparty_connection_id: isSet(object.counterparty_connection_id)\n ? String(object.counterparty_connection_id)\n : \"\",\n version: isSet(object.version)\n ? Version.fromJSON(object.version)\n : undefined,\n client_state: isSet(object.client_state)\n ? Any.fromJSON(object.client_state)\n : undefined,\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n proof_try: isSet(object.proof_try)\n ? bytesFromBase64(object.proof_try)\n : new Uint8Array(),\n proof_client: isSet(object.proof_client)\n ? bytesFromBase64(object.proof_client)\n : new Uint8Array(),\n proof_consensus: isSet(object.proof_consensus)\n ? bytesFromBase64(object.proof_consensus)\n : new Uint8Array(),\n consensus_height: isSet(object.consensus_height)\n ? Height.fromJSON(object.consensus_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgConnectionOpenAck): unknown {\n const obj: any = {};\n message.connection_id !== undefined &&\n (obj.connection_id = message.connection_id);\n message.counterparty_connection_id !== undefined &&\n (obj.counterparty_connection_id = message.counterparty_connection_id);\n message.version !== undefined &&\n (obj.version = message.version\n ? Version.toJSON(message.version)\n : undefined);\n message.client_state !== undefined &&\n (obj.client_state = message.client_state\n ? Any.toJSON(message.client_state)\n : undefined);\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.proof_try !== undefined &&\n (obj.proof_try = base64FromBytes(\n message.proof_try !== undefined ? message.proof_try : new Uint8Array(),\n ));\n message.proof_client !== undefined &&\n (obj.proof_client = base64FromBytes(\n message.proof_client !== undefined\n ? message.proof_client\n : new Uint8Array(),\n ));\n message.proof_consensus !== undefined &&\n (obj.proof_consensus = base64FromBytes(\n message.proof_consensus !== undefined\n ? message.proof_consensus\n : new Uint8Array(),\n ));\n message.consensus_height !== undefined &&\n (obj.consensus_height = message.consensus_height\n ? Height.toJSON(message.consensus_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgConnectionOpenAck {\n const message = createBaseMsgConnectionOpenAck();\n message.connection_id = object.connection_id ?? \"\";\n message.counterparty_connection_id =\n object.counterparty_connection_id ?? \"\";\n message.version =\n object.version !== undefined && object.version !== null\n ? Version.fromPartial(object.version)\n : undefined;\n message.client_state =\n object.client_state !== undefined && object.client_state !== null\n ? Any.fromPartial(object.client_state)\n : undefined;\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.proof_try = object.proof_try ?? new Uint8Array();\n message.proof_client = object.proof_client ?? new Uint8Array();\n message.proof_consensus = object.proof_consensus ?? new Uint8Array();\n message.consensus_height =\n object.consensus_height !== undefined && object.consensus_height !== null\n ? Height.fromPartial(object.consensus_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgConnectionOpenAckResponse(): MsgConnectionOpenAckResponse {\n return {};\n}\n\nexport const MsgConnectionOpenAckResponse = {\n encode(\n _: MsgConnectionOpenAckResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgConnectionOpenAckResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgConnectionOpenAckResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgConnectionOpenAckResponse {\n return {};\n },\n\n toJSON(_: MsgConnectionOpenAckResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgConnectionOpenAckResponse {\n const message = createBaseMsgConnectionOpenAckResponse();\n return message;\n },\n};\n\nfunction createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm {\n return {\n connection_id: \"\",\n proof_ack: new Uint8Array(),\n proof_height: undefined,\n signer: \"\",\n };\n}\n\nexport const MsgConnectionOpenConfirm = {\n encode(\n message: MsgConnectionOpenConfirm,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.connection_id !== \"\") {\n writer.uint32(10).string(message.connection_id);\n }\n if (message.proof_ack.length !== 0) {\n writer.uint32(18).bytes(message.proof_ack);\n }\n if (message.proof_height !== undefined) {\n Height.encode(message.proof_height, writer.uint32(26).fork()).ldelim();\n }\n if (message.signer !== \"\") {\n writer.uint32(34).string(message.signer);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgConnectionOpenConfirm {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgConnectionOpenConfirm();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.connection_id = reader.string();\n break;\n case 2:\n message.proof_ack = reader.bytes();\n break;\n case 3:\n message.proof_height = Height.decode(reader, reader.uint32());\n break;\n case 4:\n message.signer = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgConnectionOpenConfirm {\n return {\n connection_id: isSet(object.connection_id)\n ? String(object.connection_id)\n : \"\",\n proof_ack: isSet(object.proof_ack)\n ? bytesFromBase64(object.proof_ack)\n : new Uint8Array(),\n proof_height: isSet(object.proof_height)\n ? Height.fromJSON(object.proof_height)\n : undefined,\n signer: isSet(object.signer) ? String(object.signer) : \"\",\n };\n },\n\n toJSON(message: MsgConnectionOpenConfirm): unknown {\n const obj: any = {};\n message.connection_id !== undefined &&\n (obj.connection_id = message.connection_id);\n message.proof_ack !== undefined &&\n (obj.proof_ack = base64FromBytes(\n message.proof_ack !== undefined ? message.proof_ack : new Uint8Array(),\n ));\n message.proof_height !== undefined &&\n (obj.proof_height = message.proof_height\n ? Height.toJSON(message.proof_height)\n : undefined);\n message.signer !== undefined && (obj.signer = message.signer);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgConnectionOpenConfirm {\n const message = createBaseMsgConnectionOpenConfirm();\n message.connection_id = object.connection_id ?? \"\";\n message.proof_ack = object.proof_ack ?? new Uint8Array();\n message.proof_height =\n object.proof_height !== undefined && object.proof_height !== null\n ? Height.fromPartial(object.proof_height)\n : undefined;\n message.signer = object.signer ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgConnectionOpenConfirmResponse(): MsgConnectionOpenConfirmResponse {\n return {};\n}\n\nexport const MsgConnectionOpenConfirmResponse = {\n encode(\n _: MsgConnectionOpenConfirmResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgConnectionOpenConfirmResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgConnectionOpenConfirmResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgConnectionOpenConfirmResponse {\n return {};\n },\n\n toJSON(_: MsgConnectionOpenConfirmResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial<\n I extends Exact, I>,\n >(_: I): MsgConnectionOpenConfirmResponse {\n const message = createBaseMsgConnectionOpenConfirmResponse();\n return message;\n },\n};\n\n/** Msg defines the ibc/connection Msg service. */\nexport interface Msg {\n /** ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. */\n ConnectionOpenInit(\n request: MsgConnectionOpenInit,\n ): Promise;\n /** ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. */\n ConnectionOpenTry(\n request: MsgConnectionOpenTry,\n ): Promise;\n /** ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */\n ConnectionOpenAck(\n request: MsgConnectionOpenAck,\n ): Promise;\n /**\n * ConnectionOpenConfirm defines a rpc handler method for\n * MsgConnectionOpenConfirm.\n */\n ConnectionOpenConfirm(\n request: MsgConnectionOpenConfirm,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.ConnectionOpenInit = this.ConnectionOpenInit.bind(this);\n this.ConnectionOpenTry = this.ConnectionOpenTry.bind(this);\n this.ConnectionOpenAck = this.ConnectionOpenAck.bind(this);\n this.ConnectionOpenConfirm = this.ConnectionOpenConfirm.bind(this);\n }\n ConnectionOpenInit(\n request: MsgConnectionOpenInit,\n ): Promise {\n const data = MsgConnectionOpenInit.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.connection.v1.Msg\",\n \"ConnectionOpenInit\",\n data,\n );\n return promise.then((data) =>\n MsgConnectionOpenInitResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ConnectionOpenTry(\n request: MsgConnectionOpenTry,\n ): Promise {\n const data = MsgConnectionOpenTry.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.connection.v1.Msg\",\n \"ConnectionOpenTry\",\n data,\n );\n return promise.then((data) =>\n MsgConnectionOpenTryResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ConnectionOpenAck(\n request: MsgConnectionOpenAck,\n ): Promise {\n const data = MsgConnectionOpenAck.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.connection.v1.Msg\",\n \"ConnectionOpenAck\",\n data,\n );\n return promise.then((data) =>\n MsgConnectionOpenAckResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ConnectionOpenConfirm(\n request: MsgConnectionOpenConfirm,\n ): Promise {\n const data = MsgConnectionOpenConfirm.encode(request).finish();\n const promise = this.rpc.request(\n \"ibc.core.connection.v1.Msg\",\n \"ConnectionOpenConfirm\",\n data,\n );\n return promise.then((data) =>\n MsgConnectionOpenConfirmResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Coin } from \"../../../cosmos/base/v1beta1/coin\";\n\nexport const protobufPackage = \"secret.compute.v1beta1\";\n\nexport interface MsgStoreCode {\n /** sender is the canonical address of the sender */\n sender: Uint8Array;\n /** WASMByteCode can be raw or gzip compressed */\n wasm_byte_code: Uint8Array;\n /** Source is a valid absolute HTTPS URI to the contract's source code, optional */\n source: string;\n /** Builder is a valid docker image name with tag, optional */\n builder: string;\n}\n\n/** MsgStoreCodeResponse returns store result data. */\nexport interface MsgStoreCodeResponse {\n /** CodeID is the reference to the stored WASM code */\n code_id: string;\n}\n\nexport interface MsgInstantiateContract {\n /** sender is the canonical address of the sender */\n sender: Uint8Array;\n callback_code_hash: string;\n code_id: string;\n label: string;\n /** init_msg is an encrypted input to pass to the contract on init */\n init_msg: Uint8Array;\n init_funds: Coin[];\n /** used internally for encryption, should always be empty in a signed transaction */\n callback_sig: Uint8Array;\n /** Admin is an optional address that can execute migrations */\n admin: string;\n}\n\n/** MsgInstantiateContractResponse return instantiation result data */\nexport interface MsgInstantiateContractResponse {\n /** Address is the bech32 address of the new contract instance. */\n address: string;\n /** Data contains base64-encoded bytes to returned from the contract */\n data: Uint8Array;\n}\n\nexport interface MsgExecuteContract {\n /** sender is the canonical address of the sender */\n sender: Uint8Array;\n /** contract is the canonical address of the contract */\n contract: Uint8Array;\n /** msg is an encrypted input to pass to the contract on execute */\n msg: Uint8Array;\n /** used internally for encryption, should always be empty in a signed transaction */\n callback_code_hash: string;\n sent_funds: Coin[];\n /** used internally for encryption, should always be empty in a signed transaction */\n callback_sig: Uint8Array;\n}\n\n/** MsgExecuteContractResponse returns execution result data. */\nexport interface MsgExecuteContractResponse {\n /** Data contains base64-encoded bytes to returned from the contract */\n data: Uint8Array;\n}\n\n/** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */\nexport interface MsgMigrateContract {\n /** Sender is the that actor that signed the messages */\n sender: string;\n /** Contract is the address of the smart contract */\n contract: string;\n /** CodeID references the new WASM code */\n code_id: string;\n /** msg is an encrypted input to pass to the contract on migration */\n msg: Uint8Array;\n /** used internally for encryption, should always be empty in a signed transaction */\n callback_sig: Uint8Array;\n /** used internally for encryption, should always be empty in a signed transaction */\n callback_code_hash: string;\n}\n\n/** MsgMigrateContractResponse returns contract migration result data. */\nexport interface MsgMigrateContractResponse {\n /**\n * Data contains same raw bytes returned as data from the wasm contract.\n * (May be empty)\n */\n data: Uint8Array;\n}\n\n/** MsgUpdateAdmin sets a new admin for a smart contract */\nexport interface MsgUpdateAdmin {\n /** Sender is the that actor that signed the messages */\n sender: string;\n /** NewAdmin address to be set */\n new_admin: string;\n /** Contract is the address of the smart contract */\n contract: string;\n /** used internally for encryption, should always be empty in a signed transaction */\n callback_sig: Uint8Array;\n}\n\n/** MsgUpdateAdminResponse returns empty data */\nexport interface MsgUpdateAdminResponse {}\n\n/** MsgClearAdmin removes any admin stored for a smart contract */\nexport interface MsgClearAdmin {\n /** Sender is the that actor that signed the messages */\n sender: string;\n /** Contract is the address of the smart contract */\n contract: string;\n /** used internally for encryption, should always be empty in a signed transaction */\n callback_sig: Uint8Array;\n}\n\n/** MsgClearAdminResponse returns empty data */\nexport interface MsgClearAdminResponse {}\n\nfunction createBaseMsgStoreCode(): MsgStoreCode {\n return {\n sender: new Uint8Array(),\n wasm_byte_code: new Uint8Array(),\n source: \"\",\n builder: \"\",\n };\n}\n\nexport const MsgStoreCode = {\n encode(\n message: MsgStoreCode,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender.length !== 0) {\n writer.uint32(10).bytes(message.sender);\n }\n if (message.wasm_byte_code.length !== 0) {\n writer.uint32(18).bytes(message.wasm_byte_code);\n }\n if (message.source !== \"\") {\n writer.uint32(26).string(message.source);\n }\n if (message.builder !== \"\") {\n writer.uint32(34).string(message.builder);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgStoreCode {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgStoreCode();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.bytes();\n break;\n case 2:\n message.wasm_byte_code = reader.bytes();\n break;\n case 3:\n message.source = reader.string();\n break;\n case 4:\n message.builder = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgStoreCode {\n return {\n sender: isSet(object.sender)\n ? bytesFromBase64(object.sender)\n : new Uint8Array(),\n wasm_byte_code: isSet(object.wasm_byte_code)\n ? bytesFromBase64(object.wasm_byte_code)\n : new Uint8Array(),\n source: isSet(object.source) ? String(object.source) : \"\",\n builder: isSet(object.builder) ? String(object.builder) : \"\",\n };\n },\n\n toJSON(message: MsgStoreCode): unknown {\n const obj: any = {};\n message.sender !== undefined &&\n (obj.sender = base64FromBytes(\n message.sender !== undefined ? message.sender : new Uint8Array(),\n ));\n message.wasm_byte_code !== undefined &&\n (obj.wasm_byte_code = base64FromBytes(\n message.wasm_byte_code !== undefined\n ? message.wasm_byte_code\n : new Uint8Array(),\n ));\n message.source !== undefined && (obj.source = message.source);\n message.builder !== undefined && (obj.builder = message.builder);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgStoreCode {\n const message = createBaseMsgStoreCode();\n message.sender = object.sender ?? new Uint8Array();\n message.wasm_byte_code = object.wasm_byte_code ?? new Uint8Array();\n message.source = object.source ?? \"\";\n message.builder = object.builder ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse {\n return { code_id: \"0\" };\n}\n\nexport const MsgStoreCodeResponse = {\n encode(\n message: MsgStoreCodeResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.code_id !== \"0\") {\n writer.uint32(8).uint64(message.code_id);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgStoreCodeResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgStoreCodeResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.code_id = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgStoreCodeResponse {\n return {\n code_id: isSet(object.code_id) ? String(object.code_id) : \"0\",\n };\n },\n\n toJSON(message: MsgStoreCodeResponse): unknown {\n const obj: any = {};\n message.code_id !== undefined && (obj.code_id = message.code_id);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgStoreCodeResponse {\n const message = createBaseMsgStoreCodeResponse();\n message.code_id = object.code_id ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseMsgInstantiateContract(): MsgInstantiateContract {\n return {\n sender: new Uint8Array(),\n callback_code_hash: \"\",\n code_id: \"0\",\n label: \"\",\n init_msg: new Uint8Array(),\n init_funds: [],\n callback_sig: new Uint8Array(),\n admin: \"\",\n };\n}\n\nexport const MsgInstantiateContract = {\n encode(\n message: MsgInstantiateContract,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender.length !== 0) {\n writer.uint32(10).bytes(message.sender);\n }\n if (message.callback_code_hash !== \"\") {\n writer.uint32(18).string(message.callback_code_hash);\n }\n if (message.code_id !== \"0\") {\n writer.uint32(24).uint64(message.code_id);\n }\n if (message.label !== \"\") {\n writer.uint32(34).string(message.label);\n }\n if (message.init_msg.length !== 0) {\n writer.uint32(42).bytes(message.init_msg);\n }\n for (const v of message.init_funds) {\n Coin.encode(v!, writer.uint32(50).fork()).ldelim();\n }\n if (message.callback_sig.length !== 0) {\n writer.uint32(58).bytes(message.callback_sig);\n }\n if (message.admin !== \"\") {\n writer.uint32(66).string(message.admin);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgInstantiateContract {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgInstantiateContract();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.bytes();\n break;\n case 2:\n message.callback_code_hash = reader.string();\n break;\n case 3:\n message.code_id = longToString(reader.uint64() as Long);\n break;\n case 4:\n message.label = reader.string();\n break;\n case 5:\n message.init_msg = reader.bytes();\n break;\n case 6:\n message.init_funds.push(Coin.decode(reader, reader.uint32()));\n break;\n case 7:\n message.callback_sig = reader.bytes();\n break;\n case 8:\n message.admin = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgInstantiateContract {\n return {\n sender: isSet(object.sender)\n ? bytesFromBase64(object.sender)\n : new Uint8Array(),\n callback_code_hash: isSet(object.callback_code_hash)\n ? String(object.callback_code_hash)\n : \"\",\n code_id: isSet(object.code_id) ? String(object.code_id) : \"0\",\n label: isSet(object.label) ? String(object.label) : \"\",\n init_msg: isSet(object.init_msg)\n ? bytesFromBase64(object.init_msg)\n : new Uint8Array(),\n init_funds: Array.isArray(object?.init_funds)\n ? object.init_funds.map((e: any) => Coin.fromJSON(e))\n : [],\n callback_sig: isSet(object.callback_sig)\n ? bytesFromBase64(object.callback_sig)\n : new Uint8Array(),\n admin: isSet(object.admin) ? String(object.admin) : \"\",\n };\n },\n\n toJSON(message: MsgInstantiateContract): unknown {\n const obj: any = {};\n message.sender !== undefined &&\n (obj.sender = base64FromBytes(\n message.sender !== undefined ? message.sender : new Uint8Array(),\n ));\n message.callback_code_hash !== undefined &&\n (obj.callback_code_hash = message.callback_code_hash);\n message.code_id !== undefined && (obj.code_id = message.code_id);\n message.label !== undefined && (obj.label = message.label);\n message.init_msg !== undefined &&\n (obj.init_msg = base64FromBytes(\n message.init_msg !== undefined ? message.init_msg : new Uint8Array(),\n ));\n if (message.init_funds) {\n obj.init_funds = message.init_funds.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.init_funds = [];\n }\n message.callback_sig !== undefined &&\n (obj.callback_sig = base64FromBytes(\n message.callback_sig !== undefined\n ? message.callback_sig\n : new Uint8Array(),\n ));\n message.admin !== undefined && (obj.admin = message.admin);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgInstantiateContract {\n const message = createBaseMsgInstantiateContract();\n message.sender = object.sender ?? new Uint8Array();\n message.callback_code_hash = object.callback_code_hash ?? \"\";\n message.code_id = object.code_id ?? \"0\";\n message.label = object.label ?? \"\";\n message.init_msg = object.init_msg ?? new Uint8Array();\n message.init_funds =\n object.init_funds?.map((e) => Coin.fromPartial(e)) || [];\n message.callback_sig = object.callback_sig ?? new Uint8Array();\n message.admin = object.admin ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse {\n return { address: \"\", data: new Uint8Array() };\n}\n\nexport const MsgInstantiateContractResponse = {\n encode(\n message: MsgInstantiateContractResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.address !== \"\") {\n writer.uint32(10).string(message.address);\n }\n if (message.data.length !== 0) {\n writer.uint32(18).bytes(message.data);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgInstantiateContractResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgInstantiateContractResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.address = reader.string();\n break;\n case 2:\n message.data = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgInstantiateContractResponse {\n return {\n address: isSet(object.address) ? String(object.address) : \"\",\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MsgInstantiateContractResponse): unknown {\n const obj: any = {};\n message.address !== undefined && (obj.address = message.address);\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgInstantiateContractResponse {\n const message = createBaseMsgInstantiateContractResponse();\n message.address = object.address ?? \"\";\n message.data = object.data ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMsgExecuteContract(): MsgExecuteContract {\n return {\n sender: new Uint8Array(),\n contract: new Uint8Array(),\n msg: new Uint8Array(),\n callback_code_hash: \"\",\n sent_funds: [],\n callback_sig: new Uint8Array(),\n };\n}\n\nexport const MsgExecuteContract = {\n encode(\n message: MsgExecuteContract,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender.length !== 0) {\n writer.uint32(10).bytes(message.sender);\n }\n if (message.contract.length !== 0) {\n writer.uint32(18).bytes(message.contract);\n }\n if (message.msg.length !== 0) {\n writer.uint32(26).bytes(message.msg);\n }\n if (message.callback_code_hash !== \"\") {\n writer.uint32(34).string(message.callback_code_hash);\n }\n for (const v of message.sent_funds) {\n Coin.encode(v!, writer.uint32(42).fork()).ldelim();\n }\n if (message.callback_sig.length !== 0) {\n writer.uint32(50).bytes(message.callback_sig);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecuteContract {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgExecuteContract();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.bytes();\n break;\n case 2:\n message.contract = reader.bytes();\n break;\n case 3:\n message.msg = reader.bytes();\n break;\n case 4:\n message.callback_code_hash = reader.string();\n break;\n case 5:\n message.sent_funds.push(Coin.decode(reader, reader.uint32()));\n break;\n case 6:\n message.callback_sig = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgExecuteContract {\n return {\n sender: isSet(object.sender)\n ? bytesFromBase64(object.sender)\n : new Uint8Array(),\n contract: isSet(object.contract)\n ? bytesFromBase64(object.contract)\n : new Uint8Array(),\n msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),\n callback_code_hash: isSet(object.callback_code_hash)\n ? String(object.callback_code_hash)\n : \"\",\n sent_funds: Array.isArray(object?.sent_funds)\n ? object.sent_funds.map((e: any) => Coin.fromJSON(e))\n : [],\n callback_sig: isSet(object.callback_sig)\n ? bytesFromBase64(object.callback_sig)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MsgExecuteContract): unknown {\n const obj: any = {};\n message.sender !== undefined &&\n (obj.sender = base64FromBytes(\n message.sender !== undefined ? message.sender : new Uint8Array(),\n ));\n message.contract !== undefined &&\n (obj.contract = base64FromBytes(\n message.contract !== undefined ? message.contract : new Uint8Array(),\n ));\n message.msg !== undefined &&\n (obj.msg = base64FromBytes(\n message.msg !== undefined ? message.msg : new Uint8Array(),\n ));\n message.callback_code_hash !== undefined &&\n (obj.callback_code_hash = message.callback_code_hash);\n if (message.sent_funds) {\n obj.sent_funds = message.sent_funds.map((e) =>\n e ? Coin.toJSON(e) : undefined,\n );\n } else {\n obj.sent_funds = [];\n }\n message.callback_sig !== undefined &&\n (obj.callback_sig = base64FromBytes(\n message.callback_sig !== undefined\n ? message.callback_sig\n : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgExecuteContract {\n const message = createBaseMsgExecuteContract();\n message.sender = object.sender ?? new Uint8Array();\n message.contract = object.contract ?? new Uint8Array();\n message.msg = object.msg ?? new Uint8Array();\n message.callback_code_hash = object.callback_code_hash ?? \"\";\n message.sent_funds =\n object.sent_funds?.map((e) => Coin.fromPartial(e)) || [];\n message.callback_sig = object.callback_sig ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse {\n return { data: new Uint8Array() };\n}\n\nexport const MsgExecuteContractResponse = {\n encode(\n message: MsgExecuteContractResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.data.length !== 0) {\n writer.uint32(10).bytes(message.data);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgExecuteContractResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgExecuteContractResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.data = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgExecuteContractResponse {\n return {\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MsgExecuteContractResponse): unknown {\n const obj: any = {};\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgExecuteContractResponse {\n const message = createBaseMsgExecuteContractResponse();\n message.data = object.data ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMsgMigrateContract(): MsgMigrateContract {\n return {\n sender: \"\",\n contract: \"\",\n code_id: \"0\",\n msg: new Uint8Array(),\n callback_sig: new Uint8Array(),\n callback_code_hash: \"\",\n };\n}\n\nexport const MsgMigrateContract = {\n encode(\n message: MsgMigrateContract,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender !== \"\") {\n writer.uint32(10).string(message.sender);\n }\n if (message.contract !== \"\") {\n writer.uint32(18).string(message.contract);\n }\n if (message.code_id !== \"0\") {\n writer.uint32(24).uint64(message.code_id);\n }\n if (message.msg.length !== 0) {\n writer.uint32(34).bytes(message.msg);\n }\n if (message.callback_sig.length !== 0) {\n writer.uint32(58).bytes(message.callback_sig);\n }\n if (message.callback_code_hash !== \"\") {\n writer.uint32(66).string(message.callback_code_hash);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgMigrateContract {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgMigrateContract();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.string();\n break;\n case 2:\n message.contract = reader.string();\n break;\n case 3:\n message.code_id = longToString(reader.uint64() as Long);\n break;\n case 4:\n message.msg = reader.bytes();\n break;\n case 7:\n message.callback_sig = reader.bytes();\n break;\n case 8:\n message.callback_code_hash = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgMigrateContract {\n return {\n sender: isSet(object.sender) ? String(object.sender) : \"\",\n contract: isSet(object.contract) ? String(object.contract) : \"\",\n code_id: isSet(object.code_id) ? String(object.code_id) : \"0\",\n msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),\n callback_sig: isSet(object.callback_sig)\n ? bytesFromBase64(object.callback_sig)\n : new Uint8Array(),\n callback_code_hash: isSet(object.callback_code_hash)\n ? String(object.callback_code_hash)\n : \"\",\n };\n },\n\n toJSON(message: MsgMigrateContract): unknown {\n const obj: any = {};\n message.sender !== undefined && (obj.sender = message.sender);\n message.contract !== undefined && (obj.contract = message.contract);\n message.code_id !== undefined && (obj.code_id = message.code_id);\n message.msg !== undefined &&\n (obj.msg = base64FromBytes(\n message.msg !== undefined ? message.msg : new Uint8Array(),\n ));\n message.callback_sig !== undefined &&\n (obj.callback_sig = base64FromBytes(\n message.callback_sig !== undefined\n ? message.callback_sig\n : new Uint8Array(),\n ));\n message.callback_code_hash !== undefined &&\n (obj.callback_code_hash = message.callback_code_hash);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgMigrateContract {\n const message = createBaseMsgMigrateContract();\n message.sender = object.sender ?? \"\";\n message.contract = object.contract ?? \"\";\n message.code_id = object.code_id ?? \"0\";\n message.msg = object.msg ?? new Uint8Array();\n message.callback_sig = object.callback_sig ?? new Uint8Array();\n message.callback_code_hash = object.callback_code_hash ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse {\n return { data: new Uint8Array() };\n}\n\nexport const MsgMigrateContractResponse = {\n encode(\n message: MsgMigrateContractResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.data.length !== 0) {\n writer.uint32(10).bytes(message.data);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgMigrateContractResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgMigrateContractResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.data = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgMigrateContractResponse {\n return {\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MsgMigrateContractResponse): unknown {\n const obj: any = {};\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgMigrateContractResponse {\n const message = createBaseMsgMigrateContractResponse();\n message.data = object.data ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMsgUpdateAdmin(): MsgUpdateAdmin {\n return {\n sender: \"\",\n new_admin: \"\",\n contract: \"\",\n callback_sig: new Uint8Array(),\n };\n}\n\nexport const MsgUpdateAdmin = {\n encode(\n message: MsgUpdateAdmin,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender !== \"\") {\n writer.uint32(10).string(message.sender);\n }\n if (message.new_admin !== \"\") {\n writer.uint32(18).string(message.new_admin);\n }\n if (message.contract !== \"\") {\n writer.uint32(26).string(message.contract);\n }\n if (message.callback_sig.length !== 0) {\n writer.uint32(58).bytes(message.callback_sig);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateAdmin {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUpdateAdmin();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.string();\n break;\n case 2:\n message.new_admin = reader.string();\n break;\n case 3:\n message.contract = reader.string();\n break;\n case 7:\n message.callback_sig = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgUpdateAdmin {\n return {\n sender: isSet(object.sender) ? String(object.sender) : \"\",\n new_admin: isSet(object.new_admin) ? String(object.new_admin) : \"\",\n contract: isSet(object.contract) ? String(object.contract) : \"\",\n callback_sig: isSet(object.callback_sig)\n ? bytesFromBase64(object.callback_sig)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MsgUpdateAdmin): unknown {\n const obj: any = {};\n message.sender !== undefined && (obj.sender = message.sender);\n message.new_admin !== undefined && (obj.new_admin = message.new_admin);\n message.contract !== undefined && (obj.contract = message.contract);\n message.callback_sig !== undefined &&\n (obj.callback_sig = base64FromBytes(\n message.callback_sig !== undefined\n ? message.callback_sig\n : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgUpdateAdmin {\n const message = createBaseMsgUpdateAdmin();\n message.sender = object.sender ?? \"\";\n message.new_admin = object.new_admin ?? \"\";\n message.contract = object.contract ?? \"\";\n message.callback_sig = object.callback_sig ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse {\n return {};\n}\n\nexport const MsgUpdateAdminResponse = {\n encode(\n _: MsgUpdateAdminResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgUpdateAdminResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgUpdateAdminResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgUpdateAdminResponse {\n return {};\n },\n\n toJSON(_: MsgUpdateAdminResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgUpdateAdminResponse {\n const message = createBaseMsgUpdateAdminResponse();\n return message;\n },\n};\n\nfunction createBaseMsgClearAdmin(): MsgClearAdmin {\n return { sender: \"\", contract: \"\", callback_sig: new Uint8Array() };\n}\n\nexport const MsgClearAdmin = {\n encode(\n message: MsgClearAdmin,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender !== \"\") {\n writer.uint32(10).string(message.sender);\n }\n if (message.contract !== \"\") {\n writer.uint32(26).string(message.contract);\n }\n if (message.callback_sig.length !== 0) {\n writer.uint32(58).bytes(message.callback_sig);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgClearAdmin {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgClearAdmin();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.string();\n break;\n case 3:\n message.contract = reader.string();\n break;\n case 7:\n message.callback_sig = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgClearAdmin {\n return {\n sender: isSet(object.sender) ? String(object.sender) : \"\",\n contract: isSet(object.contract) ? String(object.contract) : \"\",\n callback_sig: isSet(object.callback_sig)\n ? bytesFromBase64(object.callback_sig)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MsgClearAdmin): unknown {\n const obj: any = {};\n message.sender !== undefined && (obj.sender = message.sender);\n message.contract !== undefined && (obj.contract = message.contract);\n message.callback_sig !== undefined &&\n (obj.callback_sig = base64FromBytes(\n message.callback_sig !== undefined\n ? message.callback_sig\n : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgClearAdmin {\n const message = createBaseMsgClearAdmin();\n message.sender = object.sender ?? \"\";\n message.contract = object.contract ?? \"\";\n message.callback_sig = object.callback_sig ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMsgClearAdminResponse(): MsgClearAdminResponse {\n return {};\n}\n\nexport const MsgClearAdminResponse = {\n encode(\n _: MsgClearAdminResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgClearAdminResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgClearAdminResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgClearAdminResponse {\n return {};\n },\n\n toJSON(_: MsgClearAdminResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgClearAdminResponse {\n const message = createBaseMsgClearAdminResponse();\n return message;\n },\n};\n\n/** Msg defines the wasm Msg service. */\nexport interface Msg {\n /** StoreCode to submit Wasm code to the system */\n StoreCode(request: MsgStoreCode): Promise;\n /** Instantiate creates a new smart contract instance for the given code id. */\n InstantiateContract(\n request: MsgInstantiateContract,\n ): Promise;\n /** Execute submits the given message data to a smart contract */\n ExecuteContract(\n request: MsgExecuteContract,\n ): Promise;\n /** Migrate runs a code upgrade/ downgrade for a smart contract */\n MigrateContract(\n request: MsgMigrateContract,\n ): Promise;\n /** UpdateAdmin sets a new admin for a smart contract */\n UpdateAdmin(request: MsgUpdateAdmin): Promise;\n /** ClearAdmin removes any admin stored for a smart contract */\n ClearAdmin(request: MsgClearAdmin): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.StoreCode = this.StoreCode.bind(this);\n this.InstantiateContract = this.InstantiateContract.bind(this);\n this.ExecuteContract = this.ExecuteContract.bind(this);\n this.MigrateContract = this.MigrateContract.bind(this);\n this.UpdateAdmin = this.UpdateAdmin.bind(this);\n this.ClearAdmin = this.ClearAdmin.bind(this);\n }\n StoreCode(request: MsgStoreCode): Promise {\n const data = MsgStoreCode.encode(request).finish();\n const promise = this.rpc.request(\n \"secret.compute.v1beta1.Msg\",\n \"StoreCode\",\n data,\n );\n return promise.then((data) =>\n MsgStoreCodeResponse.decode(new _m0.Reader(data)),\n );\n }\n\n InstantiateContract(\n request: MsgInstantiateContract,\n ): Promise {\n const data = MsgInstantiateContract.encode(request).finish();\n const promise = this.rpc.request(\n \"secret.compute.v1beta1.Msg\",\n \"InstantiateContract\",\n data,\n );\n return promise.then((data) =>\n MsgInstantiateContractResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ExecuteContract(\n request: MsgExecuteContract,\n ): Promise {\n const data = MsgExecuteContract.encode(request).finish();\n const promise = this.rpc.request(\n \"secret.compute.v1beta1.Msg\",\n \"ExecuteContract\",\n data,\n );\n return promise.then((data) =>\n MsgExecuteContractResponse.decode(new _m0.Reader(data)),\n );\n }\n\n MigrateContract(\n request: MsgMigrateContract,\n ): Promise {\n const data = MsgMigrateContract.encode(request).finish();\n const promise = this.rpc.request(\n \"secret.compute.v1beta1.Msg\",\n \"MigrateContract\",\n data,\n );\n return promise.then((data) =>\n MsgMigrateContractResponse.decode(new _m0.Reader(data)),\n );\n }\n\n UpdateAdmin(request: MsgUpdateAdmin): Promise {\n const data = MsgUpdateAdmin.encode(request).finish();\n const promise = this.rpc.request(\n \"secret.compute.v1beta1.Msg\",\n \"UpdateAdmin\",\n data,\n );\n return promise.then((data) =>\n MsgUpdateAdminResponse.decode(new _m0.Reader(data)),\n );\n }\n\n ClearAdmin(request: MsgClearAdmin): Promise {\n const data = MsgClearAdmin.encode(request).finish();\n const promise = this.rpc.request(\n \"secret.compute.v1beta1.Msg\",\n \"ClearAdmin\",\n data,\n );\n return promise.then((data) =>\n MsgClearAdminResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"secret.emergencybutton.v1beta1\";\n\n/** MsgToggleIbcSwitch represents a message to toggle the emergencybutton status by the defined pauser. */\nexport interface MsgToggleIbcSwitch {\n sender: string;\n}\n\n/** MsgToggleIbcSwitchResponse defines the response type for the toggle. */\nexport interface MsgToggleIbcSwitchResponse {}\n\nfunction createBaseMsgToggleIbcSwitch(): MsgToggleIbcSwitch {\n return { sender: \"\" };\n}\n\nexport const MsgToggleIbcSwitch = {\n encode(\n message: MsgToggleIbcSwitch,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender !== \"\") {\n writer.uint32(10).string(message.sender);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MsgToggleIbcSwitch {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgToggleIbcSwitch();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MsgToggleIbcSwitch {\n return {\n sender: isSet(object.sender) ? String(object.sender) : \"\",\n };\n },\n\n toJSON(message: MsgToggleIbcSwitch): unknown {\n const obj: any = {};\n message.sender !== undefined && (obj.sender = message.sender);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MsgToggleIbcSwitch {\n const message = createBaseMsgToggleIbcSwitch();\n message.sender = object.sender ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMsgToggleIbcSwitchResponse(): MsgToggleIbcSwitchResponse {\n return {};\n}\n\nexport const MsgToggleIbcSwitchResponse = {\n encode(\n _: MsgToggleIbcSwitchResponse,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): MsgToggleIbcSwitchResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMsgToggleIbcSwitchResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): MsgToggleIbcSwitchResponse {\n return {};\n },\n\n toJSON(_: MsgToggleIbcSwitchResponse): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): MsgToggleIbcSwitchResponse {\n const message = createBaseMsgToggleIbcSwitchResponse();\n return message;\n },\n};\n\n/** Msg defines the bank Msg service. */\nexport interface Msg {\n /** ToggleIbcSwitch defines a method for toggling the status of the emergencybutton. */\n ToggleIbcSwitch(\n request: MsgToggleIbcSwitch,\n ): Promise;\n}\n\nexport class MsgClientImpl implements Msg {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.ToggleIbcSwitch = this.ToggleIbcSwitch.bind(this);\n }\n ToggleIbcSwitch(\n request: MsgToggleIbcSwitch,\n ): Promise {\n const data = MsgToggleIbcSwitch.encode(request).finish();\n const promise = this.rpc.request(\n \"secret.emergencybutton.v1beta1.Msg\",\n \"ToggleIbcSwitch\",\n data,\n );\n return promise.then((data) =>\n MsgToggleIbcSwitchResponse.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"secret.registration.v1beta1\";\n\nexport interface RaAuthenticate {\n sender: Uint8Array;\n certificate: Uint8Array;\n}\n\nexport interface MasterKey {\n bytes: Uint8Array;\n}\n\nexport interface Key {\n key: Uint8Array;\n}\n\nfunction createBaseRaAuthenticate(): RaAuthenticate {\n return { sender: new Uint8Array(), certificate: new Uint8Array() };\n}\n\nexport const RaAuthenticate = {\n encode(\n message: RaAuthenticate,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.sender.length !== 0) {\n writer.uint32(10).bytes(message.sender);\n }\n if (message.certificate.length !== 0) {\n writer.uint32(18).bytes(message.certificate);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RaAuthenticate {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRaAuthenticate();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.sender = reader.bytes();\n break;\n case 2:\n message.certificate = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RaAuthenticate {\n return {\n sender: isSet(object.sender)\n ? bytesFromBase64(object.sender)\n : new Uint8Array(),\n certificate: isSet(object.certificate)\n ? bytesFromBase64(object.certificate)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: RaAuthenticate): unknown {\n const obj: any = {};\n message.sender !== undefined &&\n (obj.sender = base64FromBytes(\n message.sender !== undefined ? message.sender : new Uint8Array(),\n ));\n message.certificate !== undefined &&\n (obj.certificate = base64FromBytes(\n message.certificate !== undefined\n ? message.certificate\n : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RaAuthenticate {\n const message = createBaseRaAuthenticate();\n message.sender = object.sender ?? new Uint8Array();\n message.certificate = object.certificate ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseMasterKey(): MasterKey {\n return { bytes: new Uint8Array() };\n}\n\nexport const MasterKey = {\n encode(\n message: MasterKey,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.bytes.length !== 0) {\n writer.uint32(10).bytes(message.bytes);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): MasterKey {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMasterKey();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.bytes = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): MasterKey {\n return {\n bytes: isSet(object.bytes)\n ? bytesFromBase64(object.bytes)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: MasterKey): unknown {\n const obj: any = {};\n message.bytes !== undefined &&\n (obj.bytes = base64FromBytes(\n message.bytes !== undefined ? message.bytes : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): MasterKey {\n const message = createBaseMasterKey();\n message.bytes = object.bytes ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseKey(): Key {\n return { key: new Uint8Array() };\n}\n\nexport const Key = {\n encode(message: Key, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Key {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseKey();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Key {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n };\n },\n\n toJSON(message: Key): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): Key {\n const message = createBaseKey();\n message.key = object.key ?? new Uint8Array();\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Timestamp } from \"../../google/protobuf/timestamp\";\nimport { Header, Commit } from \"../types/types\";\nimport { ProofOps } from \"../crypto/proof\";\nimport {\n EvidenceParams,\n ValidatorParams,\n VersionParams,\n} from \"../types/params\";\nimport { PublicKey } from \"../crypto/keys\";\n\nexport const protobufPackage = \"tendermint.abci\";\n\nexport enum CheckTxType {\n NEW = 0,\n RECHECK = 1,\n UNRECOGNIZED = -1,\n}\n\nexport function checkTxTypeFromJSON(object: any): CheckTxType {\n switch (object) {\n case 0:\n case \"NEW\":\n return CheckTxType.NEW;\n case 1:\n case \"RECHECK\":\n return CheckTxType.RECHECK;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return CheckTxType.UNRECOGNIZED;\n }\n}\n\nexport function checkTxTypeToJSON(object: CheckTxType): string {\n switch (object) {\n case CheckTxType.NEW:\n return \"NEW\";\n case CheckTxType.RECHECK:\n return \"RECHECK\";\n default:\n return \"UNKNOWN\";\n }\n}\n\nexport enum EvidenceType {\n UNKNOWN = 0,\n DUPLICATE_VOTE = 1,\n LIGHT_CLIENT_ATTACK = 2,\n UNRECOGNIZED = -1,\n}\n\nexport function evidenceTypeFromJSON(object: any): EvidenceType {\n switch (object) {\n case 0:\n case \"UNKNOWN\":\n return EvidenceType.UNKNOWN;\n case 1:\n case \"DUPLICATE_VOTE\":\n return EvidenceType.DUPLICATE_VOTE;\n case 2:\n case \"LIGHT_CLIENT_ATTACK\":\n return EvidenceType.LIGHT_CLIENT_ATTACK;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return EvidenceType.UNRECOGNIZED;\n }\n}\n\nexport function evidenceTypeToJSON(object: EvidenceType): string {\n switch (object) {\n case EvidenceType.UNKNOWN:\n return \"UNKNOWN\";\n case EvidenceType.DUPLICATE_VOTE:\n return \"DUPLICATE_VOTE\";\n case EvidenceType.LIGHT_CLIENT_ATTACK:\n return \"LIGHT_CLIENT_ATTACK\";\n default:\n return \"UNKNOWN\";\n }\n}\n\nexport interface Request {\n echo?: RequestEcho | undefined;\n flush?: RequestFlush | undefined;\n info?: RequestInfo | undefined;\n set_option?: RequestSetOption | undefined;\n init_chain?: RequestInitChain | undefined;\n query?: RequestQuery | undefined;\n begin_block?: RequestBeginBlock | undefined;\n check_tx?: RequestCheckTx | undefined;\n deliver_tx?: RequestDeliverTx | undefined;\n end_block?: RequestEndBlock | undefined;\n commit?: RequestCommit | undefined;\n list_snapshots?: RequestListSnapshots | undefined;\n offer_snapshot?: RequestOfferSnapshot | undefined;\n load_snapshot_chunk?: RequestLoadSnapshotChunk | undefined;\n apply_snapshot_chunk?: RequestApplySnapshotChunk | undefined;\n}\n\nexport interface RequestEcho {\n message: string;\n}\n\nexport interface RequestFlush {}\n\nexport interface RequestInfo {\n version: string;\n block_version: string;\n p2p_version: string;\n}\n\n/** nondeterministic */\nexport interface RequestSetOption {\n key: string;\n value: string;\n}\n\nexport interface RequestInitChain {\n time?: Timestamp;\n chain_id: string;\n consensus_params?: ConsensusParams;\n validators: ValidatorUpdate[];\n app_state_bytes: Uint8Array;\n initial_height: string;\n}\n\nexport interface RequestQuery {\n data: Uint8Array;\n path: string;\n height: string;\n prove: boolean;\n}\n\nexport interface RequestBeginBlock {\n hash: Uint8Array;\n header?: Header;\n last_commit_info?: LastCommitInfo;\n byzantine_validators: Evidence[];\n commit?: Commit;\n txs: Uint8Array[];\n}\n\nexport interface RequestCheckTx {\n tx: Uint8Array;\n type: CheckTxType;\n}\n\nexport interface RequestDeliverTx {\n tx: Uint8Array;\n}\n\nexport interface RequestEndBlock {\n height: string;\n}\n\nexport interface RequestCommit {}\n\n/** lists available snapshots */\nexport interface RequestListSnapshots {}\n\n/** offers a snapshot to the application */\nexport interface RequestOfferSnapshot {\n /** snapshot offered by peers */\n snapshot?: Snapshot;\n /** light client-verified app hash for snapshot height */\n app_hash: Uint8Array;\n}\n\n/** loads a snapshot chunk */\nexport interface RequestLoadSnapshotChunk {\n height: string;\n format: number;\n chunk: number;\n}\n\n/** Applies a snapshot chunk */\nexport interface RequestApplySnapshotChunk {\n index: number;\n chunk: Uint8Array;\n sender: string;\n}\n\nexport interface Response {\n exception?: ResponseException | undefined;\n echo?: ResponseEcho | undefined;\n flush?: ResponseFlush | undefined;\n info?: ResponseInfo | undefined;\n set_option?: ResponseSetOption | undefined;\n init_chain?: ResponseInitChain | undefined;\n query?: ResponseQuery | undefined;\n begin_block?: ResponseBeginBlock | undefined;\n check_tx?: ResponseCheckTx | undefined;\n deliver_tx?: ResponseDeliverTx | undefined;\n end_block?: ResponseEndBlock | undefined;\n commit?: ResponseCommit | undefined;\n list_snapshots?: ResponseListSnapshots | undefined;\n offer_snapshot?: ResponseOfferSnapshot | undefined;\n load_snapshot_chunk?: ResponseLoadSnapshotChunk | undefined;\n apply_snapshot_chunk?: ResponseApplySnapshotChunk | undefined;\n}\n\n/** nondeterministic */\nexport interface ResponseException {\n error: string;\n}\n\nexport interface ResponseEcho {\n message: string;\n}\n\nexport interface ResponseFlush {}\n\nexport interface ResponseInfo {\n data: string;\n version: string;\n app_version: string;\n last_block_height: string;\n last_block_app_hash: Uint8Array;\n}\n\n/** nondeterministic */\nexport interface ResponseSetOption {\n code: number;\n /** bytes data = 2; */\n log: string;\n info: string;\n}\n\nexport interface ResponseInitChain {\n consensus_params?: ConsensusParams;\n validators: ValidatorUpdate[];\n app_hash: Uint8Array;\n}\n\nexport interface ResponseQuery {\n code: number;\n /** bytes data = 2; // use \"value\" instead. */\n log: string;\n /** nondeterministic */\n info: string;\n index: string;\n key: Uint8Array;\n value: Uint8Array;\n proof_ops?: ProofOps;\n height: string;\n codespace: string;\n}\n\nexport interface ResponseBeginBlock {\n events: Event[];\n}\n\nexport interface ResponseCheckTx {\n code: number;\n data: Uint8Array;\n /** nondeterministic */\n log: string;\n /** nondeterministic */\n info: string;\n gas_wanted: string;\n gas_used: string;\n events: Event[];\n codespace: string;\n sender: string;\n priority: string;\n /**\n * mempool_error is set by Tendermint.\n * ABCI applictions creating a ResponseCheckTX should not set mempool_error.\n */\n mempool_error: string;\n}\n\nexport interface ResponseDeliverTx {\n code: number;\n data: Uint8Array;\n /** nondeterministic */\n log: string;\n /** nondeterministic */\n info: string;\n gas_wanted: string;\n gas_used: string;\n /** nondeterministic */\n events: Event[];\n codespace: string;\n}\n\nexport interface ResponseEndBlock {\n validator_updates: ValidatorUpdate[];\n consensus_param_updates?: ConsensusParams;\n events: Event[];\n}\n\nexport interface ResponseCommit {\n /** reserve 1 */\n data: Uint8Array;\n retain_height: string;\n}\n\nexport interface ResponseListSnapshots {\n snapshots: Snapshot[];\n}\n\nexport interface ResponseOfferSnapshot {\n result: ResponseOfferSnapshot_Result;\n}\n\nexport enum ResponseOfferSnapshot_Result {\n /** UNKNOWN - Unknown result, abort all snapshot restoration */\n UNKNOWN = 0,\n /** ACCEPT - Snapshot accepted, apply chunks */\n ACCEPT = 1,\n /** ABORT - Abort all snapshot restoration */\n ABORT = 2,\n /** REJECT - Reject this specific snapshot, try others */\n REJECT = 3,\n /** REJECT_FORMAT - Reject all snapshots of this format, try others */\n REJECT_FORMAT = 4,\n /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */\n REJECT_SENDER = 5,\n UNRECOGNIZED = -1,\n}\n\nexport function responseOfferSnapshot_ResultFromJSON(\n object: any,\n): ResponseOfferSnapshot_Result {\n switch (object) {\n case 0:\n case \"UNKNOWN\":\n return ResponseOfferSnapshot_Result.UNKNOWN;\n case 1:\n case \"ACCEPT\":\n return ResponseOfferSnapshot_Result.ACCEPT;\n case 2:\n case \"ABORT\":\n return ResponseOfferSnapshot_Result.ABORT;\n case 3:\n case \"REJECT\":\n return ResponseOfferSnapshot_Result.REJECT;\n case 4:\n case \"REJECT_FORMAT\":\n return ResponseOfferSnapshot_Result.REJECT_FORMAT;\n case 5:\n case \"REJECT_SENDER\":\n return ResponseOfferSnapshot_Result.REJECT_SENDER;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return ResponseOfferSnapshot_Result.UNRECOGNIZED;\n }\n}\n\nexport function responseOfferSnapshot_ResultToJSON(\n object: ResponseOfferSnapshot_Result,\n): string {\n switch (object) {\n case ResponseOfferSnapshot_Result.UNKNOWN:\n return \"UNKNOWN\";\n case ResponseOfferSnapshot_Result.ACCEPT:\n return \"ACCEPT\";\n case ResponseOfferSnapshot_Result.ABORT:\n return \"ABORT\";\n case ResponseOfferSnapshot_Result.REJECT:\n return \"REJECT\";\n case ResponseOfferSnapshot_Result.REJECT_FORMAT:\n return \"REJECT_FORMAT\";\n case ResponseOfferSnapshot_Result.REJECT_SENDER:\n return \"REJECT_SENDER\";\n default:\n return \"UNKNOWN\";\n }\n}\n\nexport interface ResponseLoadSnapshotChunk {\n chunk: Uint8Array;\n}\n\nexport interface ResponseApplySnapshotChunk {\n result: ResponseApplySnapshotChunk_Result;\n /** Chunks to refetch and reapply */\n refetch_chunks: number[];\n /** Chunk senders to reject and ban */\n reject_senders: string[];\n}\n\nexport enum ResponseApplySnapshotChunk_Result {\n /** UNKNOWN - Unknown result, abort all snapshot restoration */\n UNKNOWN = 0,\n /** ACCEPT - Chunk successfully accepted */\n ACCEPT = 1,\n /** ABORT - Abort all snapshot restoration */\n ABORT = 2,\n /** RETRY - Retry chunk (combine with refetch and reject) */\n RETRY = 3,\n /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */\n RETRY_SNAPSHOT = 4,\n /** REJECT_SNAPSHOT - Reject this snapshot, try others */\n REJECT_SNAPSHOT = 5,\n UNRECOGNIZED = -1,\n}\n\nexport function responseApplySnapshotChunk_ResultFromJSON(\n object: any,\n): ResponseApplySnapshotChunk_Result {\n switch (object) {\n case 0:\n case \"UNKNOWN\":\n return ResponseApplySnapshotChunk_Result.UNKNOWN;\n case 1:\n case \"ACCEPT\":\n return ResponseApplySnapshotChunk_Result.ACCEPT;\n case 2:\n case \"ABORT\":\n return ResponseApplySnapshotChunk_Result.ABORT;\n case 3:\n case \"RETRY\":\n return ResponseApplySnapshotChunk_Result.RETRY;\n case 4:\n case \"RETRY_SNAPSHOT\":\n return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT;\n case 5:\n case \"REJECT_SNAPSHOT\":\n return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return ResponseApplySnapshotChunk_Result.UNRECOGNIZED;\n }\n}\n\nexport function responseApplySnapshotChunk_ResultToJSON(\n object: ResponseApplySnapshotChunk_Result,\n): string {\n switch (object) {\n case ResponseApplySnapshotChunk_Result.UNKNOWN:\n return \"UNKNOWN\";\n case ResponseApplySnapshotChunk_Result.ACCEPT:\n return \"ACCEPT\";\n case ResponseApplySnapshotChunk_Result.ABORT:\n return \"ABORT\";\n case ResponseApplySnapshotChunk_Result.RETRY:\n return \"RETRY\";\n case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT:\n return \"RETRY_SNAPSHOT\";\n case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT:\n return \"REJECT_SNAPSHOT\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/**\n * ConsensusParams contains all consensus-relevant parameters\n * that can be adjusted by the abci app\n */\nexport interface ConsensusParams {\n block?: BlockParams;\n evidence?: EvidenceParams;\n validator?: ValidatorParams;\n version?: VersionParams;\n}\n\n/** BlockParams contains limits on the block size. */\nexport interface BlockParams {\n /** Note: must be greater than 0 */\n max_bytes: string;\n /** Note: must be greater or equal to -1 */\n max_gas: string;\n}\n\nexport interface LastCommitInfo {\n round: number;\n votes: VoteInfo[];\n}\n\n/**\n * Event allows application developers to attach additional information to\n * ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.\n * Later, transactions may be queried using these events.\n */\nexport interface Event {\n type: string;\n attributes: EventAttribute[];\n}\n\n/** EventAttribute is a single key-value pair, associated with an event. */\nexport interface EventAttribute {\n key: Uint8Array;\n value: Uint8Array;\n /** nondeterministic */\n index: boolean;\n}\n\n/**\n * TxResult contains results of executing the transaction.\n *\n * One usage is indexing transaction results.\n */\nexport interface TxResult {\n height: string;\n index: number;\n tx: Uint8Array;\n result?: ResponseDeliverTx;\n}\n\n/** Validator */\nexport interface Validator {\n /** The first 20 bytes of SHA256(public key) */\n address: Uint8Array;\n /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */\n power: string;\n}\n\n/** ValidatorUpdate */\nexport interface ValidatorUpdate {\n pub_key?: PublicKey;\n power: string;\n}\n\n/** VoteInfo */\nexport interface VoteInfo {\n validator?: Validator;\n signed_last_block: boolean;\n}\n\nexport interface Evidence {\n type: EvidenceType;\n /** The offending validator */\n validator?: Validator;\n /** The height when the offense occurred */\n height: string;\n /** The corresponding time where the offense occurred */\n time?: Timestamp;\n /**\n * Total voting power of the validator set in case the ABCI application does\n * not store historical validators.\n * https://github.com/tendermint/tendermint/issues/4581\n */\n total_voting_power: string;\n}\n\nexport interface Snapshot {\n /** The height at which the snapshot was taken */\n height: string;\n /** The application-specific snapshot format */\n format: number;\n /** Number of chunks in the snapshot */\n chunks: number;\n /** Arbitrary snapshot hash, equal only if identical */\n hash: Uint8Array;\n /** Arbitrary application metadata */\n metadata: Uint8Array;\n}\n\nfunction createBaseRequest(): Request {\n return {\n echo: undefined,\n flush: undefined,\n info: undefined,\n set_option: undefined,\n init_chain: undefined,\n query: undefined,\n begin_block: undefined,\n check_tx: undefined,\n deliver_tx: undefined,\n end_block: undefined,\n commit: undefined,\n list_snapshots: undefined,\n offer_snapshot: undefined,\n load_snapshot_chunk: undefined,\n apply_snapshot_chunk: undefined,\n };\n}\n\nexport const Request = {\n encode(\n message: Request,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.echo !== undefined) {\n RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim();\n }\n if (message.flush !== undefined) {\n RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim();\n }\n if (message.info !== undefined) {\n RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim();\n }\n if (message.set_option !== undefined) {\n RequestSetOption.encode(\n message.set_option,\n writer.uint32(34).fork(),\n ).ldelim();\n }\n if (message.init_chain !== undefined) {\n RequestInitChain.encode(\n message.init_chain,\n writer.uint32(42).fork(),\n ).ldelim();\n }\n if (message.query !== undefined) {\n RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim();\n }\n if (message.begin_block !== undefined) {\n RequestBeginBlock.encode(\n message.begin_block,\n writer.uint32(58).fork(),\n ).ldelim();\n }\n if (message.check_tx !== undefined) {\n RequestCheckTx.encode(\n message.check_tx,\n writer.uint32(66).fork(),\n ).ldelim();\n }\n if (message.deliver_tx !== undefined) {\n RequestDeliverTx.encode(\n message.deliver_tx,\n writer.uint32(74).fork(),\n ).ldelim();\n }\n if (message.end_block !== undefined) {\n RequestEndBlock.encode(\n message.end_block,\n writer.uint32(82).fork(),\n ).ldelim();\n }\n if (message.commit !== undefined) {\n RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim();\n }\n if (message.list_snapshots !== undefined) {\n RequestListSnapshots.encode(\n message.list_snapshots,\n writer.uint32(98).fork(),\n ).ldelim();\n }\n if (message.offer_snapshot !== undefined) {\n RequestOfferSnapshot.encode(\n message.offer_snapshot,\n writer.uint32(106).fork(),\n ).ldelim();\n }\n if (message.load_snapshot_chunk !== undefined) {\n RequestLoadSnapshotChunk.encode(\n message.load_snapshot_chunk,\n writer.uint32(114).fork(),\n ).ldelim();\n }\n if (message.apply_snapshot_chunk !== undefined) {\n RequestApplySnapshotChunk.encode(\n message.apply_snapshot_chunk,\n writer.uint32(122).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Request {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.echo = RequestEcho.decode(reader, reader.uint32());\n break;\n case 2:\n message.flush = RequestFlush.decode(reader, reader.uint32());\n break;\n case 3:\n message.info = RequestInfo.decode(reader, reader.uint32());\n break;\n case 4:\n message.set_option = RequestSetOption.decode(reader, reader.uint32());\n break;\n case 5:\n message.init_chain = RequestInitChain.decode(reader, reader.uint32());\n break;\n case 6:\n message.query = RequestQuery.decode(reader, reader.uint32());\n break;\n case 7:\n message.begin_block = RequestBeginBlock.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 8:\n message.check_tx = RequestCheckTx.decode(reader, reader.uint32());\n break;\n case 9:\n message.deliver_tx = RequestDeliverTx.decode(reader, reader.uint32());\n break;\n case 10:\n message.end_block = RequestEndBlock.decode(reader, reader.uint32());\n break;\n case 11:\n message.commit = RequestCommit.decode(reader, reader.uint32());\n break;\n case 12:\n message.list_snapshots = RequestListSnapshots.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 13:\n message.offer_snapshot = RequestOfferSnapshot.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 14:\n message.load_snapshot_chunk = RequestLoadSnapshotChunk.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 15:\n message.apply_snapshot_chunk = RequestApplySnapshotChunk.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Request {\n return {\n echo: isSet(object.echo) ? RequestEcho.fromJSON(object.echo) : undefined,\n flush: isSet(object.flush)\n ? RequestFlush.fromJSON(object.flush)\n : undefined,\n info: isSet(object.info) ? RequestInfo.fromJSON(object.info) : undefined,\n set_option: isSet(object.set_option)\n ? RequestSetOption.fromJSON(object.set_option)\n : undefined,\n init_chain: isSet(object.init_chain)\n ? RequestInitChain.fromJSON(object.init_chain)\n : undefined,\n query: isSet(object.query)\n ? RequestQuery.fromJSON(object.query)\n : undefined,\n begin_block: isSet(object.begin_block)\n ? RequestBeginBlock.fromJSON(object.begin_block)\n : undefined,\n check_tx: isSet(object.check_tx)\n ? RequestCheckTx.fromJSON(object.check_tx)\n : undefined,\n deliver_tx: isSet(object.deliver_tx)\n ? RequestDeliverTx.fromJSON(object.deliver_tx)\n : undefined,\n end_block: isSet(object.end_block)\n ? RequestEndBlock.fromJSON(object.end_block)\n : undefined,\n commit: isSet(object.commit)\n ? RequestCommit.fromJSON(object.commit)\n : undefined,\n list_snapshots: isSet(object.list_snapshots)\n ? RequestListSnapshots.fromJSON(object.list_snapshots)\n : undefined,\n offer_snapshot: isSet(object.offer_snapshot)\n ? RequestOfferSnapshot.fromJSON(object.offer_snapshot)\n : undefined,\n load_snapshot_chunk: isSet(object.load_snapshot_chunk)\n ? RequestLoadSnapshotChunk.fromJSON(object.load_snapshot_chunk)\n : undefined,\n apply_snapshot_chunk: isSet(object.apply_snapshot_chunk)\n ? RequestApplySnapshotChunk.fromJSON(object.apply_snapshot_chunk)\n : undefined,\n };\n },\n\n toJSON(message: Request): unknown {\n const obj: any = {};\n message.echo !== undefined &&\n (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined);\n message.flush !== undefined &&\n (obj.flush = message.flush\n ? RequestFlush.toJSON(message.flush)\n : undefined);\n message.info !== undefined &&\n (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined);\n message.set_option !== undefined &&\n (obj.set_option = message.set_option\n ? RequestSetOption.toJSON(message.set_option)\n : undefined);\n message.init_chain !== undefined &&\n (obj.init_chain = message.init_chain\n ? RequestInitChain.toJSON(message.init_chain)\n : undefined);\n message.query !== undefined &&\n (obj.query = message.query\n ? RequestQuery.toJSON(message.query)\n : undefined);\n message.begin_block !== undefined &&\n (obj.begin_block = message.begin_block\n ? RequestBeginBlock.toJSON(message.begin_block)\n : undefined);\n message.check_tx !== undefined &&\n (obj.check_tx = message.check_tx\n ? RequestCheckTx.toJSON(message.check_tx)\n : undefined);\n message.deliver_tx !== undefined &&\n (obj.deliver_tx = message.deliver_tx\n ? RequestDeliverTx.toJSON(message.deliver_tx)\n : undefined);\n message.end_block !== undefined &&\n (obj.end_block = message.end_block\n ? RequestEndBlock.toJSON(message.end_block)\n : undefined);\n message.commit !== undefined &&\n (obj.commit = message.commit\n ? RequestCommit.toJSON(message.commit)\n : undefined);\n message.list_snapshots !== undefined &&\n (obj.list_snapshots = message.list_snapshots\n ? RequestListSnapshots.toJSON(message.list_snapshots)\n : undefined);\n message.offer_snapshot !== undefined &&\n (obj.offer_snapshot = message.offer_snapshot\n ? RequestOfferSnapshot.toJSON(message.offer_snapshot)\n : undefined);\n message.load_snapshot_chunk !== undefined &&\n (obj.load_snapshot_chunk = message.load_snapshot_chunk\n ? RequestLoadSnapshotChunk.toJSON(message.load_snapshot_chunk)\n : undefined);\n message.apply_snapshot_chunk !== undefined &&\n (obj.apply_snapshot_chunk = message.apply_snapshot_chunk\n ? RequestApplySnapshotChunk.toJSON(message.apply_snapshot_chunk)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): Request {\n const message = createBaseRequest();\n message.echo =\n object.echo !== undefined && object.echo !== null\n ? RequestEcho.fromPartial(object.echo)\n : undefined;\n message.flush =\n object.flush !== undefined && object.flush !== null\n ? RequestFlush.fromPartial(object.flush)\n : undefined;\n message.info =\n object.info !== undefined && object.info !== null\n ? RequestInfo.fromPartial(object.info)\n : undefined;\n message.set_option =\n object.set_option !== undefined && object.set_option !== null\n ? RequestSetOption.fromPartial(object.set_option)\n : undefined;\n message.init_chain =\n object.init_chain !== undefined && object.init_chain !== null\n ? RequestInitChain.fromPartial(object.init_chain)\n : undefined;\n message.query =\n object.query !== undefined && object.query !== null\n ? RequestQuery.fromPartial(object.query)\n : undefined;\n message.begin_block =\n object.begin_block !== undefined && object.begin_block !== null\n ? RequestBeginBlock.fromPartial(object.begin_block)\n : undefined;\n message.check_tx =\n object.check_tx !== undefined && object.check_tx !== null\n ? RequestCheckTx.fromPartial(object.check_tx)\n : undefined;\n message.deliver_tx =\n object.deliver_tx !== undefined && object.deliver_tx !== null\n ? RequestDeliverTx.fromPartial(object.deliver_tx)\n : undefined;\n message.end_block =\n object.end_block !== undefined && object.end_block !== null\n ? RequestEndBlock.fromPartial(object.end_block)\n : undefined;\n message.commit =\n object.commit !== undefined && object.commit !== null\n ? RequestCommit.fromPartial(object.commit)\n : undefined;\n message.list_snapshots =\n object.list_snapshots !== undefined && object.list_snapshots !== null\n ? RequestListSnapshots.fromPartial(object.list_snapshots)\n : undefined;\n message.offer_snapshot =\n object.offer_snapshot !== undefined && object.offer_snapshot !== null\n ? RequestOfferSnapshot.fromPartial(object.offer_snapshot)\n : undefined;\n message.load_snapshot_chunk =\n object.load_snapshot_chunk !== undefined &&\n object.load_snapshot_chunk !== null\n ? RequestLoadSnapshotChunk.fromPartial(object.load_snapshot_chunk)\n : undefined;\n message.apply_snapshot_chunk =\n object.apply_snapshot_chunk !== undefined &&\n object.apply_snapshot_chunk !== null\n ? RequestApplySnapshotChunk.fromPartial(object.apply_snapshot_chunk)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseRequestEcho(): RequestEcho {\n return { message: \"\" };\n}\n\nexport const RequestEcho = {\n encode(\n message: RequestEcho,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.message !== \"\") {\n writer.uint32(10).string(message.message);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestEcho {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestEcho();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.message = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestEcho {\n return {\n message: isSet(object.message) ? String(object.message) : \"\",\n };\n },\n\n toJSON(message: RequestEcho): unknown {\n const obj: any = {};\n message.message !== undefined && (obj.message = message.message);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestEcho {\n const message = createBaseRequestEcho();\n message.message = object.message ?? \"\";\n return message;\n },\n};\n\nfunction createBaseRequestFlush(): RequestFlush {\n return {};\n}\n\nexport const RequestFlush = {\n encode(\n _: RequestFlush,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestFlush {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestFlush();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): RequestFlush {\n return {};\n },\n\n toJSON(_: RequestFlush): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): RequestFlush {\n const message = createBaseRequestFlush();\n return message;\n },\n};\n\nfunction createBaseRequestInfo(): RequestInfo {\n return { version: \"\", block_version: \"0\", p2p_version: \"0\" };\n}\n\nexport const RequestInfo = {\n encode(\n message: RequestInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.version !== \"\") {\n writer.uint32(10).string(message.version);\n }\n if (message.block_version !== \"0\") {\n writer.uint32(16).uint64(message.block_version);\n }\n if (message.p2p_version !== \"0\") {\n writer.uint32(24).uint64(message.p2p_version);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.version = reader.string();\n break;\n case 2:\n message.block_version = longToString(reader.uint64() as Long);\n break;\n case 3:\n message.p2p_version = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestInfo {\n return {\n version: isSet(object.version) ? String(object.version) : \"\",\n block_version: isSet(object.block_version)\n ? String(object.block_version)\n : \"0\",\n p2p_version: isSet(object.p2p_version) ? String(object.p2p_version) : \"0\",\n };\n },\n\n toJSON(message: RequestInfo): unknown {\n const obj: any = {};\n message.version !== undefined && (obj.version = message.version);\n message.block_version !== undefined &&\n (obj.block_version = message.block_version);\n message.p2p_version !== undefined &&\n (obj.p2p_version = message.p2p_version);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestInfo {\n const message = createBaseRequestInfo();\n message.version = object.version ?? \"\";\n message.block_version = object.block_version ?? \"0\";\n message.p2p_version = object.p2p_version ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseRequestSetOption(): RequestSetOption {\n return { key: \"\", value: \"\" };\n}\n\nexport const RequestSetOption = {\n encode(\n message: RequestSetOption,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== \"\") {\n writer.uint32(18).string(message.value);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestSetOption {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestSetOption();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.string();\n break;\n case 2:\n message.value = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestSetOption {\n return {\n key: isSet(object.key) ? String(object.key) : \"\",\n value: isSet(object.value) ? String(object.value) : \"\",\n };\n },\n\n toJSON(message: RequestSetOption): unknown {\n const obj: any = {};\n message.key !== undefined && (obj.key = message.key);\n message.value !== undefined && (obj.value = message.value);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestSetOption {\n const message = createBaseRequestSetOption();\n message.key = object.key ?? \"\";\n message.value = object.value ?? \"\";\n return message;\n },\n};\n\nfunction createBaseRequestInitChain(): RequestInitChain {\n return {\n time: undefined,\n chain_id: \"\",\n consensus_params: undefined,\n validators: [],\n app_state_bytes: new Uint8Array(),\n initial_height: \"0\",\n };\n}\n\nexport const RequestInitChain = {\n encode(\n message: RequestInitChain,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.time !== undefined) {\n Timestamp.encode(message.time, writer.uint32(10).fork()).ldelim();\n }\n if (message.chain_id !== \"\") {\n writer.uint32(18).string(message.chain_id);\n }\n if (message.consensus_params !== undefined) {\n ConsensusParams.encode(\n message.consensus_params,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n for (const v of message.validators) {\n ValidatorUpdate.encode(v!, writer.uint32(34).fork()).ldelim();\n }\n if (message.app_state_bytes.length !== 0) {\n writer.uint32(42).bytes(message.app_state_bytes);\n }\n if (message.initial_height !== \"0\") {\n writer.uint32(48).int64(message.initial_height);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestInitChain {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestInitChain();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.time = Timestamp.decode(reader, reader.uint32());\n break;\n case 2:\n message.chain_id = reader.string();\n break;\n case 3:\n message.consensus_params = ConsensusParams.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 4:\n message.validators.push(\n ValidatorUpdate.decode(reader, reader.uint32()),\n );\n break;\n case 5:\n message.app_state_bytes = reader.bytes();\n break;\n case 6:\n message.initial_height = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestInitChain {\n return {\n time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,\n chain_id: isSet(object.chain_id) ? String(object.chain_id) : \"\",\n consensus_params: isSet(object.consensus_params)\n ? ConsensusParams.fromJSON(object.consensus_params)\n : undefined,\n validators: Array.isArray(object?.validators)\n ? object.validators.map((e: any) => ValidatorUpdate.fromJSON(e))\n : [],\n app_state_bytes: isSet(object.app_state_bytes)\n ? bytesFromBase64(object.app_state_bytes)\n : new Uint8Array(),\n initial_height: isSet(object.initial_height)\n ? String(object.initial_height)\n : \"0\",\n };\n },\n\n toJSON(message: RequestInitChain): unknown {\n const obj: any = {};\n message.time !== undefined &&\n (obj.time = fromTimestamp(message.time).toISOString());\n message.chain_id !== undefined && (obj.chain_id = message.chain_id);\n message.consensus_params !== undefined &&\n (obj.consensus_params = message.consensus_params\n ? ConsensusParams.toJSON(message.consensus_params)\n : undefined);\n if (message.validators) {\n obj.validators = message.validators.map((e) =>\n e ? ValidatorUpdate.toJSON(e) : undefined,\n );\n } else {\n obj.validators = [];\n }\n message.app_state_bytes !== undefined &&\n (obj.app_state_bytes = base64FromBytes(\n message.app_state_bytes !== undefined\n ? message.app_state_bytes\n : new Uint8Array(),\n ));\n message.initial_height !== undefined &&\n (obj.initial_height = message.initial_height);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestInitChain {\n const message = createBaseRequestInitChain();\n message.time =\n object.time !== undefined && object.time !== null\n ? Timestamp.fromPartial(object.time)\n : undefined;\n message.chain_id = object.chain_id ?? \"\";\n message.consensus_params =\n object.consensus_params !== undefined && object.consensus_params !== null\n ? ConsensusParams.fromPartial(object.consensus_params)\n : undefined;\n message.validators =\n object.validators?.map((e) => ValidatorUpdate.fromPartial(e)) || [];\n message.app_state_bytes = object.app_state_bytes ?? new Uint8Array();\n message.initial_height = object.initial_height ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseRequestQuery(): RequestQuery {\n return { data: new Uint8Array(), path: \"\", height: \"0\", prove: false };\n}\n\nexport const RequestQuery = {\n encode(\n message: RequestQuery,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.data.length !== 0) {\n writer.uint32(10).bytes(message.data);\n }\n if (message.path !== \"\") {\n writer.uint32(18).string(message.path);\n }\n if (message.height !== \"0\") {\n writer.uint32(24).int64(message.height);\n }\n if (message.prove === true) {\n writer.uint32(32).bool(message.prove);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestQuery {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestQuery();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.data = reader.bytes();\n break;\n case 2:\n message.path = reader.string();\n break;\n case 3:\n message.height = longToString(reader.int64() as Long);\n break;\n case 4:\n message.prove = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestQuery {\n return {\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n path: isSet(object.path) ? String(object.path) : \"\",\n height: isSet(object.height) ? String(object.height) : \"0\",\n prove: isSet(object.prove) ? Boolean(object.prove) : false,\n };\n },\n\n toJSON(message: RequestQuery): unknown {\n const obj: any = {};\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n message.path !== undefined && (obj.path = message.path);\n message.height !== undefined && (obj.height = message.height);\n message.prove !== undefined && (obj.prove = message.prove);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestQuery {\n const message = createBaseRequestQuery();\n message.data = object.data ?? new Uint8Array();\n message.path = object.path ?? \"\";\n message.height = object.height ?? \"0\";\n message.prove = object.prove ?? false;\n return message;\n },\n};\n\nfunction createBaseRequestBeginBlock(): RequestBeginBlock {\n return {\n hash: new Uint8Array(),\n header: undefined,\n last_commit_info: undefined,\n byzantine_validators: [],\n commit: undefined,\n txs: [],\n };\n}\n\nexport const RequestBeginBlock = {\n encode(\n message: RequestBeginBlock,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.hash.length !== 0) {\n writer.uint32(10).bytes(message.hash);\n }\n if (message.header !== undefined) {\n Header.encode(message.header, writer.uint32(18).fork()).ldelim();\n }\n if (message.last_commit_info !== undefined) {\n LastCommitInfo.encode(\n message.last_commit_info,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n for (const v of message.byzantine_validators) {\n Evidence.encode(v!, writer.uint32(34).fork()).ldelim();\n }\n if (message.commit !== undefined) {\n Commit.encode(message.commit, writer.uint32(42).fork()).ldelim();\n }\n for (const v of message.txs) {\n writer.uint32(50).bytes(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestBeginBlock {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestBeginBlock();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.hash = reader.bytes();\n break;\n case 2:\n message.header = Header.decode(reader, reader.uint32());\n break;\n case 3:\n message.last_commit_info = LastCommitInfo.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 4:\n message.byzantine_validators.push(\n Evidence.decode(reader, reader.uint32()),\n );\n break;\n case 5:\n message.commit = Commit.decode(reader, reader.uint32());\n break;\n case 6:\n message.txs.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestBeginBlock {\n return {\n hash: isSet(object.hash)\n ? bytesFromBase64(object.hash)\n : new Uint8Array(),\n header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,\n last_commit_info: isSet(object.last_commit_info)\n ? LastCommitInfo.fromJSON(object.last_commit_info)\n : undefined,\n byzantine_validators: Array.isArray(object?.byzantine_validators)\n ? object.byzantine_validators.map((e: any) => Evidence.fromJSON(e))\n : [],\n commit: isSet(object.commit) ? Commit.fromJSON(object.commit) : undefined,\n txs: Array.isArray(object?.txs)\n ? object.txs.map((e: any) => bytesFromBase64(e))\n : [],\n };\n },\n\n toJSON(message: RequestBeginBlock): unknown {\n const obj: any = {};\n message.hash !== undefined &&\n (obj.hash = base64FromBytes(\n message.hash !== undefined ? message.hash : new Uint8Array(),\n ));\n message.header !== undefined &&\n (obj.header = message.header ? Header.toJSON(message.header) : undefined);\n message.last_commit_info !== undefined &&\n (obj.last_commit_info = message.last_commit_info\n ? LastCommitInfo.toJSON(message.last_commit_info)\n : undefined);\n if (message.byzantine_validators) {\n obj.byzantine_validators = message.byzantine_validators.map((e) =>\n e ? Evidence.toJSON(e) : undefined,\n );\n } else {\n obj.byzantine_validators = [];\n }\n message.commit !== undefined &&\n (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined);\n if (message.txs) {\n obj.txs = message.txs.map((e) =>\n base64FromBytes(e !== undefined ? e : new Uint8Array()),\n );\n } else {\n obj.txs = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestBeginBlock {\n const message = createBaseRequestBeginBlock();\n message.hash = object.hash ?? new Uint8Array();\n message.header =\n object.header !== undefined && object.header !== null\n ? Header.fromPartial(object.header)\n : undefined;\n message.last_commit_info =\n object.last_commit_info !== undefined && object.last_commit_info !== null\n ? LastCommitInfo.fromPartial(object.last_commit_info)\n : undefined;\n message.byzantine_validators =\n object.byzantine_validators?.map((e) => Evidence.fromPartial(e)) || [];\n message.commit =\n object.commit !== undefined && object.commit !== null\n ? Commit.fromPartial(object.commit)\n : undefined;\n message.txs = object.txs?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseRequestCheckTx(): RequestCheckTx {\n return { tx: new Uint8Array(), type: 0 };\n}\n\nexport const RequestCheckTx = {\n encode(\n message: RequestCheckTx,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.tx.length !== 0) {\n writer.uint32(10).bytes(message.tx);\n }\n if (message.type !== 0) {\n writer.uint32(16).int32(message.type);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestCheckTx {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestCheckTx();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.tx = reader.bytes();\n break;\n case 2:\n message.type = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestCheckTx {\n return {\n tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),\n type: isSet(object.type) ? checkTxTypeFromJSON(object.type) : 0,\n };\n },\n\n toJSON(message: RequestCheckTx): unknown {\n const obj: any = {};\n message.tx !== undefined &&\n (obj.tx = base64FromBytes(\n message.tx !== undefined ? message.tx : new Uint8Array(),\n ));\n message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestCheckTx {\n const message = createBaseRequestCheckTx();\n message.tx = object.tx ?? new Uint8Array();\n message.type = object.type ?? 0;\n return message;\n },\n};\n\nfunction createBaseRequestDeliverTx(): RequestDeliverTx {\n return { tx: new Uint8Array() };\n}\n\nexport const RequestDeliverTx = {\n encode(\n message: RequestDeliverTx,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.tx.length !== 0) {\n writer.uint32(10).bytes(message.tx);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestDeliverTx {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestDeliverTx();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.tx = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestDeliverTx {\n return {\n tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),\n };\n },\n\n toJSON(message: RequestDeliverTx): unknown {\n const obj: any = {};\n message.tx !== undefined &&\n (obj.tx = base64FromBytes(\n message.tx !== undefined ? message.tx : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestDeliverTx {\n const message = createBaseRequestDeliverTx();\n message.tx = object.tx ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseRequestEndBlock(): RequestEndBlock {\n return { height: \"0\" };\n}\n\nexport const RequestEndBlock = {\n encode(\n message: RequestEndBlock,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.height !== \"0\") {\n writer.uint32(8).int64(message.height);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestEndBlock {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestEndBlock();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.height = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestEndBlock {\n return {\n height: isSet(object.height) ? String(object.height) : \"0\",\n };\n },\n\n toJSON(message: RequestEndBlock): unknown {\n const obj: any = {};\n message.height !== undefined && (obj.height = message.height);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestEndBlock {\n const message = createBaseRequestEndBlock();\n message.height = object.height ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseRequestCommit(): RequestCommit {\n return {};\n}\n\nexport const RequestCommit = {\n encode(\n _: RequestCommit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): RequestCommit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestCommit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): RequestCommit {\n return {};\n },\n\n toJSON(_: RequestCommit): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): RequestCommit {\n const message = createBaseRequestCommit();\n return message;\n },\n};\n\nfunction createBaseRequestListSnapshots(): RequestListSnapshots {\n return {};\n}\n\nexport const RequestListSnapshots = {\n encode(\n _: RequestListSnapshots,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): RequestListSnapshots {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestListSnapshots();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): RequestListSnapshots {\n return {};\n },\n\n toJSON(_: RequestListSnapshots): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): RequestListSnapshots {\n const message = createBaseRequestListSnapshots();\n return message;\n },\n};\n\nfunction createBaseRequestOfferSnapshot(): RequestOfferSnapshot {\n return { snapshot: undefined, app_hash: new Uint8Array() };\n}\n\nexport const RequestOfferSnapshot = {\n encode(\n message: RequestOfferSnapshot,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.snapshot !== undefined) {\n Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim();\n }\n if (message.app_hash.length !== 0) {\n writer.uint32(18).bytes(message.app_hash);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): RequestOfferSnapshot {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestOfferSnapshot();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.snapshot = Snapshot.decode(reader, reader.uint32());\n break;\n case 2:\n message.app_hash = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestOfferSnapshot {\n return {\n snapshot: isSet(object.snapshot)\n ? Snapshot.fromJSON(object.snapshot)\n : undefined,\n app_hash: isSet(object.app_hash)\n ? bytesFromBase64(object.app_hash)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: RequestOfferSnapshot): unknown {\n const obj: any = {};\n message.snapshot !== undefined &&\n (obj.snapshot = message.snapshot\n ? Snapshot.toJSON(message.snapshot)\n : undefined);\n message.app_hash !== undefined &&\n (obj.app_hash = base64FromBytes(\n message.app_hash !== undefined ? message.app_hash : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestOfferSnapshot {\n const message = createBaseRequestOfferSnapshot();\n message.snapshot =\n object.snapshot !== undefined && object.snapshot !== null\n ? Snapshot.fromPartial(object.snapshot)\n : undefined;\n message.app_hash = object.app_hash ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk {\n return { height: \"0\", format: 0, chunk: 0 };\n}\n\nexport const RequestLoadSnapshotChunk = {\n encode(\n message: RequestLoadSnapshotChunk,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.height !== \"0\") {\n writer.uint32(8).uint64(message.height);\n }\n if (message.format !== 0) {\n writer.uint32(16).uint32(message.format);\n }\n if (message.chunk !== 0) {\n writer.uint32(24).uint32(message.chunk);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): RequestLoadSnapshotChunk {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestLoadSnapshotChunk();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.height = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.format = reader.uint32();\n break;\n case 3:\n message.chunk = reader.uint32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestLoadSnapshotChunk {\n return {\n height: isSet(object.height) ? String(object.height) : \"0\",\n format: isSet(object.format) ? Number(object.format) : 0,\n chunk: isSet(object.chunk) ? Number(object.chunk) : 0,\n };\n },\n\n toJSON(message: RequestLoadSnapshotChunk): unknown {\n const obj: any = {};\n message.height !== undefined && (obj.height = message.height);\n message.format !== undefined && (obj.format = Math.round(message.format));\n message.chunk !== undefined && (obj.chunk = Math.round(message.chunk));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestLoadSnapshotChunk {\n const message = createBaseRequestLoadSnapshotChunk();\n message.height = object.height ?? \"0\";\n message.format = object.format ?? 0;\n message.chunk = object.chunk ?? 0;\n return message;\n },\n};\n\nfunction createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk {\n return { index: 0, chunk: new Uint8Array(), sender: \"\" };\n}\n\nexport const RequestApplySnapshotChunk = {\n encode(\n message: RequestApplySnapshotChunk,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.index !== 0) {\n writer.uint32(8).uint32(message.index);\n }\n if (message.chunk.length !== 0) {\n writer.uint32(18).bytes(message.chunk);\n }\n if (message.sender !== \"\") {\n writer.uint32(26).string(message.sender);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): RequestApplySnapshotChunk {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRequestApplySnapshotChunk();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.index = reader.uint32();\n break;\n case 2:\n message.chunk = reader.bytes();\n break;\n case 3:\n message.sender = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): RequestApplySnapshotChunk {\n return {\n index: isSet(object.index) ? Number(object.index) : 0,\n chunk: isSet(object.chunk)\n ? bytesFromBase64(object.chunk)\n : new Uint8Array(),\n sender: isSet(object.sender) ? String(object.sender) : \"\",\n };\n },\n\n toJSON(message: RequestApplySnapshotChunk): unknown {\n const obj: any = {};\n message.index !== undefined && (obj.index = Math.round(message.index));\n message.chunk !== undefined &&\n (obj.chunk = base64FromBytes(\n message.chunk !== undefined ? message.chunk : new Uint8Array(),\n ));\n message.sender !== undefined && (obj.sender = message.sender);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): RequestApplySnapshotChunk {\n const message = createBaseRequestApplySnapshotChunk();\n message.index = object.index ?? 0;\n message.chunk = object.chunk ?? new Uint8Array();\n message.sender = object.sender ?? \"\";\n return message;\n },\n};\n\nfunction createBaseResponse(): Response {\n return {\n exception: undefined,\n echo: undefined,\n flush: undefined,\n info: undefined,\n set_option: undefined,\n init_chain: undefined,\n query: undefined,\n begin_block: undefined,\n check_tx: undefined,\n deliver_tx: undefined,\n end_block: undefined,\n commit: undefined,\n list_snapshots: undefined,\n offer_snapshot: undefined,\n load_snapshot_chunk: undefined,\n apply_snapshot_chunk: undefined,\n };\n}\n\nexport const Response = {\n encode(\n message: Response,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.exception !== undefined) {\n ResponseException.encode(\n message.exception,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.echo !== undefined) {\n ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim();\n }\n if (message.flush !== undefined) {\n ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim();\n }\n if (message.info !== undefined) {\n ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim();\n }\n if (message.set_option !== undefined) {\n ResponseSetOption.encode(\n message.set_option,\n writer.uint32(42).fork(),\n ).ldelim();\n }\n if (message.init_chain !== undefined) {\n ResponseInitChain.encode(\n message.init_chain,\n writer.uint32(50).fork(),\n ).ldelim();\n }\n if (message.query !== undefined) {\n ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim();\n }\n if (message.begin_block !== undefined) {\n ResponseBeginBlock.encode(\n message.begin_block,\n writer.uint32(66).fork(),\n ).ldelim();\n }\n if (message.check_tx !== undefined) {\n ResponseCheckTx.encode(\n message.check_tx,\n writer.uint32(74).fork(),\n ).ldelim();\n }\n if (message.deliver_tx !== undefined) {\n ResponseDeliverTx.encode(\n message.deliver_tx,\n writer.uint32(82).fork(),\n ).ldelim();\n }\n if (message.end_block !== undefined) {\n ResponseEndBlock.encode(\n message.end_block,\n writer.uint32(90).fork(),\n ).ldelim();\n }\n if (message.commit !== undefined) {\n ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim();\n }\n if (message.list_snapshots !== undefined) {\n ResponseListSnapshots.encode(\n message.list_snapshots,\n writer.uint32(106).fork(),\n ).ldelim();\n }\n if (message.offer_snapshot !== undefined) {\n ResponseOfferSnapshot.encode(\n message.offer_snapshot,\n writer.uint32(114).fork(),\n ).ldelim();\n }\n if (message.load_snapshot_chunk !== undefined) {\n ResponseLoadSnapshotChunk.encode(\n message.load_snapshot_chunk,\n writer.uint32(122).fork(),\n ).ldelim();\n }\n if (message.apply_snapshot_chunk !== undefined) {\n ResponseApplySnapshotChunk.encode(\n message.apply_snapshot_chunk,\n writer.uint32(130).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Response {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.exception = ResponseException.decode(reader, reader.uint32());\n break;\n case 2:\n message.echo = ResponseEcho.decode(reader, reader.uint32());\n break;\n case 3:\n message.flush = ResponseFlush.decode(reader, reader.uint32());\n break;\n case 4:\n message.info = ResponseInfo.decode(reader, reader.uint32());\n break;\n case 5:\n message.set_option = ResponseSetOption.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 6:\n message.init_chain = ResponseInitChain.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 7:\n message.query = ResponseQuery.decode(reader, reader.uint32());\n break;\n case 8:\n message.begin_block = ResponseBeginBlock.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 9:\n message.check_tx = ResponseCheckTx.decode(reader, reader.uint32());\n break;\n case 10:\n message.deliver_tx = ResponseDeliverTx.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 11:\n message.end_block = ResponseEndBlock.decode(reader, reader.uint32());\n break;\n case 12:\n message.commit = ResponseCommit.decode(reader, reader.uint32());\n break;\n case 13:\n message.list_snapshots = ResponseListSnapshots.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 14:\n message.offer_snapshot = ResponseOfferSnapshot.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 15:\n message.load_snapshot_chunk = ResponseLoadSnapshotChunk.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 16:\n message.apply_snapshot_chunk = ResponseApplySnapshotChunk.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Response {\n return {\n exception: isSet(object.exception)\n ? ResponseException.fromJSON(object.exception)\n : undefined,\n echo: isSet(object.echo) ? ResponseEcho.fromJSON(object.echo) : undefined,\n flush: isSet(object.flush)\n ? ResponseFlush.fromJSON(object.flush)\n : undefined,\n info: isSet(object.info) ? ResponseInfo.fromJSON(object.info) : undefined,\n set_option: isSet(object.set_option)\n ? ResponseSetOption.fromJSON(object.set_option)\n : undefined,\n init_chain: isSet(object.init_chain)\n ? ResponseInitChain.fromJSON(object.init_chain)\n : undefined,\n query: isSet(object.query)\n ? ResponseQuery.fromJSON(object.query)\n : undefined,\n begin_block: isSet(object.begin_block)\n ? ResponseBeginBlock.fromJSON(object.begin_block)\n : undefined,\n check_tx: isSet(object.check_tx)\n ? ResponseCheckTx.fromJSON(object.check_tx)\n : undefined,\n deliver_tx: isSet(object.deliver_tx)\n ? ResponseDeliverTx.fromJSON(object.deliver_tx)\n : undefined,\n end_block: isSet(object.end_block)\n ? ResponseEndBlock.fromJSON(object.end_block)\n : undefined,\n commit: isSet(object.commit)\n ? ResponseCommit.fromJSON(object.commit)\n : undefined,\n list_snapshots: isSet(object.list_snapshots)\n ? ResponseListSnapshots.fromJSON(object.list_snapshots)\n : undefined,\n offer_snapshot: isSet(object.offer_snapshot)\n ? ResponseOfferSnapshot.fromJSON(object.offer_snapshot)\n : undefined,\n load_snapshot_chunk: isSet(object.load_snapshot_chunk)\n ? ResponseLoadSnapshotChunk.fromJSON(object.load_snapshot_chunk)\n : undefined,\n apply_snapshot_chunk: isSet(object.apply_snapshot_chunk)\n ? ResponseApplySnapshotChunk.fromJSON(object.apply_snapshot_chunk)\n : undefined,\n };\n },\n\n toJSON(message: Response): unknown {\n const obj: any = {};\n message.exception !== undefined &&\n (obj.exception = message.exception\n ? ResponseException.toJSON(message.exception)\n : undefined);\n message.echo !== undefined &&\n (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined);\n message.flush !== undefined &&\n (obj.flush = message.flush\n ? ResponseFlush.toJSON(message.flush)\n : undefined);\n message.info !== undefined &&\n (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined);\n message.set_option !== undefined &&\n (obj.set_option = message.set_option\n ? ResponseSetOption.toJSON(message.set_option)\n : undefined);\n message.init_chain !== undefined &&\n (obj.init_chain = message.init_chain\n ? ResponseInitChain.toJSON(message.init_chain)\n : undefined);\n message.query !== undefined &&\n (obj.query = message.query\n ? ResponseQuery.toJSON(message.query)\n : undefined);\n message.begin_block !== undefined &&\n (obj.begin_block = message.begin_block\n ? ResponseBeginBlock.toJSON(message.begin_block)\n : undefined);\n message.check_tx !== undefined &&\n (obj.check_tx = message.check_tx\n ? ResponseCheckTx.toJSON(message.check_tx)\n : undefined);\n message.deliver_tx !== undefined &&\n (obj.deliver_tx = message.deliver_tx\n ? ResponseDeliverTx.toJSON(message.deliver_tx)\n : undefined);\n message.end_block !== undefined &&\n (obj.end_block = message.end_block\n ? ResponseEndBlock.toJSON(message.end_block)\n : undefined);\n message.commit !== undefined &&\n (obj.commit = message.commit\n ? ResponseCommit.toJSON(message.commit)\n : undefined);\n message.list_snapshots !== undefined &&\n (obj.list_snapshots = message.list_snapshots\n ? ResponseListSnapshots.toJSON(message.list_snapshots)\n : undefined);\n message.offer_snapshot !== undefined &&\n (obj.offer_snapshot = message.offer_snapshot\n ? ResponseOfferSnapshot.toJSON(message.offer_snapshot)\n : undefined);\n message.load_snapshot_chunk !== undefined &&\n (obj.load_snapshot_chunk = message.load_snapshot_chunk\n ? ResponseLoadSnapshotChunk.toJSON(message.load_snapshot_chunk)\n : undefined);\n message.apply_snapshot_chunk !== undefined &&\n (obj.apply_snapshot_chunk = message.apply_snapshot_chunk\n ? ResponseApplySnapshotChunk.toJSON(message.apply_snapshot_chunk)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): Response {\n const message = createBaseResponse();\n message.exception =\n object.exception !== undefined && object.exception !== null\n ? ResponseException.fromPartial(object.exception)\n : undefined;\n message.echo =\n object.echo !== undefined && object.echo !== null\n ? ResponseEcho.fromPartial(object.echo)\n : undefined;\n message.flush =\n object.flush !== undefined && object.flush !== null\n ? ResponseFlush.fromPartial(object.flush)\n : undefined;\n message.info =\n object.info !== undefined && object.info !== null\n ? ResponseInfo.fromPartial(object.info)\n : undefined;\n message.set_option =\n object.set_option !== undefined && object.set_option !== null\n ? ResponseSetOption.fromPartial(object.set_option)\n : undefined;\n message.init_chain =\n object.init_chain !== undefined && object.init_chain !== null\n ? ResponseInitChain.fromPartial(object.init_chain)\n : undefined;\n message.query =\n object.query !== undefined && object.query !== null\n ? ResponseQuery.fromPartial(object.query)\n : undefined;\n message.begin_block =\n object.begin_block !== undefined && object.begin_block !== null\n ? ResponseBeginBlock.fromPartial(object.begin_block)\n : undefined;\n message.check_tx =\n object.check_tx !== undefined && object.check_tx !== null\n ? ResponseCheckTx.fromPartial(object.check_tx)\n : undefined;\n message.deliver_tx =\n object.deliver_tx !== undefined && object.deliver_tx !== null\n ? ResponseDeliverTx.fromPartial(object.deliver_tx)\n : undefined;\n message.end_block =\n object.end_block !== undefined && object.end_block !== null\n ? ResponseEndBlock.fromPartial(object.end_block)\n : undefined;\n message.commit =\n object.commit !== undefined && object.commit !== null\n ? ResponseCommit.fromPartial(object.commit)\n : undefined;\n message.list_snapshots =\n object.list_snapshots !== undefined && object.list_snapshots !== null\n ? ResponseListSnapshots.fromPartial(object.list_snapshots)\n : undefined;\n message.offer_snapshot =\n object.offer_snapshot !== undefined && object.offer_snapshot !== null\n ? ResponseOfferSnapshot.fromPartial(object.offer_snapshot)\n : undefined;\n message.load_snapshot_chunk =\n object.load_snapshot_chunk !== undefined &&\n object.load_snapshot_chunk !== null\n ? ResponseLoadSnapshotChunk.fromPartial(object.load_snapshot_chunk)\n : undefined;\n message.apply_snapshot_chunk =\n object.apply_snapshot_chunk !== undefined &&\n object.apply_snapshot_chunk !== null\n ? ResponseApplySnapshotChunk.fromPartial(object.apply_snapshot_chunk)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseResponseException(): ResponseException {\n return { error: \"\" };\n}\n\nexport const ResponseException = {\n encode(\n message: ResponseException,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.error !== \"\") {\n writer.uint32(10).string(message.error);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseException {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseException();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.error = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseException {\n return {\n error: isSet(object.error) ? String(object.error) : \"\",\n };\n },\n\n toJSON(message: ResponseException): unknown {\n const obj: any = {};\n message.error !== undefined && (obj.error = message.error);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseException {\n const message = createBaseResponseException();\n message.error = object.error ?? \"\";\n return message;\n },\n};\n\nfunction createBaseResponseEcho(): ResponseEcho {\n return { message: \"\" };\n}\n\nexport const ResponseEcho = {\n encode(\n message: ResponseEcho,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.message !== \"\") {\n writer.uint32(10).string(message.message);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseEcho {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseEcho();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.message = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseEcho {\n return {\n message: isSet(object.message) ? String(object.message) : \"\",\n };\n },\n\n toJSON(message: ResponseEcho): unknown {\n const obj: any = {};\n message.message !== undefined && (obj.message = message.message);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseEcho {\n const message = createBaseResponseEcho();\n message.message = object.message ?? \"\";\n return message;\n },\n};\n\nfunction createBaseResponseFlush(): ResponseFlush {\n return {};\n}\n\nexport const ResponseFlush = {\n encode(\n _: ResponseFlush,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseFlush {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseFlush();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(_: any): ResponseFlush {\n return {};\n },\n\n toJSON(_: ResponseFlush): unknown {\n const obj: any = {};\n return obj;\n },\n\n fromPartial, I>>(\n _: I,\n ): ResponseFlush {\n const message = createBaseResponseFlush();\n return message;\n },\n};\n\nfunction createBaseResponseInfo(): ResponseInfo {\n return {\n data: \"\",\n version: \"\",\n app_version: \"0\",\n last_block_height: \"0\",\n last_block_app_hash: new Uint8Array(),\n };\n}\n\nexport const ResponseInfo = {\n encode(\n message: ResponseInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.data !== \"\") {\n writer.uint32(10).string(message.data);\n }\n if (message.version !== \"\") {\n writer.uint32(18).string(message.version);\n }\n if (message.app_version !== \"0\") {\n writer.uint32(24).uint64(message.app_version);\n }\n if (message.last_block_height !== \"0\") {\n writer.uint32(32).int64(message.last_block_height);\n }\n if (message.last_block_app_hash.length !== 0) {\n writer.uint32(42).bytes(message.last_block_app_hash);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.data = reader.string();\n break;\n case 2:\n message.version = reader.string();\n break;\n case 3:\n message.app_version = longToString(reader.uint64() as Long);\n break;\n case 4:\n message.last_block_height = longToString(reader.int64() as Long);\n break;\n case 5:\n message.last_block_app_hash = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseInfo {\n return {\n data: isSet(object.data) ? String(object.data) : \"\",\n version: isSet(object.version) ? String(object.version) : \"\",\n app_version: isSet(object.app_version) ? String(object.app_version) : \"0\",\n last_block_height: isSet(object.last_block_height)\n ? String(object.last_block_height)\n : \"0\",\n last_block_app_hash: isSet(object.last_block_app_hash)\n ? bytesFromBase64(object.last_block_app_hash)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: ResponseInfo): unknown {\n const obj: any = {};\n message.data !== undefined && (obj.data = message.data);\n message.version !== undefined && (obj.version = message.version);\n message.app_version !== undefined &&\n (obj.app_version = message.app_version);\n message.last_block_height !== undefined &&\n (obj.last_block_height = message.last_block_height);\n message.last_block_app_hash !== undefined &&\n (obj.last_block_app_hash = base64FromBytes(\n message.last_block_app_hash !== undefined\n ? message.last_block_app_hash\n : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseInfo {\n const message = createBaseResponseInfo();\n message.data = object.data ?? \"\";\n message.version = object.version ?? \"\";\n message.app_version = object.app_version ?? \"0\";\n message.last_block_height = object.last_block_height ?? \"0\";\n message.last_block_app_hash =\n object.last_block_app_hash ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseResponseSetOption(): ResponseSetOption {\n return { code: 0, log: \"\", info: \"\" };\n}\n\nexport const ResponseSetOption = {\n encode(\n message: ResponseSetOption,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.code !== 0) {\n writer.uint32(8).uint32(message.code);\n }\n if (message.log !== \"\") {\n writer.uint32(26).string(message.log);\n }\n if (message.info !== \"\") {\n writer.uint32(34).string(message.info);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseSetOption {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseSetOption();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.code = reader.uint32();\n break;\n case 3:\n message.log = reader.string();\n break;\n case 4:\n message.info = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseSetOption {\n return {\n code: isSet(object.code) ? Number(object.code) : 0,\n log: isSet(object.log) ? String(object.log) : \"\",\n info: isSet(object.info) ? String(object.info) : \"\",\n };\n },\n\n toJSON(message: ResponseSetOption): unknown {\n const obj: any = {};\n message.code !== undefined && (obj.code = Math.round(message.code));\n message.log !== undefined && (obj.log = message.log);\n message.info !== undefined && (obj.info = message.info);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseSetOption {\n const message = createBaseResponseSetOption();\n message.code = object.code ?? 0;\n message.log = object.log ?? \"\";\n message.info = object.info ?? \"\";\n return message;\n },\n};\n\nfunction createBaseResponseInitChain(): ResponseInitChain {\n return {\n consensus_params: undefined,\n validators: [],\n app_hash: new Uint8Array(),\n };\n}\n\nexport const ResponseInitChain = {\n encode(\n message: ResponseInitChain,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.consensus_params !== undefined) {\n ConsensusParams.encode(\n message.consensus_params,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n for (const v of message.validators) {\n ValidatorUpdate.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n if (message.app_hash.length !== 0) {\n writer.uint32(26).bytes(message.app_hash);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseInitChain {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseInitChain();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.consensus_params = ConsensusParams.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 2:\n message.validators.push(\n ValidatorUpdate.decode(reader, reader.uint32()),\n );\n break;\n case 3:\n message.app_hash = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseInitChain {\n return {\n consensus_params: isSet(object.consensus_params)\n ? ConsensusParams.fromJSON(object.consensus_params)\n : undefined,\n validators: Array.isArray(object?.validators)\n ? object.validators.map((e: any) => ValidatorUpdate.fromJSON(e))\n : [],\n app_hash: isSet(object.app_hash)\n ? bytesFromBase64(object.app_hash)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: ResponseInitChain): unknown {\n const obj: any = {};\n message.consensus_params !== undefined &&\n (obj.consensus_params = message.consensus_params\n ? ConsensusParams.toJSON(message.consensus_params)\n : undefined);\n if (message.validators) {\n obj.validators = message.validators.map((e) =>\n e ? ValidatorUpdate.toJSON(e) : undefined,\n );\n } else {\n obj.validators = [];\n }\n message.app_hash !== undefined &&\n (obj.app_hash = base64FromBytes(\n message.app_hash !== undefined ? message.app_hash : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseInitChain {\n const message = createBaseResponseInitChain();\n message.consensus_params =\n object.consensus_params !== undefined && object.consensus_params !== null\n ? ConsensusParams.fromPartial(object.consensus_params)\n : undefined;\n message.validators =\n object.validators?.map((e) => ValidatorUpdate.fromPartial(e)) || [];\n message.app_hash = object.app_hash ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseResponseQuery(): ResponseQuery {\n return {\n code: 0,\n log: \"\",\n info: \"\",\n index: \"0\",\n key: new Uint8Array(),\n value: new Uint8Array(),\n proof_ops: undefined,\n height: \"0\",\n codespace: \"\",\n };\n}\n\nexport const ResponseQuery = {\n encode(\n message: ResponseQuery,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.code !== 0) {\n writer.uint32(8).uint32(message.code);\n }\n if (message.log !== \"\") {\n writer.uint32(26).string(message.log);\n }\n if (message.info !== \"\") {\n writer.uint32(34).string(message.info);\n }\n if (message.index !== \"0\") {\n writer.uint32(40).int64(message.index);\n }\n if (message.key.length !== 0) {\n writer.uint32(50).bytes(message.key);\n }\n if (message.value.length !== 0) {\n writer.uint32(58).bytes(message.value);\n }\n if (message.proof_ops !== undefined) {\n ProofOps.encode(message.proof_ops, writer.uint32(66).fork()).ldelim();\n }\n if (message.height !== \"0\") {\n writer.uint32(72).int64(message.height);\n }\n if (message.codespace !== \"\") {\n writer.uint32(82).string(message.codespace);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseQuery {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseQuery();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.code = reader.uint32();\n break;\n case 3:\n message.log = reader.string();\n break;\n case 4:\n message.info = reader.string();\n break;\n case 5:\n message.index = longToString(reader.int64() as Long);\n break;\n case 6:\n message.key = reader.bytes();\n break;\n case 7:\n message.value = reader.bytes();\n break;\n case 8:\n message.proof_ops = ProofOps.decode(reader, reader.uint32());\n break;\n case 9:\n message.height = longToString(reader.int64() as Long);\n break;\n case 10:\n message.codespace = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseQuery {\n return {\n code: isSet(object.code) ? Number(object.code) : 0,\n log: isSet(object.log) ? String(object.log) : \"\",\n info: isSet(object.info) ? String(object.info) : \"\",\n index: isSet(object.index) ? String(object.index) : \"0\",\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n value: isSet(object.value)\n ? bytesFromBase64(object.value)\n : new Uint8Array(),\n proof_ops: isSet(object.proof_ops)\n ? ProofOps.fromJSON(object.proof_ops)\n : undefined,\n height: isSet(object.height) ? String(object.height) : \"0\",\n codespace: isSet(object.codespace) ? String(object.codespace) : \"\",\n };\n },\n\n toJSON(message: ResponseQuery): unknown {\n const obj: any = {};\n message.code !== undefined && (obj.code = Math.round(message.code));\n message.log !== undefined && (obj.log = message.log);\n message.info !== undefined && (obj.info = message.info);\n message.index !== undefined && (obj.index = message.index);\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n message.value !== undefined &&\n (obj.value = base64FromBytes(\n message.value !== undefined ? message.value : new Uint8Array(),\n ));\n message.proof_ops !== undefined &&\n (obj.proof_ops = message.proof_ops\n ? ProofOps.toJSON(message.proof_ops)\n : undefined);\n message.height !== undefined && (obj.height = message.height);\n message.codespace !== undefined && (obj.codespace = message.codespace);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseQuery {\n const message = createBaseResponseQuery();\n message.code = object.code ?? 0;\n message.log = object.log ?? \"\";\n message.info = object.info ?? \"\";\n message.index = object.index ?? \"0\";\n message.key = object.key ?? new Uint8Array();\n message.value = object.value ?? new Uint8Array();\n message.proof_ops =\n object.proof_ops !== undefined && object.proof_ops !== null\n ? ProofOps.fromPartial(object.proof_ops)\n : undefined;\n message.height = object.height ?? \"0\";\n message.codespace = object.codespace ?? \"\";\n return message;\n },\n};\n\nfunction createBaseResponseBeginBlock(): ResponseBeginBlock {\n return { events: [] };\n}\n\nexport const ResponseBeginBlock = {\n encode(\n message: ResponseBeginBlock,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.events) {\n Event.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseBeginBlock {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseBeginBlock();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.events.push(Event.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseBeginBlock {\n return {\n events: Array.isArray(object?.events)\n ? object.events.map((e: any) => Event.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ResponseBeginBlock): unknown {\n const obj: any = {};\n if (message.events) {\n obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined));\n } else {\n obj.events = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseBeginBlock {\n const message = createBaseResponseBeginBlock();\n message.events = object.events?.map((e) => Event.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseResponseCheckTx(): ResponseCheckTx {\n return {\n code: 0,\n data: new Uint8Array(),\n log: \"\",\n info: \"\",\n gas_wanted: \"0\",\n gas_used: \"0\",\n events: [],\n codespace: \"\",\n sender: \"\",\n priority: \"0\",\n mempool_error: \"\",\n };\n}\n\nexport const ResponseCheckTx = {\n encode(\n message: ResponseCheckTx,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.code !== 0) {\n writer.uint32(8).uint32(message.code);\n }\n if (message.data.length !== 0) {\n writer.uint32(18).bytes(message.data);\n }\n if (message.log !== \"\") {\n writer.uint32(26).string(message.log);\n }\n if (message.info !== \"\") {\n writer.uint32(34).string(message.info);\n }\n if (message.gas_wanted !== \"0\") {\n writer.uint32(40).int64(message.gas_wanted);\n }\n if (message.gas_used !== \"0\") {\n writer.uint32(48).int64(message.gas_used);\n }\n for (const v of message.events) {\n Event.encode(v!, writer.uint32(58).fork()).ldelim();\n }\n if (message.codespace !== \"\") {\n writer.uint32(66).string(message.codespace);\n }\n if (message.sender !== \"\") {\n writer.uint32(74).string(message.sender);\n }\n if (message.priority !== \"0\") {\n writer.uint32(80).int64(message.priority);\n }\n if (message.mempool_error !== \"\") {\n writer.uint32(90).string(message.mempool_error);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseCheckTx {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseCheckTx();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.code = reader.uint32();\n break;\n case 2:\n message.data = reader.bytes();\n break;\n case 3:\n message.log = reader.string();\n break;\n case 4:\n message.info = reader.string();\n break;\n case 5:\n message.gas_wanted = longToString(reader.int64() as Long);\n break;\n case 6:\n message.gas_used = longToString(reader.int64() as Long);\n break;\n case 7:\n message.events.push(Event.decode(reader, reader.uint32()));\n break;\n case 8:\n message.codespace = reader.string();\n break;\n case 9:\n message.sender = reader.string();\n break;\n case 10:\n message.priority = longToString(reader.int64() as Long);\n break;\n case 11:\n message.mempool_error = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseCheckTx {\n return {\n code: isSet(object.code) ? Number(object.code) : 0,\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n log: isSet(object.log) ? String(object.log) : \"\",\n info: isSet(object.info) ? String(object.info) : \"\",\n gas_wanted: isSet(object.gas_wanted) ? String(object.gas_wanted) : \"0\",\n gas_used: isSet(object.gas_used) ? String(object.gas_used) : \"0\",\n events: Array.isArray(object?.events)\n ? object.events.map((e: any) => Event.fromJSON(e))\n : [],\n codespace: isSet(object.codespace) ? String(object.codespace) : \"\",\n sender: isSet(object.sender) ? String(object.sender) : \"\",\n priority: isSet(object.priority) ? String(object.priority) : \"0\",\n mempool_error: isSet(object.mempool_error)\n ? String(object.mempool_error)\n : \"\",\n };\n },\n\n toJSON(message: ResponseCheckTx): unknown {\n const obj: any = {};\n message.code !== undefined && (obj.code = Math.round(message.code));\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n message.log !== undefined && (obj.log = message.log);\n message.info !== undefined && (obj.info = message.info);\n message.gas_wanted !== undefined && (obj.gas_wanted = message.gas_wanted);\n message.gas_used !== undefined && (obj.gas_used = message.gas_used);\n if (message.events) {\n obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined));\n } else {\n obj.events = [];\n }\n message.codespace !== undefined && (obj.codespace = message.codespace);\n message.sender !== undefined && (obj.sender = message.sender);\n message.priority !== undefined && (obj.priority = message.priority);\n message.mempool_error !== undefined &&\n (obj.mempool_error = message.mempool_error);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseCheckTx {\n const message = createBaseResponseCheckTx();\n message.code = object.code ?? 0;\n message.data = object.data ?? new Uint8Array();\n message.log = object.log ?? \"\";\n message.info = object.info ?? \"\";\n message.gas_wanted = object.gas_wanted ?? \"0\";\n message.gas_used = object.gas_used ?? \"0\";\n message.events = object.events?.map((e) => Event.fromPartial(e)) || [];\n message.codespace = object.codespace ?? \"\";\n message.sender = object.sender ?? \"\";\n message.priority = object.priority ?? \"0\";\n message.mempool_error = object.mempool_error ?? \"\";\n return message;\n },\n};\n\nfunction createBaseResponseDeliverTx(): ResponseDeliverTx {\n return {\n code: 0,\n data: new Uint8Array(),\n log: \"\",\n info: \"\",\n gas_wanted: \"0\",\n gas_used: \"0\",\n events: [],\n codespace: \"\",\n };\n}\n\nexport const ResponseDeliverTx = {\n encode(\n message: ResponseDeliverTx,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.code !== 0) {\n writer.uint32(8).uint32(message.code);\n }\n if (message.data.length !== 0) {\n writer.uint32(18).bytes(message.data);\n }\n if (message.log !== \"\") {\n writer.uint32(26).string(message.log);\n }\n if (message.info !== \"\") {\n writer.uint32(34).string(message.info);\n }\n if (message.gas_wanted !== \"0\") {\n writer.uint32(40).int64(message.gas_wanted);\n }\n if (message.gas_used !== \"0\") {\n writer.uint32(48).int64(message.gas_used);\n }\n for (const v of message.events) {\n Event.encode(v!, writer.uint32(58).fork()).ldelim();\n }\n if (message.codespace !== \"\") {\n writer.uint32(66).string(message.codespace);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseDeliverTx {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseDeliverTx();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.code = reader.uint32();\n break;\n case 2:\n message.data = reader.bytes();\n break;\n case 3:\n message.log = reader.string();\n break;\n case 4:\n message.info = reader.string();\n break;\n case 5:\n message.gas_wanted = longToString(reader.int64() as Long);\n break;\n case 6:\n message.gas_used = longToString(reader.int64() as Long);\n break;\n case 7:\n message.events.push(Event.decode(reader, reader.uint32()));\n break;\n case 8:\n message.codespace = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseDeliverTx {\n return {\n code: isSet(object.code) ? Number(object.code) : 0,\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n log: isSet(object.log) ? String(object.log) : \"\",\n info: isSet(object.info) ? String(object.info) : \"\",\n gas_wanted: isSet(object.gas_wanted) ? String(object.gas_wanted) : \"0\",\n gas_used: isSet(object.gas_used) ? String(object.gas_used) : \"0\",\n events: Array.isArray(object?.events)\n ? object.events.map((e: any) => Event.fromJSON(e))\n : [],\n codespace: isSet(object.codespace) ? String(object.codespace) : \"\",\n };\n },\n\n toJSON(message: ResponseDeliverTx): unknown {\n const obj: any = {};\n message.code !== undefined && (obj.code = Math.round(message.code));\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n message.log !== undefined && (obj.log = message.log);\n message.info !== undefined && (obj.info = message.info);\n message.gas_wanted !== undefined && (obj.gas_wanted = message.gas_wanted);\n message.gas_used !== undefined && (obj.gas_used = message.gas_used);\n if (message.events) {\n obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined));\n } else {\n obj.events = [];\n }\n message.codespace !== undefined && (obj.codespace = message.codespace);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseDeliverTx {\n const message = createBaseResponseDeliverTx();\n message.code = object.code ?? 0;\n message.data = object.data ?? new Uint8Array();\n message.log = object.log ?? \"\";\n message.info = object.info ?? \"\";\n message.gas_wanted = object.gas_wanted ?? \"0\";\n message.gas_used = object.gas_used ?? \"0\";\n message.events = object.events?.map((e) => Event.fromPartial(e)) || [];\n message.codespace = object.codespace ?? \"\";\n return message;\n },\n};\n\nfunction createBaseResponseEndBlock(): ResponseEndBlock {\n return {\n validator_updates: [],\n consensus_param_updates: undefined,\n events: [],\n };\n}\n\nexport const ResponseEndBlock = {\n encode(\n message: ResponseEndBlock,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.validator_updates) {\n ValidatorUpdate.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.consensus_param_updates !== undefined) {\n ConsensusParams.encode(\n message.consensus_param_updates,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n for (const v of message.events) {\n Event.encode(v!, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseEndBlock {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseEndBlock();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.validator_updates.push(\n ValidatorUpdate.decode(reader, reader.uint32()),\n );\n break;\n case 2:\n message.consensus_param_updates = ConsensusParams.decode(\n reader,\n reader.uint32(),\n );\n break;\n case 3:\n message.events.push(Event.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseEndBlock {\n return {\n validator_updates: Array.isArray(object?.validator_updates)\n ? object.validator_updates.map((e: any) => ValidatorUpdate.fromJSON(e))\n : [],\n consensus_param_updates: isSet(object.consensus_param_updates)\n ? ConsensusParams.fromJSON(object.consensus_param_updates)\n : undefined,\n events: Array.isArray(object?.events)\n ? object.events.map((e: any) => Event.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ResponseEndBlock): unknown {\n const obj: any = {};\n if (message.validator_updates) {\n obj.validator_updates = message.validator_updates.map((e) =>\n e ? ValidatorUpdate.toJSON(e) : undefined,\n );\n } else {\n obj.validator_updates = [];\n }\n message.consensus_param_updates !== undefined &&\n (obj.consensus_param_updates = message.consensus_param_updates\n ? ConsensusParams.toJSON(message.consensus_param_updates)\n : undefined);\n if (message.events) {\n obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined));\n } else {\n obj.events = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseEndBlock {\n const message = createBaseResponseEndBlock();\n message.validator_updates =\n object.validator_updates?.map((e) => ValidatorUpdate.fromPartial(e)) ||\n [];\n message.consensus_param_updates =\n object.consensus_param_updates !== undefined &&\n object.consensus_param_updates !== null\n ? ConsensusParams.fromPartial(object.consensus_param_updates)\n : undefined;\n message.events = object.events?.map((e) => Event.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseResponseCommit(): ResponseCommit {\n return { data: new Uint8Array(), retain_height: \"0\" };\n}\n\nexport const ResponseCommit = {\n encode(\n message: ResponseCommit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.data.length !== 0) {\n writer.uint32(18).bytes(message.data);\n }\n if (message.retain_height !== \"0\") {\n writer.uint32(24).int64(message.retain_height);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ResponseCommit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseCommit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 2:\n message.data = reader.bytes();\n break;\n case 3:\n message.retain_height = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseCommit {\n return {\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n retain_height: isSet(object.retain_height)\n ? String(object.retain_height)\n : \"0\",\n };\n },\n\n toJSON(message: ResponseCommit): unknown {\n const obj: any = {};\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n message.retain_height !== undefined &&\n (obj.retain_height = message.retain_height);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseCommit {\n const message = createBaseResponseCommit();\n message.data = object.data ?? new Uint8Array();\n message.retain_height = object.retain_height ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseResponseListSnapshots(): ResponseListSnapshots {\n return { snapshots: [] };\n}\n\nexport const ResponseListSnapshots = {\n encode(\n message: ResponseListSnapshots,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.snapshots) {\n Snapshot.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ResponseListSnapshots {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseListSnapshots();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.snapshots.push(Snapshot.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseListSnapshots {\n return {\n snapshots: Array.isArray(object?.snapshots)\n ? object.snapshots.map((e: any) => Snapshot.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ResponseListSnapshots): unknown {\n const obj: any = {};\n if (message.snapshots) {\n obj.snapshots = message.snapshots.map((e) =>\n e ? Snapshot.toJSON(e) : undefined,\n );\n } else {\n obj.snapshots = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseListSnapshots {\n const message = createBaseResponseListSnapshots();\n message.snapshots =\n object.snapshots?.map((e) => Snapshot.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseResponseOfferSnapshot(): ResponseOfferSnapshot {\n return { result: 0 };\n}\n\nexport const ResponseOfferSnapshot = {\n encode(\n message: ResponseOfferSnapshot,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.result !== 0) {\n writer.uint32(8).int32(message.result);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ResponseOfferSnapshot {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseOfferSnapshot();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.result = reader.int32() as any;\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseOfferSnapshot {\n return {\n result: isSet(object.result)\n ? responseOfferSnapshot_ResultFromJSON(object.result)\n : 0,\n };\n },\n\n toJSON(message: ResponseOfferSnapshot): unknown {\n const obj: any = {};\n message.result !== undefined &&\n (obj.result = responseOfferSnapshot_ResultToJSON(message.result));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseOfferSnapshot {\n const message = createBaseResponseOfferSnapshot();\n message.result = object.result ?? 0;\n return message;\n },\n};\n\nfunction createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk {\n return { chunk: new Uint8Array() };\n}\n\nexport const ResponseLoadSnapshotChunk = {\n encode(\n message: ResponseLoadSnapshotChunk,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.chunk.length !== 0) {\n writer.uint32(10).bytes(message.chunk);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ResponseLoadSnapshotChunk {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseLoadSnapshotChunk();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.chunk = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseLoadSnapshotChunk {\n return {\n chunk: isSet(object.chunk)\n ? bytesFromBase64(object.chunk)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: ResponseLoadSnapshotChunk): unknown {\n const obj: any = {};\n message.chunk !== undefined &&\n (obj.chunk = base64FromBytes(\n message.chunk !== undefined ? message.chunk : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseLoadSnapshotChunk {\n const message = createBaseResponseLoadSnapshotChunk();\n message.chunk = object.chunk ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk {\n return { result: 0, refetch_chunks: [], reject_senders: [] };\n}\n\nexport const ResponseApplySnapshotChunk = {\n encode(\n message: ResponseApplySnapshotChunk,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.result !== 0) {\n writer.uint32(8).int32(message.result);\n }\n writer.uint32(18).fork();\n for (const v of message.refetch_chunks) {\n writer.uint32(v);\n }\n writer.ldelim();\n for (const v of message.reject_senders) {\n writer.uint32(26).string(v!);\n }\n return writer;\n },\n\n decode(\n input: _m0.Reader | Uint8Array,\n length?: number,\n ): ResponseApplySnapshotChunk {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseResponseApplySnapshotChunk();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.result = reader.int32() as any;\n break;\n case 2:\n if ((tag & 7) === 2) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.refetch_chunks.push(reader.uint32());\n }\n } else {\n message.refetch_chunks.push(reader.uint32());\n }\n break;\n case 3:\n message.reject_senders.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ResponseApplySnapshotChunk {\n return {\n result: isSet(object.result)\n ? responseApplySnapshotChunk_ResultFromJSON(object.result)\n : 0,\n refetch_chunks: Array.isArray(object?.refetch_chunks)\n ? object.refetch_chunks.map((e: any) => Number(e))\n : [],\n reject_senders: Array.isArray(object?.reject_senders)\n ? object.reject_senders.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: ResponseApplySnapshotChunk): unknown {\n const obj: any = {};\n message.result !== undefined &&\n (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result));\n if (message.refetch_chunks) {\n obj.refetch_chunks = message.refetch_chunks.map((e) => Math.round(e));\n } else {\n obj.refetch_chunks = [];\n }\n if (message.reject_senders) {\n obj.reject_senders = message.reject_senders.map((e) => e);\n } else {\n obj.reject_senders = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ResponseApplySnapshotChunk {\n const message = createBaseResponseApplySnapshotChunk();\n message.result = object.result ?? 0;\n message.refetch_chunks = object.refetch_chunks?.map((e) => e) || [];\n message.reject_senders = object.reject_senders?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseConsensusParams(): ConsensusParams {\n return {\n block: undefined,\n evidence: undefined,\n validator: undefined,\n version: undefined,\n };\n}\n\nexport const ConsensusParams = {\n encode(\n message: ConsensusParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.block !== undefined) {\n BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim();\n }\n if (message.evidence !== undefined) {\n EvidenceParams.encode(\n message.evidence,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.validator !== undefined) {\n ValidatorParams.encode(\n message.validator,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n if (message.version !== undefined) {\n VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ConsensusParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseConsensusParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.block = BlockParams.decode(reader, reader.uint32());\n break;\n case 2:\n message.evidence = EvidenceParams.decode(reader, reader.uint32());\n break;\n case 3:\n message.validator = ValidatorParams.decode(reader, reader.uint32());\n break;\n case 4:\n message.version = VersionParams.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ConsensusParams {\n return {\n block: isSet(object.block)\n ? BlockParams.fromJSON(object.block)\n : undefined,\n evidence: isSet(object.evidence)\n ? EvidenceParams.fromJSON(object.evidence)\n : undefined,\n validator: isSet(object.validator)\n ? ValidatorParams.fromJSON(object.validator)\n : undefined,\n version: isSet(object.version)\n ? VersionParams.fromJSON(object.version)\n : undefined,\n };\n },\n\n toJSON(message: ConsensusParams): unknown {\n const obj: any = {};\n message.block !== undefined &&\n (obj.block = message.block\n ? BlockParams.toJSON(message.block)\n : undefined);\n message.evidence !== undefined &&\n (obj.evidence = message.evidence\n ? EvidenceParams.toJSON(message.evidence)\n : undefined);\n message.validator !== undefined &&\n (obj.validator = message.validator\n ? ValidatorParams.toJSON(message.validator)\n : undefined);\n message.version !== undefined &&\n (obj.version = message.version\n ? VersionParams.toJSON(message.version)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ConsensusParams {\n const message = createBaseConsensusParams();\n message.block =\n object.block !== undefined && object.block !== null\n ? BlockParams.fromPartial(object.block)\n : undefined;\n message.evidence =\n object.evidence !== undefined && object.evidence !== null\n ? EvidenceParams.fromPartial(object.evidence)\n : undefined;\n message.validator =\n object.validator !== undefined && object.validator !== null\n ? ValidatorParams.fromPartial(object.validator)\n : undefined;\n message.version =\n object.version !== undefined && object.version !== null\n ? VersionParams.fromPartial(object.version)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseBlockParams(): BlockParams {\n return { max_bytes: \"0\", max_gas: \"0\" };\n}\n\nexport const BlockParams = {\n encode(\n message: BlockParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.max_bytes !== \"0\") {\n writer.uint32(8).int64(message.max_bytes);\n }\n if (message.max_gas !== \"0\") {\n writer.uint32(16).int64(message.max_gas);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): BlockParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBlockParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.max_bytes = longToString(reader.int64() as Long);\n break;\n case 2:\n message.max_gas = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): BlockParams {\n return {\n max_bytes: isSet(object.max_bytes) ? String(object.max_bytes) : \"0\",\n max_gas: isSet(object.max_gas) ? String(object.max_gas) : \"0\",\n };\n },\n\n toJSON(message: BlockParams): unknown {\n const obj: any = {};\n message.max_bytes !== undefined && (obj.max_bytes = message.max_bytes);\n message.max_gas !== undefined && (obj.max_gas = message.max_gas);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): BlockParams {\n const message = createBaseBlockParams();\n message.max_bytes = object.max_bytes ?? \"0\";\n message.max_gas = object.max_gas ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseLastCommitInfo(): LastCommitInfo {\n return { round: 0, votes: [] };\n}\n\nexport const LastCommitInfo = {\n encode(\n message: LastCommitInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.round !== 0) {\n writer.uint32(8).int32(message.round);\n }\n for (const v of message.votes) {\n VoteInfo.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): LastCommitInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseLastCommitInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.round = reader.int32();\n break;\n case 2:\n message.votes.push(VoteInfo.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): LastCommitInfo {\n return {\n round: isSet(object.round) ? Number(object.round) : 0,\n votes: Array.isArray(object?.votes)\n ? object.votes.map((e: any) => VoteInfo.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: LastCommitInfo): unknown {\n const obj: any = {};\n message.round !== undefined && (obj.round = Math.round(message.round));\n if (message.votes) {\n obj.votes = message.votes.map((e) =>\n e ? VoteInfo.toJSON(e) : undefined,\n );\n } else {\n obj.votes = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): LastCommitInfo {\n const message = createBaseLastCommitInfo();\n message.round = object.round ?? 0;\n message.votes = object.votes?.map((e) => VoteInfo.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseEvent(): Event {\n return { type: \"\", attributes: [] };\n}\n\nexport const Event = {\n encode(message: Event, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.type !== \"\") {\n writer.uint32(10).string(message.type);\n }\n for (const v of message.attributes) {\n EventAttribute.encode(v!, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Event {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseEvent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.type = reader.string();\n break;\n case 2:\n message.attributes.push(\n EventAttribute.decode(reader, reader.uint32()),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Event {\n return {\n type: isSet(object.type) ? String(object.type) : \"\",\n attributes: Array.isArray(object?.attributes)\n ? object.attributes.map((e: any) => EventAttribute.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Event): unknown {\n const obj: any = {};\n message.type !== undefined && (obj.type = message.type);\n if (message.attributes) {\n obj.attributes = message.attributes.map((e) =>\n e ? EventAttribute.toJSON(e) : undefined,\n );\n } else {\n obj.attributes = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Event {\n const message = createBaseEvent();\n message.type = object.type ?? \"\";\n message.attributes =\n object.attributes?.map((e) => EventAttribute.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseEventAttribute(): EventAttribute {\n return { key: new Uint8Array(), value: new Uint8Array(), index: false };\n}\n\nexport const EventAttribute = {\n encode(\n message: EventAttribute,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n if (message.value.length !== 0) {\n writer.uint32(18).bytes(message.value);\n }\n if (message.index === true) {\n writer.uint32(24).bool(message.index);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): EventAttribute {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseEventAttribute();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n case 2:\n message.value = reader.bytes();\n break;\n case 3:\n message.index = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): EventAttribute {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n value: isSet(object.value)\n ? bytesFromBase64(object.value)\n : new Uint8Array(),\n index: isSet(object.index) ? Boolean(object.index) : false,\n };\n },\n\n toJSON(message: EventAttribute): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n message.value !== undefined &&\n (obj.value = base64FromBytes(\n message.value !== undefined ? message.value : new Uint8Array(),\n ));\n message.index !== undefined && (obj.index = message.index);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): EventAttribute {\n const message = createBaseEventAttribute();\n message.key = object.key ?? new Uint8Array();\n message.value = object.value ?? new Uint8Array();\n message.index = object.index ?? false;\n return message;\n },\n};\n\nfunction createBaseTxResult(): TxResult {\n return { height: \"0\", index: 0, tx: new Uint8Array(), result: undefined };\n}\n\nexport const TxResult = {\n encode(\n message: TxResult,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.height !== \"0\") {\n writer.uint32(8).int64(message.height);\n }\n if (message.index !== 0) {\n writer.uint32(16).uint32(message.index);\n }\n if (message.tx.length !== 0) {\n writer.uint32(26).bytes(message.tx);\n }\n if (message.result !== undefined) {\n ResponseDeliverTx.encode(\n message.result,\n writer.uint32(34).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TxResult {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTxResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.height = longToString(reader.int64() as Long);\n break;\n case 2:\n message.index = reader.uint32();\n break;\n case 3:\n message.tx = reader.bytes();\n break;\n case 4:\n message.result = ResponseDeliverTx.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TxResult {\n return {\n height: isSet(object.height) ? String(object.height) : \"0\",\n index: isSet(object.index) ? Number(object.index) : 0,\n tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),\n result: isSet(object.result)\n ? ResponseDeliverTx.fromJSON(object.result)\n : undefined,\n };\n },\n\n toJSON(message: TxResult): unknown {\n const obj: any = {};\n message.height !== undefined && (obj.height = message.height);\n message.index !== undefined && (obj.index = Math.round(message.index));\n message.tx !== undefined &&\n (obj.tx = base64FromBytes(\n message.tx !== undefined ? message.tx : new Uint8Array(),\n ));\n message.result !== undefined &&\n (obj.result = message.result\n ? ResponseDeliverTx.toJSON(message.result)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): TxResult {\n const message = createBaseTxResult();\n message.height = object.height ?? \"0\";\n message.index = object.index ?? 0;\n message.tx = object.tx ?? new Uint8Array();\n message.result =\n object.result !== undefined && object.result !== null\n ? ResponseDeliverTx.fromPartial(object.result)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseValidator(): Validator {\n return { address: new Uint8Array(), power: \"0\" };\n}\n\nexport const Validator = {\n encode(\n message: Validator,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.address.length !== 0) {\n writer.uint32(10).bytes(message.address);\n }\n if (message.power !== \"0\") {\n writer.uint32(24).int64(message.power);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Validator {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidator();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.address = reader.bytes();\n break;\n case 3:\n message.power = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Validator {\n return {\n address: isSet(object.address)\n ? bytesFromBase64(object.address)\n : new Uint8Array(),\n power: isSet(object.power) ? String(object.power) : \"0\",\n };\n },\n\n toJSON(message: Validator): unknown {\n const obj: any = {};\n message.address !== undefined &&\n (obj.address = base64FromBytes(\n message.address !== undefined ? message.address : new Uint8Array(),\n ));\n message.power !== undefined && (obj.power = message.power);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Validator {\n const message = createBaseValidator();\n message.address = object.address ?? new Uint8Array();\n message.power = object.power ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseValidatorUpdate(): ValidatorUpdate {\n return { pub_key: undefined, power: \"0\" };\n}\n\nexport const ValidatorUpdate = {\n encode(\n message: ValidatorUpdate,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.pub_key !== undefined) {\n PublicKey.encode(message.pub_key, writer.uint32(10).fork()).ldelim();\n }\n if (message.power !== \"0\") {\n writer.uint32(16).int64(message.power);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorUpdate {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorUpdate();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.pub_key = PublicKey.decode(reader, reader.uint32());\n break;\n case 2:\n message.power = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorUpdate {\n return {\n pub_key: isSet(object.pub_key)\n ? PublicKey.fromJSON(object.pub_key)\n : undefined,\n power: isSet(object.power) ? String(object.power) : \"0\",\n };\n },\n\n toJSON(message: ValidatorUpdate): unknown {\n const obj: any = {};\n message.pub_key !== undefined &&\n (obj.pub_key = message.pub_key\n ? PublicKey.toJSON(message.pub_key)\n : undefined);\n message.power !== undefined && (obj.power = message.power);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorUpdate {\n const message = createBaseValidatorUpdate();\n message.pub_key =\n object.pub_key !== undefined && object.pub_key !== null\n ? PublicKey.fromPartial(object.pub_key)\n : undefined;\n message.power = object.power ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseVoteInfo(): VoteInfo {\n return { validator: undefined, signed_last_block: false };\n}\n\nexport const VoteInfo = {\n encode(\n message: VoteInfo,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.validator !== undefined) {\n Validator.encode(message.validator, writer.uint32(10).fork()).ldelim();\n }\n if (message.signed_last_block === true) {\n writer.uint32(16).bool(message.signed_last_block);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): VoteInfo {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVoteInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.validator = Validator.decode(reader, reader.uint32());\n break;\n case 2:\n message.signed_last_block = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): VoteInfo {\n return {\n validator: isSet(object.validator)\n ? Validator.fromJSON(object.validator)\n : undefined,\n signed_last_block: isSet(object.signed_last_block)\n ? Boolean(object.signed_last_block)\n : false,\n };\n },\n\n toJSON(message: VoteInfo): unknown {\n const obj: any = {};\n message.validator !== undefined &&\n (obj.validator = message.validator\n ? Validator.toJSON(message.validator)\n : undefined);\n message.signed_last_block !== undefined &&\n (obj.signed_last_block = message.signed_last_block);\n return obj;\n },\n\n fromPartial, I>>(object: I): VoteInfo {\n const message = createBaseVoteInfo();\n message.validator =\n object.validator !== undefined && object.validator !== null\n ? Validator.fromPartial(object.validator)\n : undefined;\n message.signed_last_block = object.signed_last_block ?? false;\n return message;\n },\n};\n\nfunction createBaseEvidence(): Evidence {\n return {\n type: 0,\n validator: undefined,\n height: \"0\",\n time: undefined,\n total_voting_power: \"0\",\n };\n}\n\nexport const Evidence = {\n encode(\n message: Evidence,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.type !== 0) {\n writer.uint32(8).int32(message.type);\n }\n if (message.validator !== undefined) {\n Validator.encode(message.validator, writer.uint32(18).fork()).ldelim();\n }\n if (message.height !== \"0\") {\n writer.uint32(24).int64(message.height);\n }\n if (message.time !== undefined) {\n Timestamp.encode(message.time, writer.uint32(34).fork()).ldelim();\n }\n if (message.total_voting_power !== \"0\") {\n writer.uint32(40).int64(message.total_voting_power);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Evidence {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseEvidence();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.type = reader.int32() as any;\n break;\n case 2:\n message.validator = Validator.decode(reader, reader.uint32());\n break;\n case 3:\n message.height = longToString(reader.int64() as Long);\n break;\n case 4:\n message.time = Timestamp.decode(reader, reader.uint32());\n break;\n case 5:\n message.total_voting_power = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Evidence {\n return {\n type: isSet(object.type) ? evidenceTypeFromJSON(object.type) : 0,\n validator: isSet(object.validator)\n ? Validator.fromJSON(object.validator)\n : undefined,\n height: isSet(object.height) ? String(object.height) : \"0\",\n time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,\n total_voting_power: isSet(object.total_voting_power)\n ? String(object.total_voting_power)\n : \"0\",\n };\n },\n\n toJSON(message: Evidence): unknown {\n const obj: any = {};\n message.type !== undefined && (obj.type = evidenceTypeToJSON(message.type));\n message.validator !== undefined &&\n (obj.validator = message.validator\n ? Validator.toJSON(message.validator)\n : undefined);\n message.height !== undefined && (obj.height = message.height);\n message.time !== undefined &&\n (obj.time = fromTimestamp(message.time).toISOString());\n message.total_voting_power !== undefined &&\n (obj.total_voting_power = message.total_voting_power);\n return obj;\n },\n\n fromPartial, I>>(object: I): Evidence {\n const message = createBaseEvidence();\n message.type = object.type ?? 0;\n message.validator =\n object.validator !== undefined && object.validator !== null\n ? Validator.fromPartial(object.validator)\n : undefined;\n message.height = object.height ?? \"0\";\n message.time =\n object.time !== undefined && object.time !== null\n ? Timestamp.fromPartial(object.time)\n : undefined;\n message.total_voting_power = object.total_voting_power ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseSnapshot(): Snapshot {\n return {\n height: \"0\",\n format: 0,\n chunks: 0,\n hash: new Uint8Array(),\n metadata: new Uint8Array(),\n };\n}\n\nexport const Snapshot = {\n encode(\n message: Snapshot,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.height !== \"0\") {\n writer.uint32(8).uint64(message.height);\n }\n if (message.format !== 0) {\n writer.uint32(16).uint32(message.format);\n }\n if (message.chunks !== 0) {\n writer.uint32(24).uint32(message.chunks);\n }\n if (message.hash.length !== 0) {\n writer.uint32(34).bytes(message.hash);\n }\n if (message.metadata.length !== 0) {\n writer.uint32(42).bytes(message.metadata);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Snapshot {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSnapshot();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.height = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.format = reader.uint32();\n break;\n case 3:\n message.chunks = reader.uint32();\n break;\n case 4:\n message.hash = reader.bytes();\n break;\n case 5:\n message.metadata = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Snapshot {\n return {\n height: isSet(object.height) ? String(object.height) : \"0\",\n format: isSet(object.format) ? Number(object.format) : 0,\n chunks: isSet(object.chunks) ? Number(object.chunks) : 0,\n hash: isSet(object.hash)\n ? bytesFromBase64(object.hash)\n : new Uint8Array(),\n metadata: isSet(object.metadata)\n ? bytesFromBase64(object.metadata)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: Snapshot): unknown {\n const obj: any = {};\n message.height !== undefined && (obj.height = message.height);\n message.format !== undefined && (obj.format = Math.round(message.format));\n message.chunks !== undefined && (obj.chunks = Math.round(message.chunks));\n message.hash !== undefined &&\n (obj.hash = base64FromBytes(\n message.hash !== undefined ? message.hash : new Uint8Array(),\n ));\n message.metadata !== undefined &&\n (obj.metadata = base64FromBytes(\n message.metadata !== undefined ? message.metadata : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): Snapshot {\n const message = createBaseSnapshot();\n message.height = object.height ?? \"0\";\n message.format = object.format ?? 0;\n message.chunks = object.chunks ?? 0;\n message.hash = object.hash ?? new Uint8Array();\n message.metadata = object.metadata ?? new Uint8Array();\n return message;\n },\n};\n\nexport interface ABCIApplication {\n Echo(request: RequestEcho): Promise;\n Flush(request: RequestFlush): Promise;\n Info(request: RequestInfo): Promise;\n SetOption(request: RequestSetOption): Promise;\n DeliverTx(request: RequestDeliverTx): Promise;\n CheckTx(request: RequestCheckTx): Promise;\n Query(request: RequestQuery): Promise;\n Commit(request: RequestCommit): Promise;\n InitChain(request: RequestInitChain): Promise;\n BeginBlock(request: RequestBeginBlock): Promise;\n EndBlock(request: RequestEndBlock): Promise;\n ListSnapshots(request: RequestListSnapshots): Promise;\n OfferSnapshot(request: RequestOfferSnapshot): Promise;\n LoadSnapshotChunk(\n request: RequestLoadSnapshotChunk,\n ): Promise;\n ApplySnapshotChunk(\n request: RequestApplySnapshotChunk,\n ): Promise;\n}\n\nexport class ABCIApplicationClientImpl implements ABCIApplication {\n private readonly rpc: Rpc;\n constructor(rpc: Rpc) {\n this.rpc = rpc;\n this.Echo = this.Echo.bind(this);\n this.Flush = this.Flush.bind(this);\n this.Info = this.Info.bind(this);\n this.SetOption = this.SetOption.bind(this);\n this.DeliverTx = this.DeliverTx.bind(this);\n this.CheckTx = this.CheckTx.bind(this);\n this.Query = this.Query.bind(this);\n this.Commit = this.Commit.bind(this);\n this.InitChain = this.InitChain.bind(this);\n this.BeginBlock = this.BeginBlock.bind(this);\n this.EndBlock = this.EndBlock.bind(this);\n this.ListSnapshots = this.ListSnapshots.bind(this);\n this.OfferSnapshot = this.OfferSnapshot.bind(this);\n this.LoadSnapshotChunk = this.LoadSnapshotChunk.bind(this);\n this.ApplySnapshotChunk = this.ApplySnapshotChunk.bind(this);\n }\n Echo(request: RequestEcho): Promise {\n const data = RequestEcho.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"Echo\",\n data,\n );\n return promise.then((data) => ResponseEcho.decode(new _m0.Reader(data)));\n }\n\n Flush(request: RequestFlush): Promise {\n const data = RequestFlush.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"Flush\",\n data,\n );\n return promise.then((data) => ResponseFlush.decode(new _m0.Reader(data)));\n }\n\n Info(request: RequestInfo): Promise {\n const data = RequestInfo.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"Info\",\n data,\n );\n return promise.then((data) => ResponseInfo.decode(new _m0.Reader(data)));\n }\n\n SetOption(request: RequestSetOption): Promise {\n const data = RequestSetOption.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"SetOption\",\n data,\n );\n return promise.then((data) =>\n ResponseSetOption.decode(new _m0.Reader(data)),\n );\n }\n\n DeliverTx(request: RequestDeliverTx): Promise {\n const data = RequestDeliverTx.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"DeliverTx\",\n data,\n );\n return promise.then((data) =>\n ResponseDeliverTx.decode(new _m0.Reader(data)),\n );\n }\n\n CheckTx(request: RequestCheckTx): Promise {\n const data = RequestCheckTx.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"CheckTx\",\n data,\n );\n return promise.then((data) => ResponseCheckTx.decode(new _m0.Reader(data)));\n }\n\n Query(request: RequestQuery): Promise {\n const data = RequestQuery.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"Query\",\n data,\n );\n return promise.then((data) => ResponseQuery.decode(new _m0.Reader(data)));\n }\n\n Commit(request: RequestCommit): Promise {\n const data = RequestCommit.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"Commit\",\n data,\n );\n return promise.then((data) => ResponseCommit.decode(new _m0.Reader(data)));\n }\n\n InitChain(request: RequestInitChain): Promise {\n const data = RequestInitChain.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"InitChain\",\n data,\n );\n return promise.then((data) =>\n ResponseInitChain.decode(new _m0.Reader(data)),\n );\n }\n\n BeginBlock(request: RequestBeginBlock): Promise {\n const data = RequestBeginBlock.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"BeginBlock\",\n data,\n );\n return promise.then((data) =>\n ResponseBeginBlock.decode(new _m0.Reader(data)),\n );\n }\n\n EndBlock(request: RequestEndBlock): Promise {\n const data = RequestEndBlock.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"EndBlock\",\n data,\n );\n return promise.then((data) =>\n ResponseEndBlock.decode(new _m0.Reader(data)),\n );\n }\n\n ListSnapshots(request: RequestListSnapshots): Promise {\n const data = RequestListSnapshots.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"ListSnapshots\",\n data,\n );\n return promise.then((data) =>\n ResponseListSnapshots.decode(new _m0.Reader(data)),\n );\n }\n\n OfferSnapshot(request: RequestOfferSnapshot): Promise {\n const data = RequestOfferSnapshot.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"OfferSnapshot\",\n data,\n );\n return promise.then((data) =>\n ResponseOfferSnapshot.decode(new _m0.Reader(data)),\n );\n }\n\n LoadSnapshotChunk(\n request: RequestLoadSnapshotChunk,\n ): Promise {\n const data = RequestLoadSnapshotChunk.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"LoadSnapshotChunk\",\n data,\n );\n return promise.then((data) =>\n ResponseLoadSnapshotChunk.decode(new _m0.Reader(data)),\n );\n }\n\n ApplySnapshotChunk(\n request: RequestApplySnapshotChunk,\n ): Promise {\n const data = RequestApplySnapshotChunk.encode(request).finish();\n const promise = this.rpc.request(\n \"tendermint.abci.ABCIApplication\",\n \"ApplySnapshotChunk\",\n data,\n );\n return promise.then((data) =>\n ResponseApplySnapshotChunk.decode(new _m0.Reader(data)),\n );\n }\n}\n\ninterface Rpc {\n request(\n service: string,\n method: string,\n data: Uint8Array,\n ): Promise;\n}\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1_000).toString();\n const nanos = (date.getTime() % 1_000) * 1_000_000;\n return { seconds, nanos };\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1_000;\n millis += t.nanos / 1_000_000;\n return new Date(millis);\n}\n\nfunction fromJsonTimestamp(o: any): Timestamp {\n if (o instanceof Date) {\n return toTimestamp(o);\n } else if (typeof o === \"string\") {\n return toTimestamp(new Date(o));\n } else {\n return Timestamp.fromJSON(o);\n }\n}\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"tendermint.crypto\";\n\n/** PublicKey defines the keys available for use with Tendermint Validators */\nexport interface PublicKey {\n ed25519: Uint8Array | undefined;\n secp256k1: Uint8Array | undefined;\n}\n\nfunction createBasePublicKey(): PublicKey {\n return { ed25519: undefined, secp256k1: undefined };\n}\n\nexport const PublicKey = {\n encode(\n message: PublicKey,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.ed25519 !== undefined) {\n writer.uint32(10).bytes(message.ed25519);\n }\n if (message.secp256k1 !== undefined) {\n writer.uint32(18).bytes(message.secp256k1);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PublicKey {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePublicKey();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.ed25519 = reader.bytes();\n break;\n case 2:\n message.secp256k1 = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PublicKey {\n return {\n ed25519: isSet(object.ed25519)\n ? bytesFromBase64(object.ed25519)\n : undefined,\n secp256k1: isSet(object.secp256k1)\n ? bytesFromBase64(object.secp256k1)\n : undefined,\n };\n },\n\n toJSON(message: PublicKey): unknown {\n const obj: any = {};\n message.ed25519 !== undefined &&\n (obj.ed25519 =\n message.ed25519 !== undefined\n ? base64FromBytes(message.ed25519)\n : undefined);\n message.secp256k1 !== undefined &&\n (obj.secp256k1 =\n message.secp256k1 !== undefined\n ? base64FromBytes(message.secp256k1)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): PublicKey {\n const message = createBasePublicKey();\n message.ed25519 = object.ed25519 ?? undefined;\n message.secp256k1 = object.secp256k1 ?? undefined;\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"tendermint.crypto\";\n\nexport interface Proof {\n total: string;\n index: string;\n leaf_hash: Uint8Array;\n aunts: Uint8Array[];\n}\n\nexport interface ValueOp {\n /** Encoded in ProofOp.Key. */\n key: Uint8Array;\n /** To encode in ProofOp.Data */\n proof?: Proof;\n}\n\nexport interface DominoOp {\n key: string;\n input: string;\n output: string;\n}\n\n/**\n * ProofOp defines an operation used for calculating Merkle root\n * The data could be arbitrary format, providing nessecary data\n * for example neighbouring node hash\n */\nexport interface ProofOp {\n type: string;\n key: Uint8Array;\n data: Uint8Array;\n}\n\n/** ProofOps is Merkle proof defined by the list of ProofOps */\nexport interface ProofOps {\n ops: ProofOp[];\n}\n\nfunction createBaseProof(): Proof {\n return { total: \"0\", index: \"0\", leaf_hash: new Uint8Array(), aunts: [] };\n}\n\nexport const Proof = {\n encode(message: Proof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.total !== \"0\") {\n writer.uint32(8).int64(message.total);\n }\n if (message.index !== \"0\") {\n writer.uint32(16).int64(message.index);\n }\n if (message.leaf_hash.length !== 0) {\n writer.uint32(26).bytes(message.leaf_hash);\n }\n for (const v of message.aunts) {\n writer.uint32(34).bytes(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Proof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.total = longToString(reader.int64() as Long);\n break;\n case 2:\n message.index = longToString(reader.int64() as Long);\n break;\n case 3:\n message.leaf_hash = reader.bytes();\n break;\n case 4:\n message.aunts.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Proof {\n return {\n total: isSet(object.total) ? String(object.total) : \"0\",\n index: isSet(object.index) ? String(object.index) : \"0\",\n leaf_hash: isSet(object.leaf_hash)\n ? bytesFromBase64(object.leaf_hash)\n : new Uint8Array(),\n aunts: Array.isArray(object?.aunts)\n ? object.aunts.map((e: any) => bytesFromBase64(e))\n : [],\n };\n },\n\n toJSON(message: Proof): unknown {\n const obj: any = {};\n message.total !== undefined && (obj.total = message.total);\n message.index !== undefined && (obj.index = message.index);\n message.leaf_hash !== undefined &&\n (obj.leaf_hash = base64FromBytes(\n message.leaf_hash !== undefined ? message.leaf_hash : new Uint8Array(),\n ));\n if (message.aunts) {\n obj.aunts = message.aunts.map((e) =>\n base64FromBytes(e !== undefined ? e : new Uint8Array()),\n );\n } else {\n obj.aunts = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Proof {\n const message = createBaseProof();\n message.total = object.total ?? \"0\";\n message.index = object.index ?? \"0\";\n message.leaf_hash = object.leaf_hash ?? new Uint8Array();\n message.aunts = object.aunts?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseValueOp(): ValueOp {\n return { key: new Uint8Array(), proof: undefined };\n}\n\nexport const ValueOp = {\n encode(\n message: ValueOp,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key.length !== 0) {\n writer.uint32(10).bytes(message.key);\n }\n if (message.proof !== undefined) {\n Proof.encode(message.proof, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ValueOp {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValueOp();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.bytes();\n break;\n case 2:\n message.proof = Proof.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValueOp {\n return {\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : undefined,\n };\n },\n\n toJSON(message: ValueOp): unknown {\n const obj: any = {};\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n message.proof !== undefined &&\n (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): ValueOp {\n const message = createBaseValueOp();\n message.key = object.key ?? new Uint8Array();\n message.proof =\n object.proof !== undefined && object.proof !== null\n ? Proof.fromPartial(object.proof)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseDominoOp(): DominoOp {\n return { key: \"\", input: \"\", output: \"\" };\n}\n\nexport const DominoOp = {\n encode(\n message: DominoOp,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.input !== \"\") {\n writer.uint32(18).string(message.input);\n }\n if (message.output !== \"\") {\n writer.uint32(26).string(message.output);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): DominoOp {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseDominoOp();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.string();\n break;\n case 2:\n message.input = reader.string();\n break;\n case 3:\n message.output = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): DominoOp {\n return {\n key: isSet(object.key) ? String(object.key) : \"\",\n input: isSet(object.input) ? String(object.input) : \"\",\n output: isSet(object.output) ? String(object.output) : \"\",\n };\n },\n\n toJSON(message: DominoOp): unknown {\n const obj: any = {};\n message.key !== undefined && (obj.key = message.key);\n message.input !== undefined && (obj.input = message.input);\n message.output !== undefined && (obj.output = message.output);\n return obj;\n },\n\n fromPartial, I>>(object: I): DominoOp {\n const message = createBaseDominoOp();\n message.key = object.key ?? \"\";\n message.input = object.input ?? \"\";\n message.output = object.output ?? \"\";\n return message;\n },\n};\n\nfunction createBaseProofOp(): ProofOp {\n return { type: \"\", key: new Uint8Array(), data: new Uint8Array() };\n}\n\nexport const ProofOp = {\n encode(\n message: ProofOp,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.type !== \"\") {\n writer.uint32(10).string(message.type);\n }\n if (message.key.length !== 0) {\n writer.uint32(18).bytes(message.key);\n }\n if (message.data.length !== 0) {\n writer.uint32(26).bytes(message.data);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ProofOp {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseProofOp();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.type = reader.string();\n break;\n case 2:\n message.key = reader.bytes();\n break;\n case 3:\n message.data = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ProofOp {\n return {\n type: isSet(object.type) ? String(object.type) : \"\",\n key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: ProofOp): unknown {\n const obj: any = {};\n message.type !== undefined && (obj.type = message.type);\n message.key !== undefined &&\n (obj.key = base64FromBytes(\n message.key !== undefined ? message.key : new Uint8Array(),\n ));\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): ProofOp {\n const message = createBaseProofOp();\n message.type = object.type ?? \"\";\n message.key = object.key ?? new Uint8Array();\n message.data = object.data ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseProofOps(): ProofOps {\n return { ops: [] };\n}\n\nexport const ProofOps = {\n encode(\n message: ProofOps,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.ops) {\n ProofOp.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ProofOps {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseProofOps();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.ops.push(ProofOp.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ProofOps {\n return {\n ops: Array.isArray(object?.ops)\n ? object.ops.map((e: any) => ProofOp.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: ProofOps): unknown {\n const obj: any = {};\n if (message.ops) {\n obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined));\n } else {\n obj.ops = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): ProofOps {\n const message = createBaseProofOps();\n message.ops = object.ops?.map((e) => ProofOp.fromPartial(e)) || [];\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Duration } from \"../../google/protobuf/duration\";\n\nexport const protobufPackage = \"tendermint.types\";\n\n/**\n * ConsensusParams contains consensus critical parameters that determine the\n * validity of blocks.\n */\nexport interface ConsensusParams {\n block?: BlockParams;\n evidence?: EvidenceParams;\n validator?: ValidatorParams;\n version?: VersionParams;\n}\n\n/** BlockParams contains limits on the block size. */\nexport interface BlockParams {\n /**\n * Max block size, in bytes.\n * Note: must be greater than 0\n */\n max_bytes: string;\n /**\n * Max gas per block.\n * Note: must be greater or equal to -1\n */\n max_gas: string;\n /**\n * Minimum time increment between consecutive blocks (in milliseconds) If the\n * block header timestamp is ahead of the system clock, decrease this value.\n *\n * Not exposed to the application.\n */\n time_iota_ms: string;\n}\n\n/** EvidenceParams determine how we handle evidence of malfeasance. */\nexport interface EvidenceParams {\n /**\n * Max age of evidence, in blocks.\n *\n * The basic formula for calculating this is: MaxAgeDuration / {average block\n * time}.\n */\n max_age_num_blocks: string;\n /**\n * Max age of evidence, in time.\n *\n * It should correspond with an app's \"unbonding period\" or other similar\n * mechanism for handling [Nothing-At-Stake\n * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).\n */\n max_age_duration?: Duration;\n /**\n * This sets the maximum size of total evidence in bytes that can be committed in a single block.\n * and should fall comfortably under the max block bytes.\n * Default is 1048576 or 1MB\n */\n max_bytes: string;\n}\n\n/**\n * ValidatorParams restrict the public key types validators can use.\n * NOTE: uses ABCI pubkey naming, not Amino names.\n */\nexport interface ValidatorParams {\n pub_key_types: string[];\n}\n\n/** VersionParams contains the ABCI application version. */\nexport interface VersionParams {\n app_version: string;\n}\n\n/**\n * HashedParams is a subset of ConsensusParams.\n *\n * It is hashed into the Header.ConsensusHash.\n */\nexport interface HashedParams {\n block_max_bytes: string;\n block_max_gas: string;\n}\n\nfunction createBaseConsensusParams(): ConsensusParams {\n return {\n block: undefined,\n evidence: undefined,\n validator: undefined,\n version: undefined,\n };\n}\n\nexport const ConsensusParams = {\n encode(\n message: ConsensusParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.block !== undefined) {\n BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim();\n }\n if (message.evidence !== undefined) {\n EvidenceParams.encode(\n message.evidence,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.validator !== undefined) {\n ValidatorParams.encode(\n message.validator,\n writer.uint32(26).fork(),\n ).ldelim();\n }\n if (message.version !== undefined) {\n VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ConsensusParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseConsensusParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.block = BlockParams.decode(reader, reader.uint32());\n break;\n case 2:\n message.evidence = EvidenceParams.decode(reader, reader.uint32());\n break;\n case 3:\n message.validator = ValidatorParams.decode(reader, reader.uint32());\n break;\n case 4:\n message.version = VersionParams.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ConsensusParams {\n return {\n block: isSet(object.block)\n ? BlockParams.fromJSON(object.block)\n : undefined,\n evidence: isSet(object.evidence)\n ? EvidenceParams.fromJSON(object.evidence)\n : undefined,\n validator: isSet(object.validator)\n ? ValidatorParams.fromJSON(object.validator)\n : undefined,\n version: isSet(object.version)\n ? VersionParams.fromJSON(object.version)\n : undefined,\n };\n },\n\n toJSON(message: ConsensusParams): unknown {\n const obj: any = {};\n message.block !== undefined &&\n (obj.block = message.block\n ? BlockParams.toJSON(message.block)\n : undefined);\n message.evidence !== undefined &&\n (obj.evidence = message.evidence\n ? EvidenceParams.toJSON(message.evidence)\n : undefined);\n message.validator !== undefined &&\n (obj.validator = message.validator\n ? ValidatorParams.toJSON(message.validator)\n : undefined);\n message.version !== undefined &&\n (obj.version = message.version\n ? VersionParams.toJSON(message.version)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ConsensusParams {\n const message = createBaseConsensusParams();\n message.block =\n object.block !== undefined && object.block !== null\n ? BlockParams.fromPartial(object.block)\n : undefined;\n message.evidence =\n object.evidence !== undefined && object.evidence !== null\n ? EvidenceParams.fromPartial(object.evidence)\n : undefined;\n message.validator =\n object.validator !== undefined && object.validator !== null\n ? ValidatorParams.fromPartial(object.validator)\n : undefined;\n message.version =\n object.version !== undefined && object.version !== null\n ? VersionParams.fromPartial(object.version)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseBlockParams(): BlockParams {\n return { max_bytes: \"0\", max_gas: \"0\", time_iota_ms: \"0\" };\n}\n\nexport const BlockParams = {\n encode(\n message: BlockParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.max_bytes !== \"0\") {\n writer.uint32(8).int64(message.max_bytes);\n }\n if (message.max_gas !== \"0\") {\n writer.uint32(16).int64(message.max_gas);\n }\n if (message.time_iota_ms !== \"0\") {\n writer.uint32(24).int64(message.time_iota_ms);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): BlockParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBlockParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.max_bytes = longToString(reader.int64() as Long);\n break;\n case 2:\n message.max_gas = longToString(reader.int64() as Long);\n break;\n case 3:\n message.time_iota_ms = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): BlockParams {\n return {\n max_bytes: isSet(object.max_bytes) ? String(object.max_bytes) : \"0\",\n max_gas: isSet(object.max_gas) ? String(object.max_gas) : \"0\",\n time_iota_ms: isSet(object.time_iota_ms)\n ? String(object.time_iota_ms)\n : \"0\",\n };\n },\n\n toJSON(message: BlockParams): unknown {\n const obj: any = {};\n message.max_bytes !== undefined && (obj.max_bytes = message.max_bytes);\n message.max_gas !== undefined && (obj.max_gas = message.max_gas);\n message.time_iota_ms !== undefined &&\n (obj.time_iota_ms = message.time_iota_ms);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): BlockParams {\n const message = createBaseBlockParams();\n message.max_bytes = object.max_bytes ?? \"0\";\n message.max_gas = object.max_gas ?? \"0\";\n message.time_iota_ms = object.time_iota_ms ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseEvidenceParams(): EvidenceParams {\n return {\n max_age_num_blocks: \"0\",\n max_age_duration: undefined,\n max_bytes: \"0\",\n };\n}\n\nexport const EvidenceParams = {\n encode(\n message: EvidenceParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.max_age_num_blocks !== \"0\") {\n writer.uint32(8).int64(message.max_age_num_blocks);\n }\n if (message.max_age_duration !== undefined) {\n Duration.encode(\n message.max_age_duration,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n if (message.max_bytes !== \"0\") {\n writer.uint32(24).int64(message.max_bytes);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): EvidenceParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseEvidenceParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.max_age_num_blocks = longToString(reader.int64() as Long);\n break;\n case 2:\n message.max_age_duration = Duration.decode(reader, reader.uint32());\n break;\n case 3:\n message.max_bytes = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): EvidenceParams {\n return {\n max_age_num_blocks: isSet(object.max_age_num_blocks)\n ? String(object.max_age_num_blocks)\n : \"0\",\n max_age_duration: isSet(object.max_age_duration)\n ? Duration.fromJSON(object.max_age_duration)\n : undefined,\n max_bytes: isSet(object.max_bytes) ? String(object.max_bytes) : \"0\",\n };\n },\n\n toJSON(message: EvidenceParams): unknown {\n const obj: any = {};\n message.max_age_num_blocks !== undefined &&\n (obj.max_age_num_blocks = message.max_age_num_blocks);\n message.max_age_duration !== undefined &&\n (obj.max_age_duration = message.max_age_duration\n ? Duration.toJSON(message.max_age_duration)\n : undefined);\n message.max_bytes !== undefined && (obj.max_bytes = message.max_bytes);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): EvidenceParams {\n const message = createBaseEvidenceParams();\n message.max_age_num_blocks = object.max_age_num_blocks ?? \"0\";\n message.max_age_duration =\n object.max_age_duration !== undefined && object.max_age_duration !== null\n ? Duration.fromPartial(object.max_age_duration)\n : undefined;\n message.max_bytes = object.max_bytes ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseValidatorParams(): ValidatorParams {\n return { pub_key_types: [] };\n}\n\nexport const ValidatorParams = {\n encode(\n message: ValidatorParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.pub_key_types) {\n writer.uint32(10).string(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.pub_key_types.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorParams {\n return {\n pub_key_types: Array.isArray(object?.pub_key_types)\n ? object.pub_key_types.map((e: any) => String(e))\n : [],\n };\n },\n\n toJSON(message: ValidatorParams): unknown {\n const obj: any = {};\n if (message.pub_key_types) {\n obj.pub_key_types = message.pub_key_types.map((e) => e);\n } else {\n obj.pub_key_types = [];\n }\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorParams {\n const message = createBaseValidatorParams();\n message.pub_key_types = object.pub_key_types?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseVersionParams(): VersionParams {\n return { app_version: \"0\" };\n}\n\nexport const VersionParams = {\n encode(\n message: VersionParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.app_version !== \"0\") {\n writer.uint32(8).uint64(message.app_version);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): VersionParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVersionParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.app_version = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): VersionParams {\n return {\n app_version: isSet(object.app_version) ? String(object.app_version) : \"0\",\n };\n },\n\n toJSON(message: VersionParams): unknown {\n const obj: any = {};\n message.app_version !== undefined &&\n (obj.app_version = message.app_version);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): VersionParams {\n const message = createBaseVersionParams();\n message.app_version = object.app_version ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseHashedParams(): HashedParams {\n return { block_max_bytes: \"0\", block_max_gas: \"0\" };\n}\n\nexport const HashedParams = {\n encode(\n message: HashedParams,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.block_max_bytes !== \"0\") {\n writer.uint32(8).int64(message.block_max_bytes);\n }\n if (message.block_max_gas !== \"0\") {\n writer.uint32(16).int64(message.block_max_gas);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): HashedParams {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseHashedParams();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.block_max_bytes = longToString(reader.int64() as Long);\n break;\n case 2:\n message.block_max_gas = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): HashedParams {\n return {\n block_max_bytes: isSet(object.block_max_bytes)\n ? String(object.block_max_bytes)\n : \"0\",\n block_max_gas: isSet(object.block_max_gas)\n ? String(object.block_max_gas)\n : \"0\",\n };\n },\n\n toJSON(message: HashedParams): unknown {\n const obj: any = {};\n message.block_max_bytes !== undefined &&\n (obj.block_max_bytes = message.block_max_bytes);\n message.block_max_gas !== undefined &&\n (obj.block_max_gas = message.block_max_gas);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): HashedParams {\n const message = createBaseHashedParams();\n message.block_max_bytes = object.block_max_bytes ?? \"0\";\n message.block_max_gas = object.block_max_gas ?? \"0\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { Proof } from \"../crypto/proof\";\nimport { Consensus } from \"../version/types\";\nimport { Timestamp } from \"../../google/protobuf/timestamp\";\nimport { ValidatorSet } from \"./validator\";\n\nexport const protobufPackage = \"tendermint.types\";\n\n/** BlockIdFlag indicates which BlcokID the signature is for */\nexport enum BlockIDFlag {\n BLOCK_ID_FLAG_UNKNOWN = 0,\n BLOCK_ID_FLAG_ABSENT = 1,\n BLOCK_ID_FLAG_COMMIT = 2,\n BLOCK_ID_FLAG_NIL = 3,\n UNRECOGNIZED = -1,\n}\n\nexport function blockIDFlagFromJSON(object: any): BlockIDFlag {\n switch (object) {\n case 0:\n case \"BLOCK_ID_FLAG_UNKNOWN\":\n return BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN;\n case 1:\n case \"BLOCK_ID_FLAG_ABSENT\":\n return BlockIDFlag.BLOCK_ID_FLAG_ABSENT;\n case 2:\n case \"BLOCK_ID_FLAG_COMMIT\":\n return BlockIDFlag.BLOCK_ID_FLAG_COMMIT;\n case 3:\n case \"BLOCK_ID_FLAG_NIL\":\n return BlockIDFlag.BLOCK_ID_FLAG_NIL;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return BlockIDFlag.UNRECOGNIZED;\n }\n}\n\nexport function blockIDFlagToJSON(object: BlockIDFlag): string {\n switch (object) {\n case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN:\n return \"BLOCK_ID_FLAG_UNKNOWN\";\n case BlockIDFlag.BLOCK_ID_FLAG_ABSENT:\n return \"BLOCK_ID_FLAG_ABSENT\";\n case BlockIDFlag.BLOCK_ID_FLAG_COMMIT:\n return \"BLOCK_ID_FLAG_COMMIT\";\n case BlockIDFlag.BLOCK_ID_FLAG_NIL:\n return \"BLOCK_ID_FLAG_NIL\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/** SignedMsgType is a type of signed message in the consensus. */\nexport enum SignedMsgType {\n SIGNED_MSG_TYPE_UNKNOWN = 0,\n /** SIGNED_MSG_TYPE_PREVOTE - Votes */\n SIGNED_MSG_TYPE_PREVOTE = 1,\n SIGNED_MSG_TYPE_PRECOMMIT = 2,\n /** SIGNED_MSG_TYPE_PROPOSAL - Proposals */\n SIGNED_MSG_TYPE_PROPOSAL = 32,\n UNRECOGNIZED = -1,\n}\n\nexport function signedMsgTypeFromJSON(object: any): SignedMsgType {\n switch (object) {\n case 0:\n case \"SIGNED_MSG_TYPE_UNKNOWN\":\n return SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN;\n case 1:\n case \"SIGNED_MSG_TYPE_PREVOTE\":\n return SignedMsgType.SIGNED_MSG_TYPE_PREVOTE;\n case 2:\n case \"SIGNED_MSG_TYPE_PRECOMMIT\":\n return SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT;\n case 32:\n case \"SIGNED_MSG_TYPE_PROPOSAL\":\n return SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL;\n case -1:\n case \"UNRECOGNIZED\":\n default:\n return SignedMsgType.UNRECOGNIZED;\n }\n}\n\nexport function signedMsgTypeToJSON(object: SignedMsgType): string {\n switch (object) {\n case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN:\n return \"SIGNED_MSG_TYPE_UNKNOWN\";\n case SignedMsgType.SIGNED_MSG_TYPE_PREVOTE:\n return \"SIGNED_MSG_TYPE_PREVOTE\";\n case SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT:\n return \"SIGNED_MSG_TYPE_PRECOMMIT\";\n case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL:\n return \"SIGNED_MSG_TYPE_PROPOSAL\";\n default:\n return \"UNKNOWN\";\n }\n}\n\n/** PartsetHeader */\nexport interface PartSetHeader {\n total: number;\n hash: Uint8Array;\n}\n\nexport interface Part {\n index: number;\n bytes: Uint8Array;\n proof?: Proof;\n}\n\n/** BlockID */\nexport interface BlockID {\n hash: Uint8Array;\n part_set_header?: PartSetHeader;\n}\n\n/** Header defines the structure of a Tendermint block header. */\nexport interface Header {\n /** basic block info */\n version?: Consensus;\n chain_id: string;\n height: string;\n time?: Timestamp;\n /** prev block info */\n last_block_id?: BlockID;\n /** hashes of block data */\n last_commit_hash: Uint8Array;\n /** transactions */\n data_hash: Uint8Array;\n /** hashes from the app output from the prev block */\n validators_hash: Uint8Array;\n /** validators for the next block */\n next_validators_hash: Uint8Array;\n /** consensus params for current block */\n consensus_hash: Uint8Array;\n /** state after txs from the previous block */\n app_hash: Uint8Array;\n /** root hash of all results from the txs from the previous block */\n last_results_hash: Uint8Array;\n /** consensus info */\n evidence_hash: Uint8Array;\n /** original proposer of the block */\n proposer_address: Uint8Array;\n /** encrypted random */\n encrypted_random?: EncryptedRandom;\n}\n\n/** Data contains the set of transactions included in the block */\nexport interface EncryptedRandom {\n random: Uint8Array;\n proof: Uint8Array;\n}\n\n/** Data contains the set of transactions included in the block */\nexport interface Data {\n /**\n * Txs that will be applied by state @ block.Height+1.\n * NOTE: not all txs here are valid. We're just agreeing on the order first.\n * This means that block.AppHash does not include these txs.\n */\n txs: Uint8Array[];\n}\n\n/**\n * Vote represents a prevote, precommit, or commit vote from validators for\n * consensus.\n */\nexport interface Vote {\n type: SignedMsgType;\n height: string;\n round: number;\n /** zero if vote is nil. */\n block_id?: BlockID;\n timestamp?: Timestamp;\n validator_address: Uint8Array;\n validator_index: number;\n signature: Uint8Array;\n}\n\n/** Commit contains the evidence that a block was committed by a set of validators. */\nexport interface Commit {\n height: string;\n round: number;\n block_id?: BlockID;\n signatures: CommitSig[];\n}\n\n/** CommitSig is a part of the Vote included in a Commit. */\nexport interface CommitSig {\n block_id_flag: BlockIDFlag;\n validator_address: Uint8Array;\n timestamp?: Timestamp;\n signature: Uint8Array;\n}\n\nexport interface Proposal {\n type: SignedMsgType;\n height: string;\n round: number;\n pol_round: number;\n block_id?: BlockID;\n timestamp?: Timestamp;\n signature: Uint8Array;\n}\n\nexport interface SignedHeader {\n header?: Header;\n commit?: Commit;\n}\n\nexport interface LightBlock {\n signed_header?: SignedHeader;\n validator_set?: ValidatorSet;\n}\n\nexport interface BlockMeta {\n block_id?: BlockID;\n block_size: string;\n header?: Header;\n num_txs: string;\n}\n\n/** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */\nexport interface TxProof {\n root_hash: Uint8Array;\n data: Uint8Array;\n proof?: Proof;\n}\n\nfunction createBasePartSetHeader(): PartSetHeader {\n return { total: 0, hash: new Uint8Array() };\n}\n\nexport const PartSetHeader = {\n encode(\n message: PartSetHeader,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.total !== 0) {\n writer.uint32(8).uint32(message.total);\n }\n if (message.hash.length !== 0) {\n writer.uint32(18).bytes(message.hash);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): PartSetHeader {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePartSetHeader();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.total = reader.uint32();\n break;\n case 2:\n message.hash = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): PartSetHeader {\n return {\n total: isSet(object.total) ? Number(object.total) : 0,\n hash: isSet(object.hash)\n ? bytesFromBase64(object.hash)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: PartSetHeader): unknown {\n const obj: any = {};\n message.total !== undefined && (obj.total = Math.round(message.total));\n message.hash !== undefined &&\n (obj.hash = base64FromBytes(\n message.hash !== undefined ? message.hash : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): PartSetHeader {\n const message = createBasePartSetHeader();\n message.total = object.total ?? 0;\n message.hash = object.hash ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBasePart(): Part {\n return { index: 0, bytes: new Uint8Array(), proof: undefined };\n}\n\nexport const Part = {\n encode(message: Part, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.index !== 0) {\n writer.uint32(8).uint32(message.index);\n }\n if (message.bytes.length !== 0) {\n writer.uint32(18).bytes(message.bytes);\n }\n if (message.proof !== undefined) {\n Proof.encode(message.proof, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Part {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePart();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.index = reader.uint32();\n break;\n case 2:\n message.bytes = reader.bytes();\n break;\n case 3:\n message.proof = Proof.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Part {\n return {\n index: isSet(object.index) ? Number(object.index) : 0,\n bytes: isSet(object.bytes)\n ? bytesFromBase64(object.bytes)\n : new Uint8Array(),\n proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : undefined,\n };\n },\n\n toJSON(message: Part): unknown {\n const obj: any = {};\n message.index !== undefined && (obj.index = Math.round(message.index));\n message.bytes !== undefined &&\n (obj.bytes = base64FromBytes(\n message.bytes !== undefined ? message.bytes : new Uint8Array(),\n ));\n message.proof !== undefined &&\n (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): Part {\n const message = createBasePart();\n message.index = object.index ?? 0;\n message.bytes = object.bytes ?? new Uint8Array();\n message.proof =\n object.proof !== undefined && object.proof !== null\n ? Proof.fromPartial(object.proof)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseBlockID(): BlockID {\n return { hash: new Uint8Array(), part_set_header: undefined };\n}\n\nexport const BlockID = {\n encode(\n message: BlockID,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.hash.length !== 0) {\n writer.uint32(10).bytes(message.hash);\n }\n if (message.part_set_header !== undefined) {\n PartSetHeader.encode(\n message.part_set_header,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): BlockID {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBlockID();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.hash = reader.bytes();\n break;\n case 2:\n message.part_set_header = PartSetHeader.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): BlockID {\n return {\n hash: isSet(object.hash)\n ? bytesFromBase64(object.hash)\n : new Uint8Array(),\n part_set_header: isSet(object.part_set_header)\n ? PartSetHeader.fromJSON(object.part_set_header)\n : undefined,\n };\n },\n\n toJSON(message: BlockID): unknown {\n const obj: any = {};\n message.hash !== undefined &&\n (obj.hash = base64FromBytes(\n message.hash !== undefined ? message.hash : new Uint8Array(),\n ));\n message.part_set_header !== undefined &&\n (obj.part_set_header = message.part_set_header\n ? PartSetHeader.toJSON(message.part_set_header)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): BlockID {\n const message = createBaseBlockID();\n message.hash = object.hash ?? new Uint8Array();\n message.part_set_header =\n object.part_set_header !== undefined && object.part_set_header !== null\n ? PartSetHeader.fromPartial(object.part_set_header)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseHeader(): Header {\n return {\n version: undefined,\n chain_id: \"\",\n height: \"0\",\n time: undefined,\n last_block_id: undefined,\n last_commit_hash: new Uint8Array(),\n data_hash: new Uint8Array(),\n validators_hash: new Uint8Array(),\n next_validators_hash: new Uint8Array(),\n consensus_hash: new Uint8Array(),\n app_hash: new Uint8Array(),\n last_results_hash: new Uint8Array(),\n evidence_hash: new Uint8Array(),\n proposer_address: new Uint8Array(),\n encrypted_random: undefined,\n };\n}\n\nexport const Header = {\n encode(\n message: Header,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.version !== undefined) {\n Consensus.encode(message.version, writer.uint32(10).fork()).ldelim();\n }\n if (message.chain_id !== \"\") {\n writer.uint32(18).string(message.chain_id);\n }\n if (message.height !== \"0\") {\n writer.uint32(24).int64(message.height);\n }\n if (message.time !== undefined) {\n Timestamp.encode(message.time, writer.uint32(34).fork()).ldelim();\n }\n if (message.last_block_id !== undefined) {\n BlockID.encode(message.last_block_id, writer.uint32(42).fork()).ldelim();\n }\n if (message.last_commit_hash.length !== 0) {\n writer.uint32(50).bytes(message.last_commit_hash);\n }\n if (message.data_hash.length !== 0) {\n writer.uint32(58).bytes(message.data_hash);\n }\n if (message.validators_hash.length !== 0) {\n writer.uint32(66).bytes(message.validators_hash);\n }\n if (message.next_validators_hash.length !== 0) {\n writer.uint32(74).bytes(message.next_validators_hash);\n }\n if (message.consensus_hash.length !== 0) {\n writer.uint32(82).bytes(message.consensus_hash);\n }\n if (message.app_hash.length !== 0) {\n writer.uint32(90).bytes(message.app_hash);\n }\n if (message.last_results_hash.length !== 0) {\n writer.uint32(98).bytes(message.last_results_hash);\n }\n if (message.evidence_hash.length !== 0) {\n writer.uint32(106).bytes(message.evidence_hash);\n }\n if (message.proposer_address.length !== 0) {\n writer.uint32(114).bytes(message.proposer_address);\n }\n if (message.encrypted_random !== undefined) {\n EncryptedRandom.encode(\n message.encrypted_random,\n writer.uint32(122).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Header {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseHeader();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.version = Consensus.decode(reader, reader.uint32());\n break;\n case 2:\n message.chain_id = reader.string();\n break;\n case 3:\n message.height = longToString(reader.int64() as Long);\n break;\n case 4:\n message.time = Timestamp.decode(reader, reader.uint32());\n break;\n case 5:\n message.last_block_id = BlockID.decode(reader, reader.uint32());\n break;\n case 6:\n message.last_commit_hash = reader.bytes();\n break;\n case 7:\n message.data_hash = reader.bytes();\n break;\n case 8:\n message.validators_hash = reader.bytes();\n break;\n case 9:\n message.next_validators_hash = reader.bytes();\n break;\n case 10:\n message.consensus_hash = reader.bytes();\n break;\n case 11:\n message.app_hash = reader.bytes();\n break;\n case 12:\n message.last_results_hash = reader.bytes();\n break;\n case 13:\n message.evidence_hash = reader.bytes();\n break;\n case 14:\n message.proposer_address = reader.bytes();\n break;\n case 15:\n message.encrypted_random = EncryptedRandom.decode(\n reader,\n reader.uint32(),\n );\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Header {\n return {\n version: isSet(object.version)\n ? Consensus.fromJSON(object.version)\n : undefined,\n chain_id: isSet(object.chain_id) ? String(object.chain_id) : \"\",\n height: isSet(object.height) ? String(object.height) : \"0\",\n time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,\n last_block_id: isSet(object.last_block_id)\n ? BlockID.fromJSON(object.last_block_id)\n : undefined,\n last_commit_hash: isSet(object.last_commit_hash)\n ? bytesFromBase64(object.last_commit_hash)\n : new Uint8Array(),\n data_hash: isSet(object.data_hash)\n ? bytesFromBase64(object.data_hash)\n : new Uint8Array(),\n validators_hash: isSet(object.validators_hash)\n ? bytesFromBase64(object.validators_hash)\n : new Uint8Array(),\n next_validators_hash: isSet(object.next_validators_hash)\n ? bytesFromBase64(object.next_validators_hash)\n : new Uint8Array(),\n consensus_hash: isSet(object.consensus_hash)\n ? bytesFromBase64(object.consensus_hash)\n : new Uint8Array(),\n app_hash: isSet(object.app_hash)\n ? bytesFromBase64(object.app_hash)\n : new Uint8Array(),\n last_results_hash: isSet(object.last_results_hash)\n ? bytesFromBase64(object.last_results_hash)\n : new Uint8Array(),\n evidence_hash: isSet(object.evidence_hash)\n ? bytesFromBase64(object.evidence_hash)\n : new Uint8Array(),\n proposer_address: isSet(object.proposer_address)\n ? bytesFromBase64(object.proposer_address)\n : new Uint8Array(),\n encrypted_random: isSet(object.encrypted_random)\n ? EncryptedRandom.fromJSON(object.encrypted_random)\n : undefined,\n };\n },\n\n toJSON(message: Header): unknown {\n const obj: any = {};\n message.version !== undefined &&\n (obj.version = message.version\n ? Consensus.toJSON(message.version)\n : undefined);\n message.chain_id !== undefined && (obj.chain_id = message.chain_id);\n message.height !== undefined && (obj.height = message.height);\n message.time !== undefined &&\n (obj.time = fromTimestamp(message.time).toISOString());\n message.last_block_id !== undefined &&\n (obj.last_block_id = message.last_block_id\n ? BlockID.toJSON(message.last_block_id)\n : undefined);\n message.last_commit_hash !== undefined &&\n (obj.last_commit_hash = base64FromBytes(\n message.last_commit_hash !== undefined\n ? message.last_commit_hash\n : new Uint8Array(),\n ));\n message.data_hash !== undefined &&\n (obj.data_hash = base64FromBytes(\n message.data_hash !== undefined ? message.data_hash : new Uint8Array(),\n ));\n message.validators_hash !== undefined &&\n (obj.validators_hash = base64FromBytes(\n message.validators_hash !== undefined\n ? message.validators_hash\n : new Uint8Array(),\n ));\n message.next_validators_hash !== undefined &&\n (obj.next_validators_hash = base64FromBytes(\n message.next_validators_hash !== undefined\n ? message.next_validators_hash\n : new Uint8Array(),\n ));\n message.consensus_hash !== undefined &&\n (obj.consensus_hash = base64FromBytes(\n message.consensus_hash !== undefined\n ? message.consensus_hash\n : new Uint8Array(),\n ));\n message.app_hash !== undefined &&\n (obj.app_hash = base64FromBytes(\n message.app_hash !== undefined ? message.app_hash : new Uint8Array(),\n ));\n message.last_results_hash !== undefined &&\n (obj.last_results_hash = base64FromBytes(\n message.last_results_hash !== undefined\n ? message.last_results_hash\n : new Uint8Array(),\n ));\n message.evidence_hash !== undefined &&\n (obj.evidence_hash = base64FromBytes(\n message.evidence_hash !== undefined\n ? message.evidence_hash\n : new Uint8Array(),\n ));\n message.proposer_address !== undefined &&\n (obj.proposer_address = base64FromBytes(\n message.proposer_address !== undefined\n ? message.proposer_address\n : new Uint8Array(),\n ));\n message.encrypted_random !== undefined &&\n (obj.encrypted_random = message.encrypted_random\n ? EncryptedRandom.toJSON(message.encrypted_random)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): Header {\n const message = createBaseHeader();\n message.version =\n object.version !== undefined && object.version !== null\n ? Consensus.fromPartial(object.version)\n : undefined;\n message.chain_id = object.chain_id ?? \"\";\n message.height = object.height ?? \"0\";\n message.time =\n object.time !== undefined && object.time !== null\n ? Timestamp.fromPartial(object.time)\n : undefined;\n message.last_block_id =\n object.last_block_id !== undefined && object.last_block_id !== null\n ? BlockID.fromPartial(object.last_block_id)\n : undefined;\n message.last_commit_hash = object.last_commit_hash ?? new Uint8Array();\n message.data_hash = object.data_hash ?? new Uint8Array();\n message.validators_hash = object.validators_hash ?? new Uint8Array();\n message.next_validators_hash =\n object.next_validators_hash ?? new Uint8Array();\n message.consensus_hash = object.consensus_hash ?? new Uint8Array();\n message.app_hash = object.app_hash ?? new Uint8Array();\n message.last_results_hash = object.last_results_hash ?? new Uint8Array();\n message.evidence_hash = object.evidence_hash ?? new Uint8Array();\n message.proposer_address = object.proposer_address ?? new Uint8Array();\n message.encrypted_random =\n object.encrypted_random !== undefined && object.encrypted_random !== null\n ? EncryptedRandom.fromPartial(object.encrypted_random)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseEncryptedRandom(): EncryptedRandom {\n return { random: new Uint8Array(), proof: new Uint8Array() };\n}\n\nexport const EncryptedRandom = {\n encode(\n message: EncryptedRandom,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.random.length !== 0) {\n writer.uint32(10).bytes(message.random);\n }\n if (message.proof.length !== 0) {\n writer.uint32(18).bytes(message.proof);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): EncryptedRandom {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseEncryptedRandom();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.random = reader.bytes();\n break;\n case 2:\n message.proof = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): EncryptedRandom {\n return {\n random: isSet(object.random)\n ? bytesFromBase64(object.random)\n : new Uint8Array(),\n proof: isSet(object.proof)\n ? bytesFromBase64(object.proof)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: EncryptedRandom): unknown {\n const obj: any = {};\n message.random !== undefined &&\n (obj.random = base64FromBytes(\n message.random !== undefined ? message.random : new Uint8Array(),\n ));\n message.proof !== undefined &&\n (obj.proof = base64FromBytes(\n message.proof !== undefined ? message.proof : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): EncryptedRandom {\n const message = createBaseEncryptedRandom();\n message.random = object.random ?? new Uint8Array();\n message.proof = object.proof ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseData(): Data {\n return { txs: [] };\n}\n\nexport const Data = {\n encode(message: Data, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n for (const v of message.txs) {\n writer.uint32(10).bytes(v!);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Data {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseData();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.txs.push(reader.bytes());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Data {\n return {\n txs: Array.isArray(object?.txs)\n ? object.txs.map((e: any) => bytesFromBase64(e))\n : [],\n };\n },\n\n toJSON(message: Data): unknown {\n const obj: any = {};\n if (message.txs) {\n obj.txs = message.txs.map((e) =>\n base64FromBytes(e !== undefined ? e : new Uint8Array()),\n );\n } else {\n obj.txs = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Data {\n const message = createBaseData();\n message.txs = object.txs?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseVote(): Vote {\n return {\n type: 0,\n height: \"0\",\n round: 0,\n block_id: undefined,\n timestamp: undefined,\n validator_address: new Uint8Array(),\n validator_index: 0,\n signature: new Uint8Array(),\n };\n}\n\nexport const Vote = {\n encode(message: Vote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.type !== 0) {\n writer.uint32(8).int32(message.type);\n }\n if (message.height !== \"0\") {\n writer.uint32(16).int64(message.height);\n }\n if (message.round !== 0) {\n writer.uint32(24).int32(message.round);\n }\n if (message.block_id !== undefined) {\n BlockID.encode(message.block_id, writer.uint32(34).fork()).ldelim();\n }\n if (message.timestamp !== undefined) {\n Timestamp.encode(message.timestamp, writer.uint32(42).fork()).ldelim();\n }\n if (message.validator_address.length !== 0) {\n writer.uint32(50).bytes(message.validator_address);\n }\n if (message.validator_index !== 0) {\n writer.uint32(56).int32(message.validator_index);\n }\n if (message.signature.length !== 0) {\n writer.uint32(66).bytes(message.signature);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Vote {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVote();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.type = reader.int32() as any;\n break;\n case 2:\n message.height = longToString(reader.int64() as Long);\n break;\n case 3:\n message.round = reader.int32();\n break;\n case 4:\n message.block_id = BlockID.decode(reader, reader.uint32());\n break;\n case 5:\n message.timestamp = Timestamp.decode(reader, reader.uint32());\n break;\n case 6:\n message.validator_address = reader.bytes();\n break;\n case 7:\n message.validator_index = reader.int32();\n break;\n case 8:\n message.signature = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Vote {\n return {\n type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : 0,\n height: isSet(object.height) ? String(object.height) : \"0\",\n round: isSet(object.round) ? Number(object.round) : 0,\n block_id: isSet(object.block_id)\n ? BlockID.fromJSON(object.block_id)\n : undefined,\n timestamp: isSet(object.timestamp)\n ? fromJsonTimestamp(object.timestamp)\n : undefined,\n validator_address: isSet(object.validator_address)\n ? bytesFromBase64(object.validator_address)\n : new Uint8Array(),\n validator_index: isSet(object.validator_index)\n ? Number(object.validator_index)\n : 0,\n signature: isSet(object.signature)\n ? bytesFromBase64(object.signature)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: Vote): unknown {\n const obj: any = {};\n message.type !== undefined &&\n (obj.type = signedMsgTypeToJSON(message.type));\n message.height !== undefined && (obj.height = message.height);\n message.round !== undefined && (obj.round = Math.round(message.round));\n message.block_id !== undefined &&\n (obj.block_id = message.block_id\n ? BlockID.toJSON(message.block_id)\n : undefined);\n message.timestamp !== undefined &&\n (obj.timestamp = fromTimestamp(message.timestamp).toISOString());\n message.validator_address !== undefined &&\n (obj.validator_address = base64FromBytes(\n message.validator_address !== undefined\n ? message.validator_address\n : new Uint8Array(),\n ));\n message.validator_index !== undefined &&\n (obj.validator_index = Math.round(message.validator_index));\n message.signature !== undefined &&\n (obj.signature = base64FromBytes(\n message.signature !== undefined ? message.signature : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): Vote {\n const message = createBaseVote();\n message.type = object.type ?? 0;\n message.height = object.height ?? \"0\";\n message.round = object.round ?? 0;\n message.block_id =\n object.block_id !== undefined && object.block_id !== null\n ? BlockID.fromPartial(object.block_id)\n : undefined;\n message.timestamp =\n object.timestamp !== undefined && object.timestamp !== null\n ? Timestamp.fromPartial(object.timestamp)\n : undefined;\n message.validator_address = object.validator_address ?? new Uint8Array();\n message.validator_index = object.validator_index ?? 0;\n message.signature = object.signature ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseCommit(): Commit {\n return { height: \"0\", round: 0, block_id: undefined, signatures: [] };\n}\n\nexport const Commit = {\n encode(\n message: Commit,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.height !== \"0\") {\n writer.uint32(8).int64(message.height);\n }\n if (message.round !== 0) {\n writer.uint32(16).int32(message.round);\n }\n if (message.block_id !== undefined) {\n BlockID.encode(message.block_id, writer.uint32(26).fork()).ldelim();\n }\n for (const v of message.signatures) {\n CommitSig.encode(v!, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Commit {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCommit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.height = longToString(reader.int64() as Long);\n break;\n case 2:\n message.round = reader.int32();\n break;\n case 3:\n message.block_id = BlockID.decode(reader, reader.uint32());\n break;\n case 4:\n message.signatures.push(CommitSig.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Commit {\n return {\n height: isSet(object.height) ? String(object.height) : \"0\",\n round: isSet(object.round) ? Number(object.round) : 0,\n block_id: isSet(object.block_id)\n ? BlockID.fromJSON(object.block_id)\n : undefined,\n signatures: Array.isArray(object?.signatures)\n ? object.signatures.map((e: any) => CommitSig.fromJSON(e))\n : [],\n };\n },\n\n toJSON(message: Commit): unknown {\n const obj: any = {};\n message.height !== undefined && (obj.height = message.height);\n message.round !== undefined && (obj.round = Math.round(message.round));\n message.block_id !== undefined &&\n (obj.block_id = message.block_id\n ? BlockID.toJSON(message.block_id)\n : undefined);\n if (message.signatures) {\n obj.signatures = message.signatures.map((e) =>\n e ? CommitSig.toJSON(e) : undefined,\n );\n } else {\n obj.signatures = [];\n }\n return obj;\n },\n\n fromPartial, I>>(object: I): Commit {\n const message = createBaseCommit();\n message.height = object.height ?? \"0\";\n message.round = object.round ?? 0;\n message.block_id =\n object.block_id !== undefined && object.block_id !== null\n ? BlockID.fromPartial(object.block_id)\n : undefined;\n message.signatures =\n object.signatures?.map((e) => CommitSig.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseCommitSig(): CommitSig {\n return {\n block_id_flag: 0,\n validator_address: new Uint8Array(),\n timestamp: undefined,\n signature: new Uint8Array(),\n };\n}\n\nexport const CommitSig = {\n encode(\n message: CommitSig,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.block_id_flag !== 0) {\n writer.uint32(8).int32(message.block_id_flag);\n }\n if (message.validator_address.length !== 0) {\n writer.uint32(18).bytes(message.validator_address);\n }\n if (message.timestamp !== undefined) {\n Timestamp.encode(message.timestamp, writer.uint32(26).fork()).ldelim();\n }\n if (message.signature.length !== 0) {\n writer.uint32(34).bytes(message.signature);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): CommitSig {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCommitSig();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.block_id_flag = reader.int32() as any;\n break;\n case 2:\n message.validator_address = reader.bytes();\n break;\n case 3:\n message.timestamp = Timestamp.decode(reader, reader.uint32());\n break;\n case 4:\n message.signature = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): CommitSig {\n return {\n block_id_flag: isSet(object.block_id_flag)\n ? blockIDFlagFromJSON(object.block_id_flag)\n : 0,\n validator_address: isSet(object.validator_address)\n ? bytesFromBase64(object.validator_address)\n : new Uint8Array(),\n timestamp: isSet(object.timestamp)\n ? fromJsonTimestamp(object.timestamp)\n : undefined,\n signature: isSet(object.signature)\n ? bytesFromBase64(object.signature)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: CommitSig): unknown {\n const obj: any = {};\n message.block_id_flag !== undefined &&\n (obj.block_id_flag = blockIDFlagToJSON(message.block_id_flag));\n message.validator_address !== undefined &&\n (obj.validator_address = base64FromBytes(\n message.validator_address !== undefined\n ? message.validator_address\n : new Uint8Array(),\n ));\n message.timestamp !== undefined &&\n (obj.timestamp = fromTimestamp(message.timestamp).toISOString());\n message.signature !== undefined &&\n (obj.signature = base64FromBytes(\n message.signature !== undefined ? message.signature : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): CommitSig {\n const message = createBaseCommitSig();\n message.block_id_flag = object.block_id_flag ?? 0;\n message.validator_address = object.validator_address ?? new Uint8Array();\n message.timestamp =\n object.timestamp !== undefined && object.timestamp !== null\n ? Timestamp.fromPartial(object.timestamp)\n : undefined;\n message.signature = object.signature ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseProposal(): Proposal {\n return {\n type: 0,\n height: \"0\",\n round: 0,\n pol_round: 0,\n block_id: undefined,\n timestamp: undefined,\n signature: new Uint8Array(),\n };\n}\n\nexport const Proposal = {\n encode(\n message: Proposal,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.type !== 0) {\n writer.uint32(8).int32(message.type);\n }\n if (message.height !== \"0\") {\n writer.uint32(16).int64(message.height);\n }\n if (message.round !== 0) {\n writer.uint32(24).int32(message.round);\n }\n if (message.pol_round !== 0) {\n writer.uint32(32).int32(message.pol_round);\n }\n if (message.block_id !== undefined) {\n BlockID.encode(message.block_id, writer.uint32(42).fork()).ldelim();\n }\n if (message.timestamp !== undefined) {\n Timestamp.encode(message.timestamp, writer.uint32(50).fork()).ldelim();\n }\n if (message.signature.length !== 0) {\n writer.uint32(58).bytes(message.signature);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Proposal {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseProposal();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.type = reader.int32() as any;\n break;\n case 2:\n message.height = longToString(reader.int64() as Long);\n break;\n case 3:\n message.round = reader.int32();\n break;\n case 4:\n message.pol_round = reader.int32();\n break;\n case 5:\n message.block_id = BlockID.decode(reader, reader.uint32());\n break;\n case 6:\n message.timestamp = Timestamp.decode(reader, reader.uint32());\n break;\n case 7:\n message.signature = reader.bytes();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Proposal {\n return {\n type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : 0,\n height: isSet(object.height) ? String(object.height) : \"0\",\n round: isSet(object.round) ? Number(object.round) : 0,\n pol_round: isSet(object.pol_round) ? Number(object.pol_round) : 0,\n block_id: isSet(object.block_id)\n ? BlockID.fromJSON(object.block_id)\n : undefined,\n timestamp: isSet(object.timestamp)\n ? fromJsonTimestamp(object.timestamp)\n : undefined,\n signature: isSet(object.signature)\n ? bytesFromBase64(object.signature)\n : new Uint8Array(),\n };\n },\n\n toJSON(message: Proposal): unknown {\n const obj: any = {};\n message.type !== undefined &&\n (obj.type = signedMsgTypeToJSON(message.type));\n message.height !== undefined && (obj.height = message.height);\n message.round !== undefined && (obj.round = Math.round(message.round));\n message.pol_round !== undefined &&\n (obj.pol_round = Math.round(message.pol_round));\n message.block_id !== undefined &&\n (obj.block_id = message.block_id\n ? BlockID.toJSON(message.block_id)\n : undefined);\n message.timestamp !== undefined &&\n (obj.timestamp = fromTimestamp(message.timestamp).toISOString());\n message.signature !== undefined &&\n (obj.signature = base64FromBytes(\n message.signature !== undefined ? message.signature : new Uint8Array(),\n ));\n return obj;\n },\n\n fromPartial, I>>(object: I): Proposal {\n const message = createBaseProposal();\n message.type = object.type ?? 0;\n message.height = object.height ?? \"0\";\n message.round = object.round ?? 0;\n message.pol_round = object.pol_round ?? 0;\n message.block_id =\n object.block_id !== undefined && object.block_id !== null\n ? BlockID.fromPartial(object.block_id)\n : undefined;\n message.timestamp =\n object.timestamp !== undefined && object.timestamp !== null\n ? Timestamp.fromPartial(object.timestamp)\n : undefined;\n message.signature = object.signature ?? new Uint8Array();\n return message;\n },\n};\n\nfunction createBaseSignedHeader(): SignedHeader {\n return { header: undefined, commit: undefined };\n}\n\nexport const SignedHeader = {\n encode(\n message: SignedHeader,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.header !== undefined) {\n Header.encode(message.header, writer.uint32(10).fork()).ldelim();\n }\n if (message.commit !== undefined) {\n Commit.encode(message.commit, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SignedHeader {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSignedHeader();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.header = Header.decode(reader, reader.uint32());\n break;\n case 2:\n message.commit = Commit.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SignedHeader {\n return {\n header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,\n commit: isSet(object.commit) ? Commit.fromJSON(object.commit) : undefined,\n };\n },\n\n toJSON(message: SignedHeader): unknown {\n const obj: any = {};\n message.header !== undefined &&\n (obj.header = message.header ? Header.toJSON(message.header) : undefined);\n message.commit !== undefined &&\n (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SignedHeader {\n const message = createBaseSignedHeader();\n message.header =\n object.header !== undefined && object.header !== null\n ? Header.fromPartial(object.header)\n : undefined;\n message.commit =\n object.commit !== undefined && object.commit !== null\n ? Commit.fromPartial(object.commit)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseLightBlock(): LightBlock {\n return { signed_header: undefined, validator_set: undefined };\n}\n\nexport const LightBlock = {\n encode(\n message: LightBlock,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.signed_header !== undefined) {\n SignedHeader.encode(\n message.signed_header,\n writer.uint32(10).fork(),\n ).ldelim();\n }\n if (message.validator_set !== undefined) {\n ValidatorSet.encode(\n message.validator_set,\n writer.uint32(18).fork(),\n ).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): LightBlock {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseLightBlock();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.signed_header = SignedHeader.decode(reader, reader.uint32());\n break;\n case 2:\n message.validator_set = ValidatorSet.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): LightBlock {\n return {\n signed_header: isSet(object.signed_header)\n ? SignedHeader.fromJSON(object.signed_header)\n : undefined,\n validator_set: isSet(object.validator_set)\n ? ValidatorSet.fromJSON(object.validator_set)\n : undefined,\n };\n },\n\n toJSON(message: LightBlock): unknown {\n const obj: any = {};\n message.signed_header !== undefined &&\n (obj.signed_header = message.signed_header\n ? SignedHeader.toJSON(message.signed_header)\n : undefined);\n message.validator_set !== undefined &&\n (obj.validator_set = message.validator_set\n ? ValidatorSet.toJSON(message.validator_set)\n : undefined);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): LightBlock {\n const message = createBaseLightBlock();\n message.signed_header =\n object.signed_header !== undefined && object.signed_header !== null\n ? SignedHeader.fromPartial(object.signed_header)\n : undefined;\n message.validator_set =\n object.validator_set !== undefined && object.validator_set !== null\n ? ValidatorSet.fromPartial(object.validator_set)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseBlockMeta(): BlockMeta {\n return {\n block_id: undefined,\n block_size: \"0\",\n header: undefined,\n num_txs: \"0\",\n };\n}\n\nexport const BlockMeta = {\n encode(\n message: BlockMeta,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.block_id !== undefined) {\n BlockID.encode(message.block_id, writer.uint32(10).fork()).ldelim();\n }\n if (message.block_size !== \"0\") {\n writer.uint32(16).int64(message.block_size);\n }\n if (message.header !== undefined) {\n Header.encode(message.header, writer.uint32(26).fork()).ldelim();\n }\n if (message.num_txs !== \"0\") {\n writer.uint32(32).int64(message.num_txs);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): BlockMeta {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBlockMeta();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.block_id = BlockID.decode(reader, reader.uint32());\n break;\n case 2:\n message.block_size = longToString(reader.int64() as Long);\n break;\n case 3:\n message.header = Header.decode(reader, reader.uint32());\n break;\n case 4:\n message.num_txs = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): BlockMeta {\n return {\n block_id: isSet(object.block_id)\n ? BlockID.fromJSON(object.block_id)\n : undefined,\n block_size: isSet(object.block_size) ? String(object.block_size) : \"0\",\n header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,\n num_txs: isSet(object.num_txs) ? String(object.num_txs) : \"0\",\n };\n },\n\n toJSON(message: BlockMeta): unknown {\n const obj: any = {};\n message.block_id !== undefined &&\n (obj.block_id = message.block_id\n ? BlockID.toJSON(message.block_id)\n : undefined);\n message.block_size !== undefined && (obj.block_size = message.block_size);\n message.header !== undefined &&\n (obj.header = message.header ? Header.toJSON(message.header) : undefined);\n message.num_txs !== undefined && (obj.num_txs = message.num_txs);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): BlockMeta {\n const message = createBaseBlockMeta();\n message.block_id =\n object.block_id !== undefined && object.block_id !== null\n ? BlockID.fromPartial(object.block_id)\n : undefined;\n message.block_size = object.block_size ?? \"0\";\n message.header =\n object.header !== undefined && object.header !== null\n ? Header.fromPartial(object.header)\n : undefined;\n message.num_txs = object.num_txs ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseTxProof(): TxProof {\n return {\n root_hash: new Uint8Array(),\n data: new Uint8Array(),\n proof: undefined,\n };\n}\n\nexport const TxProof = {\n encode(\n message: TxProof,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.root_hash.length !== 0) {\n writer.uint32(10).bytes(message.root_hash);\n }\n if (message.data.length !== 0) {\n writer.uint32(18).bytes(message.data);\n }\n if (message.proof !== undefined) {\n Proof.encode(message.proof, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): TxProof {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTxProof();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.root_hash = reader.bytes();\n break;\n case 2:\n message.data = reader.bytes();\n break;\n case 3:\n message.proof = Proof.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): TxProof {\n return {\n root_hash: isSet(object.root_hash)\n ? bytesFromBase64(object.root_hash)\n : new Uint8Array(),\n data: isSet(object.data)\n ? bytesFromBase64(object.data)\n : new Uint8Array(),\n proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : undefined,\n };\n },\n\n toJSON(message: TxProof): unknown {\n const obj: any = {};\n message.root_hash !== undefined &&\n (obj.root_hash = base64FromBytes(\n message.root_hash !== undefined ? message.root_hash : new Uint8Array(),\n ));\n message.data !== undefined &&\n (obj.data = base64FromBytes(\n message.data !== undefined ? message.data : new Uint8Array(),\n ));\n message.proof !== undefined &&\n (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);\n return obj;\n },\n\n fromPartial, I>>(object: I): TxProof {\n const message = createBaseTxProof();\n message.root_hash = object.root_hash ?? new Uint8Array();\n message.data = object.data ?? new Uint8Array();\n message.proof =\n object.proof !== undefined && object.proof !== null\n ? Proof.fromPartial(object.proof)\n : undefined;\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1_000).toString();\n const nanos = (date.getTime() % 1_000) * 1_000_000;\n return { seconds, nanos };\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1_000;\n millis += t.nanos / 1_000_000;\n return new Date(millis);\n}\n\nfunction fromJsonTimestamp(o: any): Timestamp {\n if (o instanceof Date) {\n return toTimestamp(o);\n } else if (typeof o === \"string\") {\n return toTimestamp(new Date(o));\n } else {\n return Timestamp.fromJSON(o);\n }\n}\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\nimport { PublicKey } from \"../crypto/keys\";\n\nexport const protobufPackage = \"tendermint.types\";\n\nexport interface ValidatorSet {\n validators: Validator[];\n proposer?: Validator;\n total_voting_power: string;\n}\n\nexport interface Validator {\n address: Uint8Array;\n pub_key?: PublicKey;\n voting_power: string;\n proposer_priority: string;\n}\n\nexport interface SimpleValidator {\n pub_key?: PublicKey;\n voting_power: string;\n}\n\nfunction createBaseValidatorSet(): ValidatorSet {\n return { validators: [], proposer: undefined, total_voting_power: \"0\" };\n}\n\nexport const ValidatorSet = {\n encode(\n message: ValidatorSet,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n for (const v of message.validators) {\n Validator.encode(v!, writer.uint32(10).fork()).ldelim();\n }\n if (message.proposer !== undefined) {\n Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim();\n }\n if (message.total_voting_power !== \"0\") {\n writer.uint32(24).int64(message.total_voting_power);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorSet {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidatorSet();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.validators.push(Validator.decode(reader, reader.uint32()));\n break;\n case 2:\n message.proposer = Validator.decode(reader, reader.uint32());\n break;\n case 3:\n message.total_voting_power = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): ValidatorSet {\n return {\n validators: Array.isArray(object?.validators)\n ? object.validators.map((e: any) => Validator.fromJSON(e))\n : [],\n proposer: isSet(object.proposer)\n ? Validator.fromJSON(object.proposer)\n : undefined,\n total_voting_power: isSet(object.total_voting_power)\n ? String(object.total_voting_power)\n : \"0\",\n };\n },\n\n toJSON(message: ValidatorSet): unknown {\n const obj: any = {};\n if (message.validators) {\n obj.validators = message.validators.map((e) =>\n e ? Validator.toJSON(e) : undefined,\n );\n } else {\n obj.validators = [];\n }\n message.proposer !== undefined &&\n (obj.proposer = message.proposer\n ? Validator.toJSON(message.proposer)\n : undefined);\n message.total_voting_power !== undefined &&\n (obj.total_voting_power = message.total_voting_power);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): ValidatorSet {\n const message = createBaseValidatorSet();\n message.validators =\n object.validators?.map((e) => Validator.fromPartial(e)) || [];\n message.proposer =\n object.proposer !== undefined && object.proposer !== null\n ? Validator.fromPartial(object.proposer)\n : undefined;\n message.total_voting_power = object.total_voting_power ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseValidator(): Validator {\n return {\n address: new Uint8Array(),\n pub_key: undefined,\n voting_power: \"0\",\n proposer_priority: \"0\",\n };\n}\n\nexport const Validator = {\n encode(\n message: Validator,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.address.length !== 0) {\n writer.uint32(10).bytes(message.address);\n }\n if (message.pub_key !== undefined) {\n PublicKey.encode(message.pub_key, writer.uint32(18).fork()).ldelim();\n }\n if (message.voting_power !== \"0\") {\n writer.uint32(24).int64(message.voting_power);\n }\n if (message.proposer_priority !== \"0\") {\n writer.uint32(32).int64(message.proposer_priority);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Validator {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValidator();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.address = reader.bytes();\n break;\n case 2:\n message.pub_key = PublicKey.decode(reader, reader.uint32());\n break;\n case 3:\n message.voting_power = longToString(reader.int64() as Long);\n break;\n case 4:\n message.proposer_priority = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Validator {\n return {\n address: isSet(object.address)\n ? bytesFromBase64(object.address)\n : new Uint8Array(),\n pub_key: isSet(object.pub_key)\n ? PublicKey.fromJSON(object.pub_key)\n : undefined,\n voting_power: isSet(object.voting_power)\n ? String(object.voting_power)\n : \"0\",\n proposer_priority: isSet(object.proposer_priority)\n ? String(object.proposer_priority)\n : \"0\",\n };\n },\n\n toJSON(message: Validator): unknown {\n const obj: any = {};\n message.address !== undefined &&\n (obj.address = base64FromBytes(\n message.address !== undefined ? message.address : new Uint8Array(),\n ));\n message.pub_key !== undefined &&\n (obj.pub_key = message.pub_key\n ? PublicKey.toJSON(message.pub_key)\n : undefined);\n message.voting_power !== undefined &&\n (obj.voting_power = message.voting_power);\n message.proposer_priority !== undefined &&\n (obj.proposer_priority = message.proposer_priority);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Validator {\n const message = createBaseValidator();\n message.address = object.address ?? new Uint8Array();\n message.pub_key =\n object.pub_key !== undefined && object.pub_key !== null\n ? PublicKey.fromPartial(object.pub_key)\n : undefined;\n message.voting_power = object.voting_power ?? \"0\";\n message.proposer_priority = object.proposer_priority ?? \"0\";\n return message;\n },\n};\n\nfunction createBaseSimpleValidator(): SimpleValidator {\n return { pub_key: undefined, voting_power: \"0\" };\n}\n\nexport const SimpleValidator = {\n encode(\n message: SimpleValidator,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.pub_key !== undefined) {\n PublicKey.encode(message.pub_key, writer.uint32(10).fork()).ldelim();\n }\n if (message.voting_power !== \"0\") {\n writer.uint32(16).int64(message.voting_power);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): SimpleValidator {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseSimpleValidator();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.pub_key = PublicKey.decode(reader, reader.uint32());\n break;\n case 2:\n message.voting_power = longToString(reader.int64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): SimpleValidator {\n return {\n pub_key: isSet(object.pub_key)\n ? PublicKey.fromJSON(object.pub_key)\n : undefined,\n voting_power: isSet(object.voting_power)\n ? String(object.voting_power)\n : \"0\",\n };\n },\n\n toJSON(message: SimpleValidator): unknown {\n const obj: any = {};\n message.pub_key !== undefined &&\n (obj.pub_key = message.pub_key\n ? PublicKey.toJSON(message.pub_key)\n : undefined);\n message.voting_power !== undefined &&\n (obj.voting_power = message.voting_power);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): SimpleValidator {\n const message = createBaseSimpleValidator();\n message.pub_key =\n object.pub_key !== undefined && object.pub_key !== null\n ? PublicKey.fromPartial(object.pub_key)\n : undefined;\n message.voting_power = object.voting_power ?? \"0\";\n return message;\n },\n};\n\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\") return globalThis;\n if (typeof self !== \"undefined\") return self;\n if (typeof window !== \"undefined\") return window;\n if (typeof global !== \"undefined\") return global;\n throw \"Unable to locate global object\";\n})();\n\nconst atob: (b64: string) => string =\n globalThis.atob ||\n ((b64) => globalThis.Buffer.from(b64, \"base64\").toString(\"binary\"));\nfunction bytesFromBase64(b64: string): Uint8Array {\n const bin = atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n}\n\nconst btoa: (bin: string) => string =\n globalThis.btoa ||\n ((bin) => globalThis.Buffer.from(bin, \"binary\").toString(\"base64\"));\nfunction base64FromBytes(arr: Uint8Array): string {\n const bin: string[] = [];\n for (const byte of arr) {\n bin.push(String.fromCharCode(byte));\n }\n return btoa(bin.join(\"\"));\n}\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport Long from \"long\";\nimport * as _m0 from \"protobufjs/minimal\";\n\nexport const protobufPackage = \"tendermint.version\";\n\n/**\n * App includes the protocol and software version for the application.\n * This information is included in ResponseInfo. The App.Protocol can be\n * updated in ResponseEndBlock.\n */\nexport interface App {\n protocol: string;\n software: string;\n}\n\n/**\n * Consensus captures the consensus rules for processing a block in the blockchain,\n * including all blockchain data structures and the rules of the application's\n * state transition machine.\n */\nexport interface Consensus {\n block: string;\n app: string;\n}\n\nfunction createBaseApp(): App {\n return { protocol: \"0\", software: \"\" };\n}\n\nexport const App = {\n encode(message: App, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.protocol !== \"0\") {\n writer.uint32(8).uint64(message.protocol);\n }\n if (message.software !== \"\") {\n writer.uint32(18).string(message.software);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): App {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseApp();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.protocol = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.software = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): App {\n return {\n protocol: isSet(object.protocol) ? String(object.protocol) : \"0\",\n software: isSet(object.software) ? String(object.software) : \"\",\n };\n },\n\n toJSON(message: App): unknown {\n const obj: any = {};\n message.protocol !== undefined && (obj.protocol = message.protocol);\n message.software !== undefined && (obj.software = message.software);\n return obj;\n },\n\n fromPartial, I>>(object: I): App {\n const message = createBaseApp();\n message.protocol = object.protocol ?? \"0\";\n message.software = object.software ?? \"\";\n return message;\n },\n};\n\nfunction createBaseConsensus(): Consensus {\n return { block: \"0\", app: \"0\" };\n}\n\nexport const Consensus = {\n encode(\n message: Consensus,\n writer: _m0.Writer = _m0.Writer.create(),\n ): _m0.Writer {\n if (message.block !== \"0\") {\n writer.uint32(8).uint64(message.block);\n }\n if (message.app !== \"0\") {\n writer.uint32(16).uint64(message.app);\n }\n return writer;\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): Consensus {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseConsensus();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.block = longToString(reader.uint64() as Long);\n break;\n case 2:\n message.app = longToString(reader.uint64() as Long);\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n\n fromJSON(object: any): Consensus {\n return {\n block: isSet(object.block) ? String(object.block) : \"0\",\n app: isSet(object.app) ? String(object.app) : \"0\",\n };\n },\n\n toJSON(message: Consensus): unknown {\n const obj: any = {};\n message.block !== undefined && (obj.block = message.block);\n message.app !== undefined && (obj.app = message.app);\n return obj;\n },\n\n fromPartial, I>>(\n object: I,\n ): Consensus {\n const message = createBaseConsensus();\n message.block = object.block ?? \"0\";\n message.app = object.app ?? \"0\";\n return message;\n },\n};\n\ntype Builtin =\n | Date\n | Function\n | Uint8Array\n | string\n | number\n | boolean\n | undefined;\n\nexport type DeepPartial = T extends Builtin\n ? T\n : T extends Array\n ? Array>\n : T extends ReadonlyArray\n ? ReadonlyArray>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial }\n : Partial;\n\ntype KeysOfUnion = T extends T ? keyof T : never;\nexport type Exact = P extends Builtin\n ? P\n : P & { [K in keyof P]: Exact } & Record<\n Exclude>,\n never\n >;\n\nfunction longToString(long: Long) {\n return long.toString();\n}\n\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined;\n}\n", "// For future wanderers:\n// This file is written manually with a few goals in mind:\n// 1. Proxy the auto-generated QueryClientImpl from \"src/protobuf/cosmos/auth/v1beta1/query.tx\" (See the \"scripts/generate_protobuf.sh\" script)\n// 2. Convert the \"account: Any\" in the underlying types to the acctual account type\n\nimport {\n BaseAccount,\n ModuleAccount,\n} from \"../grpc_gateway/cosmos/auth/v1beta1/auth.pb\";\nimport {\n Query,\n QueryAccountRequest,\n QueryAccountsRequest,\n QueryParamsRequest,\n QueryParamsResponse,\n} from \"../grpc_gateway/cosmos/auth/v1beta1/query.pb\";\nimport { PageResponse } from \"../grpc_gateway/cosmos/base/query/v1beta1/pagination.pb\";\nimport {\n ContinuousVestingAccount,\n DelayedVestingAccount,\n} from \"../grpc_gateway/cosmos/vesting/v1beta1/vesting.pb\";\nimport { QueryModuleAccountByNameRequest } from \"../protobuf/cosmos/auth/v1beta1/query\";\n\nexport type Account = {\n \"@type\":\n | \"/cosmos.auth.v1beta1.BaseAccount\"\n | \"/cosmos.auth.v1beta1.ModuleAccount\"\n | \"/cosmos.vesting.v1beta1.ContinuousVestingAccount\"\n | \"/cosmos.vesting.v1beta1.DelayedVestingAccount\";\n} & (\n | BaseAccount\n | ModuleAccount\n | ContinuousVestingAccount\n | DelayedVestingAccount\n);\n\n/** AuthQuerier is the query interface for the x/auth module */\nexport class AuthQuerier {\n constructor(private url: string) {}\n\n async accounts(\n req: QueryAccountsRequest,\n headers?: HeadersInit,\n ): Promise<{\n accounts?: Account[];\n pagination?: PageResponse;\n }> {\n //@ts-ignore\n return Query.Accounts(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n async account(\n req: QueryAccountRequest,\n headers?: HeadersInit,\n ): Promise<{ account?: Account }> {\n //@ts-ignore\n return Query.Account(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n async params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n async moduleAccountByName(\n req: QueryModuleAccountByNameRequest,\n headers?: HeadersInit,\n ): Promise<{ account?: Account }> {\n //@ts-ignore\n return Query.ModuleAccountByName(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryGranteeGrantsRequest,\n QueryGranteeGrantsResponse,\n QueryGranterGrantsRequest,\n QueryGranterGrantsResponse,\n QueryGrantsRequest,\n QueryGrantsResponse,\n} from \"../grpc_gateway/cosmos/authz/v1beta1/query.pb\";\n\nexport class AuthzQuerier {\n constructor(private url: string) {}\n\n grants(\n req: QueryGrantsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Grants(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n granterGrants(\n req: QueryGranterGrantsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.GranterGrants(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n granteeGrants(\n req: QueryGranteeGrantsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.GranteeGrants(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryAllBalancesRequest,\n QueryAllBalancesResponse,\n QueryBalanceRequest,\n QueryBalanceResponse,\n QueryDenomMetadataRequest,\n QueryDenomMetadataResponse,\n QueryDenomsMetadataRequest,\n QueryDenomsMetadataResponse,\n QueryParamsRequest,\n QueryParamsResponse,\n QuerySpendableBalancesRequest,\n QuerySpendableBalancesResponse,\n QuerySupplyOfRequest,\n QuerySupplyOfResponse,\n QueryTotalSupplyRequest,\n QueryTotalSupplyResponse,\n} from \"../grpc_gateway/cosmos/bank/v1beta1/query.pb\";\n\nexport class BankQuerier {\n constructor(private url: string) {}\n\n balance(\n req: QueryBalanceRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Balance(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n allBalances(\n req: QueryAllBalancesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.AllBalances(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n spendableBalances(\n req: QuerySpendableBalancesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.SpendableBalances(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n totalSupply(\n req: QueryTotalSupplyRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.TotalSupply(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n supplyOf(\n req: QuerySupplyOfRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.SupplyOf(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n denomMetadata(\n req: QueryDenomMetadataRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DenomMetadata(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n denomsMetadata(\n req: QueryDenomsMetadataRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DenomsMetadata(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "// For future wanderers:\n// This file is written manually with a few goals in mind:\n// 1. Proxy the auto-generated QueryClientImpl from \"src/protobuf/secret/compute/v1beta1/query.tx\" (See the \"scripts/generate_protobuf.sh\" script)\n// 2. Abstract \"address: Uint8Array\" in the underlying types as \"address: string\".\n// 3. Add Secret Network encryption\n\nimport { fromBase64, fromUtf8 } from \"@cosmjs/encoding\";\nimport { getMissingCodeHashWarning } from \"..\";\nimport { EncryptionUtils, EncryptionUtilsImpl } from \"../encryption\";\nimport { Empty } from \"../grpc_gateway/google/protobuf/empty.pb\";\nimport {\n Query,\n QueryByCodeIdRequest,\n QueryByContractAddressRequest,\n QueryByLabelRequest,\n QueryCodeHashResponse,\n QueryCodeResponse,\n QueryCodesResponse,\n QueryContractAddressResponse,\n QueryContractHistoryRequest,\n QueryContractInfoResponse,\n QueryContractLabelResponse,\n QueryContractsByCodeIdResponse,\n} from \"../grpc_gateway/secret/compute/v1beta1/query.pb\";\nimport {\n AbsoluteTxPosition,\n ContractCodeHistoryOperationType,\n} from \"../grpc_gateway/secret/compute/v1beta1/types.pb\";\n\nexport type QueryContractRequest = {\n /** The address of the contract */\n contract_address: string;\n /** The SHA256 hash value of the contract's WASM bytecode, represented as case-insensitive 64\n * character hex string.\n * This is used to make sure only the contract that's being invoked can decrypt the query data.\n *\n * code_hash is an optional parameter but using it will result in way faster execution time.\n *\n * Valid examples:\n * - \"af74387e276be8874f07bec3a87023ee49b0e7ebe08178c49d0a49c3c98ed60e\"\n * - \"0xaf74387e276be8874f07bec3a87023ee49b0e7ebe08178c49d0a49c3c98ed60e\"\n * - \"AF74387E276BE8874F07BEC3A87023EE49B0E7EBE08178C49D0A49C3C98ED60E\"\n * - \"0xAF74387E276BE8874F07BEC3A87023EE49B0E7EBE08178C49D0A49C3C98ED60E\"\n */\n code_hash?: string;\n /** A JSON object that will be passed to the contract as a query */\n query: T;\n};\n\nexport type ContractCodeHistoryEntry = {\n operation: ContractCodeHistoryOperationType;\n code_id: string;\n updated: AbsoluteTxPosition;\n msg: string;\n};\n\nexport class ComputeQuerier {\n private codeHashCache = new Map();\n\n constructor(private url: string, private encryption?: EncryptionUtils) {\n if (!this.encryption) {\n this.encryption = new EncryptionUtilsImpl(url);\n }\n }\n\n contractInfo(\n req: QueryByContractAddressRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ContractInfo(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n contractsByCodeId(\n req: QueryByCodeIdRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ContractsByCodeId(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n code(\n req: QueryByCodeIdRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Code(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n codes(req: Empty, headers?: HeadersInit): Promise {\n return Query.Codes(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n async codeHashByContractAddress(\n req: QueryByContractAddressRequest,\n headers?: HeadersInit,\n ): Promise {\n let code_hash = this.codeHashCache.get(req.contract_address!);\n\n if (!code_hash) {\n ({ code_hash } = await Query.CodeHashByContractAddress(req, {\n headers,\n pathPrefix: this.url,\n }));\n\n this.codeHashCache.set(req.contract_address!, code_hash!);\n }\n\n return { code_hash };\n }\n\n async codeHashByCodeId(\n req: QueryByCodeIdRequest,\n headers?: HeadersInit,\n ): Promise {\n let code_hash = this.codeHashCache.get(req.code_id!);\n\n if (!code_hash) {\n ({ code_hash } = await Query.CodeHashByCodeId(\n { code_id: req.code_id },\n {\n headers,\n pathPrefix: this.url,\n },\n ));\n\n this.codeHashCache.set(req.code_id!, code_hash!);\n }\n\n return { code_hash };\n }\n\n labelByAddress(\n req: QueryByContractAddressRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.LabelByAddress(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n addressByLabel(\n req: QueryByLabelRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.AddressByLabel(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n /**\n * Query a Secret Contract.\n * May return a string on error.\n */\n async queryContract(\n {\n contract_address: contractAddress,\n code_hash: codeHash,\n query,\n }: QueryContractRequest,\n headers?: HeadersInit,\n ): Promise {\n if (!codeHash) {\n console.warn(getMissingCodeHashWarning(\"queryContract()\"));\n ({ code_hash: codeHash } = await this.codeHashByContractAddress({\n contract_address: contractAddress,\n }));\n }\n codeHash = codeHash!.replace(\"0x\", \"\").toLowerCase();\n\n const encryptedQuery = await this.encryption!.encrypt(codeHash, query);\n const nonce = encryptedQuery.slice(0, 32);\n\n try {\n const { data: encryptedResult } = await Query.QuerySecretContract(\n {\n contract_address: contractAddress,\n query: encryptedQuery,\n },\n {\n headers,\n pathPrefix: this.url,\n },\n );\n\n const decryptedBase64Result = await this.encryption!.decrypt(\n fromBase64(encryptedResult as unknown as string)!,\n nonce,\n );\n\n // Don't try to parse JSON in case the result is empty.\n // This seems kinda stupid but if the contract for some reason returns `Binary::default()`\n // the JSON parsing will fail (empty bytes)\n if (!decryptedBase64Result?.length) {\n return {} as R;\n }\n\n return JSON.parse(fromUtf8(fromBase64(fromUtf8(decryptedBase64Result))));\n } catch (err) {\n try {\n const errorMessageRgx =\n /encrypted: (.+?): (?:instantiate|execute|query|reply to|migrate) contract failed/g;\n const rgxMatches = errorMessageRgx.exec(err.message);\n if (rgxMatches == null || rgxMatches?.length != 2) {\n throw err;\n }\n\n const encryptedError = fromBase64(rgxMatches[1]);\n\n const decryptedBase64Error = await this.encryption!.decrypt(\n encryptedError,\n nonce,\n );\n\n try {\n //@ts-ignore\n // return the error string\n return fromUtf8(fromBase64(fromUtf8(decryptedBase64Error)));\n } catch (parseError) {\n if (parseError.message === \"Invalid base64 string format\") {\n //@ts-ignore\n // return the error string\n return fromUtf8(decryptedBase64Error);\n } else {\n throw err;\n }\n }\n } catch (decryptionError) {\n throw err;\n }\n }\n }\n\n async contractHistory(\n req: QueryContractHistoryRequest,\n headers?: HeadersInit,\n ): Promise<{ entries: ContractCodeHistoryEntry[] }> {\n const { entries } = await Query.ContractHistory(req, {\n headers,\n pathPrefix: this.url,\n });\n\n let decryptedEntries: ContractCodeHistoryEntry[] = [];\n for (const entry of entries ?? []) {\n let msg = entry.msg as unknown as string;\n try {\n const encryptedInput = fromBase64(msg);\n const nonce = encryptedInput.slice(0, 32);\n const encryptedInitMsg = encryptedInput.slice(64);\n\n const plaintextInitMsg = await this.encryption!.decrypt(\n encryptedInitMsg,\n nonce,\n );\n msg = fromUtf8(plaintextInitMsg).slice(64);\n } catch (err) {}\n\n decryptedEntries.push({\n operation: entry.operation!,\n code_id: entry.code_id!,\n updated: entry.updated!,\n msg,\n });\n }\n\n return { entries: decryptedEntries };\n }\n}\n", "import {\n Query,\n QueryCommunityPoolRequest,\n QueryCommunityPoolResponse,\n QueryDelegationRewardsRequest,\n QueryDelegationRewardsResponse,\n QueryDelegationTotalRewardsRequest,\n QueryDelegationTotalRewardsResponse,\n QueryDelegatorValidatorsRequest,\n QueryDelegatorValidatorsResponse,\n QueryDelegatorWithdrawAddressRequest,\n QueryDelegatorWithdrawAddressResponse,\n QueryFoundationTaxRequest,\n QueryFoundationTaxResponse,\n QueryParamsRequest,\n QueryParamsResponse,\n QueryRestakeEntriesRequest,\n QueryRestakingEntriesResponse,\n QueryRestakeThresholdRequest,\n QueryRestakeThresholdResponse,\n QueryValidatorCommissionRequest,\n QueryValidatorCommissionResponse,\n QueryValidatorOutstandingRewardsRequest,\n QueryValidatorOutstandingRewardsResponse,\n QueryValidatorSlashesRequest,\n QueryValidatorSlashesResponse,\n} from \"../grpc_gateway/cosmos/distribution/v1beta1/query.pb\";\n\nexport class DistributionQuerier {\n constructor(private url: string) {}\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n validatorOutstandingRewards(\n req: QueryValidatorOutstandingRewardsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ValidatorOutstandingRewards(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n validatorCommission(\n req: QueryValidatorCommissionRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ValidatorCommission(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n validatorSlashes(\n req: QueryValidatorSlashesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ValidatorSlashes(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegationRewards(\n req: QueryDelegationRewardsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DelegationRewards(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegationTotalRewards(\n req: QueryDelegationTotalRewardsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DelegationTotalRewards(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegatorValidators(\n req: QueryDelegatorValidatorsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DelegatorValidators(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegatorWithdrawAddress(\n req: QueryDelegatorWithdrawAddressRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DelegatorWithdrawAddress(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n communityPool(\n req: QueryCommunityPoolRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.CommunityPool(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n foundationTax(\n req: QueryFoundationTaxRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.FoundationTax(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n restakeThreshold(\n req: QueryRestakeThresholdRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.RestakeThreshold(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n restakingEntries(\n req: QueryRestakeEntriesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.RestakingEntries(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n ParamsRequest,\n ParamsResponse,\n} from \"../grpc_gateway/secret/emergencybutton/v1beta1/query.pb\";\n\nexport class EmergencyButtonQuerier {\n constructor(private url: string) {}\n\n params(\n req: ParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryAllEvidenceRequest,\n QueryAllEvidenceResponse,\n QueryEvidenceRequest,\n QueryEvidenceResponse,\n} from \"../grpc_gateway/cosmos/evidence/v1beta1/query.pb\";\n\nexport class EvidenceQuerier {\n constructor(private url: string) {}\n\n evidence(\n req: QueryEvidenceRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Evidence(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n allEvidence(\n req: QueryAllEvidenceRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.AllEvidence(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryAllowanceRequest,\n QueryAllowanceResponse,\n QueryAllowancesByGranterRequest,\n QueryAllowancesByGranterResponse,\n QueryAllowancesRequest,\n QueryAllowancesResponse,\n} from \"../grpc_gateway/cosmos/feegrant/v1beta1/query.pb\";\n\nexport class FeegrantQuerier {\n constructor(private url: string) {}\n\n allowance(\n req: QueryAllowanceRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Allowance(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n allowances(\n req: QueryAllowancesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Allowances(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n allowancesByGranter(\n req: QueryAllowancesByGranterRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.AllowancesByGranter(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryDepositRequest,\n QueryDepositResponse,\n QueryDepositsRequest,\n QueryDepositsResponse,\n QueryParamsRequest,\n QueryParamsResponse,\n QueryProposalRequest,\n QueryProposalResponse,\n QueryProposalsRequest,\n QueryProposalsResponse,\n QueryTallyResultRequest,\n QueryTallyResultResponse,\n QueryVoteRequest,\n QueryVoteResponse,\n QueryVotesRequest,\n QueryVotesResponse,\n} from \"../grpc_gateway/cosmos/gov/v1beta1/query.pb\";\n\nexport class GovQuerier {\n constructor(private url: string) {}\n\n proposal(\n req: QueryProposalRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Proposal(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n proposals(\n req: QueryProposalsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Proposals(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n vote(\n req: QueryVoteRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Vote(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n votes(\n req: QueryVotesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Votes(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n deposit(\n req: QueryDepositRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Deposit(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n deposits(\n req: QueryDepositsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Deposits(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n tallyResult(\n req: QueryTallyResultRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.TallyResult(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryChannelClientStateRequest,\n QueryChannelClientStateResponse,\n QueryChannelConsensusStateRequest,\n QueryChannelConsensusStateResponse,\n QueryChannelRequest,\n QueryChannelResponse,\n QueryChannelsRequest,\n QueryChannelsResponse,\n QueryConnectionChannelsRequest,\n QueryConnectionChannelsResponse,\n QueryNextSequenceReceiveRequest,\n QueryNextSequenceReceiveResponse,\n QueryPacketAcknowledgementRequest,\n QueryPacketAcknowledgementResponse,\n QueryPacketAcknowledgementsRequest,\n QueryPacketAcknowledgementsResponse,\n QueryPacketCommitmentRequest,\n QueryPacketCommitmentResponse,\n QueryPacketCommitmentsRequest,\n QueryPacketCommitmentsResponse,\n QueryPacketReceiptRequest,\n QueryPacketReceiptResponse,\n QueryUnreceivedAcksRequest,\n QueryUnreceivedAcksResponse,\n QueryUnreceivedPacketsRequest,\n QueryUnreceivedPacketsResponse,\n} from \"../grpc_gateway/ibc/core/channel/v1/query.pb\";\n\nexport class IbcChannelQuerier {\n constructor(private url: string) {}\n\n channel(\n req: QueryChannelRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Channel(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n channels(\n req: QueryChannelsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Channels(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n connectionChannels(\n req: QueryConnectionChannelsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ConnectionChannels(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n channelClientState(\n req: QueryChannelClientStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ChannelClientState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n channelConsensusState(\n req: QueryChannelConsensusStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ChannelConsensusState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n packetCommitment(\n req: QueryPacketCommitmentRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.PacketCommitment(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n packetCommitments(\n req: QueryPacketCommitmentsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.PacketCommitments(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n packetReceipt(\n req: QueryPacketReceiptRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.PacketReceipt(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n packetAcknowledgement(\n req: QueryPacketAcknowledgementRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.PacketAcknowledgement(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n packetAcknowledgements(\n req: QueryPacketAcknowledgementsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.PacketAcknowledgements(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n unreceivedPackets(\n req: QueryUnreceivedPacketsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.UnreceivedPackets(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n unreceivedAcks(\n req: QueryUnreceivedAcksRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.UnreceivedAcks(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n nextSequenceReceive(\n req: QueryNextSequenceReceiveRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.NextSequenceReceive(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryClientParamsRequest,\n QueryClientParamsResponse,\n QueryClientStateRequest,\n QueryClientStateResponse,\n QueryClientStatesRequest,\n QueryClientStatesResponse,\n QueryClientStatusRequest,\n QueryClientStatusResponse,\n QueryConsensusStateHeightsRequest,\n QueryConsensusStateHeightsResponse,\n QueryConsensusStateRequest,\n QueryConsensusStateResponse,\n QueryConsensusStatesRequest,\n QueryConsensusStatesResponse,\n QueryUpgradedClientStateRequest,\n QueryUpgradedClientStateResponse,\n QueryUpgradedConsensusStateRequest,\n QueryUpgradedConsensusStateResponse,\n} from \"../grpc_gateway/ibc/core/client/v1/query.pb\";\n\nexport class IbcClientQuerier {\n constructor(private url: string) {}\n\n clientState(\n req: QueryClientStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ClientState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n clientStates(\n req: QueryClientStatesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ClientStates(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n consensusState(\n req: QueryConsensusStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ConsensusState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n consensusStates(\n req: QueryConsensusStatesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ConsensusStates(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n clientStatus(\n req: QueryClientStatusRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ClientStatus(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n clientParams(\n req: QueryClientParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ClientParams(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n upgradedClientState(\n req: QueryUpgradedClientStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.UpgradedClientState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n upgradedConsensusState(\n req: QueryUpgradedConsensusStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.UpgradedConsensusState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n consensusStateHeights(\n req: QueryConsensusStateHeightsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ConsensusStateHeights(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryClientConnectionsRequest,\n QueryClientConnectionsResponse,\n QueryConnectionClientStateRequest,\n QueryConnectionClientStateResponse,\n QueryConnectionConsensusStateRequest,\n QueryConnectionConsensusStateResponse,\n QueryConnectionRequest,\n QueryConnectionResponse,\n QueryConnectionsRequest,\n QueryConnectionsResponse,\n} from \"../grpc_gateway/ibc/core/connection/v1/query.pb\";\n\nexport class IbcConnectionQuerier {\n constructor(private url: string) {}\n\n connection(\n req: QueryConnectionRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Connection(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n connections(\n req: QueryConnectionsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Connections(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n clientConnections(\n req: QueryClientConnectionsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ClientConnections(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n connectionClientState(\n req: QueryConnectionClientStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ConnectionClientState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n connectionConsensusState(\n req: QueryConnectionConsensusStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ConnectionConsensusState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryIncentivizedPacketsRequest,\n QueryIncentivizedPacketsResponse,\n QueryIncentivizedPacketRequest,\n QueryIncentivizedPacketResponse,\n QueryIncentivizedPacketsForChannelRequest,\n QueryIncentivizedPacketsForChannelResponse,\n QueryTotalRecvFeesRequest,\n QueryTotalRecvFeesResponse,\n QueryTotalAckFeesRequest,\n QueryTotalAckFeesResponse,\n QueryTotalTimeoutFeesRequest,\n QueryTotalTimeoutFeesResponse,\n QueryPayeeRequest,\n QueryPayeeResponse,\n QueryCounterpartyPayeeRequest,\n QueryCounterpartyPayeeResponse,\n QueryFeeEnabledChannelsRequest,\n QueryFeeEnabledChannelsResponse,\n QueryFeeEnabledChannelRequest,\n QueryFeeEnabledChannelResponse,\n} from \"../grpc_gateway/ibc/applications/fee/v1/query.pb\";\n\nexport class IbcFeeQuerier {\n constructor(private url: string) {}\n\n incentivizedPackets(\n req: QueryIncentivizedPacketsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.IncentivizedPackets(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n incentivizedPacket(\n req: QueryIncentivizedPacketRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.IncentivizedPacket(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n incentivizedPacketsForChannel(\n req: QueryIncentivizedPacketsForChannelRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.IncentivizedPacketsForChannel(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n totalRecvFees(\n req: QueryTotalRecvFeesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.TotalRecvFees(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n totalAckFees(\n req: QueryTotalAckFeesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.TotalAckFees(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n totalTimeoutFees(\n req: QueryTotalTimeoutFeesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.TotalTimeoutFees(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n payee(\n req: QueryPayeeRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Payee(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n counterpartyPayee(\n req: QueryCounterpartyPayeeRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.CounterpartyPayee(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n feeEnabledChannels(\n req: QueryFeeEnabledChannelsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.FeeEnabledChannels(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n feeEnabledChannel(\n req: QueryFeeEnabledChannelRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.FeeEnabledChannel(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryInterchainAccountRequest,\n QueryInterchainAccountResponse,\n QueryParamsRequest,\n QueryParamsResponse,\n} from \"../grpc_gateway/ibc/applications/interchain_accounts/controller/v1/query.pb\";\n\nexport class IbcInterchainAccountsControllerQuerier {\n constructor(private url: string) {}\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n interchainAccount(\n req: QueryInterchainAccountRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.InterchainAccount(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryParamsRequest,\n QueryParamsResponse,\n} from \"../grpc_gateway/ibc/applications/interchain_accounts/host/v1/query.pb\";\n\nexport class IbcInterchainAccountsHostQuerier {\n constructor(private url: string) {}\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryParamsRequest,\n QueryParamsResponse,\n} from \"../grpc_gateway/ibc/applications/packetforward/v1/query.pb\";\n\nexport class IbcPacketForwardQuerier {\n constructor(private url: string) {}\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n QueryDenomHashRequest,\n QueryDenomHashResponse,\n QueryDenomTraceRequest,\n QueryDenomTraceResponse,\n QueryDenomTracesRequest,\n QueryDenomTracesResponse,\n QueryParamsRequest,\n QueryParamsResponse,\n Query,\n QueryEscrowAddressRequest,\n QueryEscrowAddressResponse,\n} from \"../grpc_gateway/ibc/applications/transfer/v1/query.pb\";\n\nexport class IbcTransferQuerier {\n constructor(private url: string) {}\n\n denomTrace(\n req: QueryDenomTraceRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DenomTrace(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n denomTraces(\n req: QueryDenomTracesRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DenomTraces(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n denomHash(\n req: QueryDenomHashRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DenomHash(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n escrowAddress(\n req: QueryEscrowAddressRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.EscrowAddress(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "// ls | sort | grep -v index | awk -F \\. '{print \"export * from \\\"./\" $1 \"\\\";\"}' > index.t\n\nexport * from \"./auth\";\nexport * from \"./authz\";\nexport * from \"./bank\";\nexport * from \"./compute\";\nexport * from \"./distribution\";\nexport * from \"./evidence\";\nexport * from \"./feegrant\";\nexport * from \"./gov\";\nexport * from \"./ibc_channel\";\nexport * from \"./ibc_client\";\nexport * from \"./ibc_connection\";\nexport * from \"./ibc_transfer\";\nexport * from \"./mauth\";\nexport * from \"./mint\";\nexport * from \"./node\";\nexport * from \"./params\";\nexport * from \"./registration\";\nexport * from \"./slashing\";\nexport * from \"./staking\";\nexport * from \"./tendermint\";\nexport * from \"./upgrade\";\nexport * from \"./emergency_button\";\n", "import {\n Query,\n QueryInterchainAccountFromAddressRequest,\n QueryInterchainAccountFromAddressResponse,\n} from \"../grpc_gateway/secret/intertx/v1beta1/query.pb\";\n\nexport class MauthQuerier {\n constructor(private url: string) {}\n\n interchainAccountFromAddress(\n req: QueryInterchainAccountFromAddressRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.InterchainAccountFromAddress(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryAnnualProvisionsRequest,\n QueryAnnualProvisionsResponse,\n QueryInflationRequest,\n QueryInflationResponse,\n QueryParamsRequest,\n QueryParamsResponse,\n} from \"../grpc_gateway/cosmos/mint/v1beta1/query.pb\";\n\nexport class MintQuerier {\n constructor(private url: string) {}\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n inflation(\n req: QueryInflationRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Inflation(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n annualProvisions(\n req: QueryAnnualProvisionsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.AnnualProvisions(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Service,\n ConfigRequest,\n ConfigResponse,\n} from \"../grpc_gateway/cosmos/base/node/v1beta1/query.pb\";\n\nexport class NodeQuerier {\n constructor(private url: string) {}\n\n config(req: ConfigRequest, headers?: HeadersInit): Promise {\n return Service.Config(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryParamsRequest,\n QueryParamsResponse,\n} from \"../grpc_gateway/cosmos/params/v1beta1/query.pb\";\n\nexport class ParamsQuerier {\n constructor(private url: string) {}\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import { Empty } from \"../grpc_gateway/google/protobuf/empty.pb\";\nimport { Key } from \"../grpc_gateway/secret/registration/v1beta1/msg.pb\";\nimport {\n Query,\n QueryEncryptedSeedRequest,\n QueryEncryptedSeedResponse,\n} from \"../grpc_gateway/secret/registration/v1beta1/query.pb\";\n\nexport class RegistrationQuerier {\n constructor(private url: string) {}\n\n txKey(req: Empty, headers?: HeadersInit): Promise {\n return Query.TxKey(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n registrationKey(req: Empty, headers?: HeadersInit): Promise {\n return Query.RegistrationKey(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n encryptedSeed(\n req: QueryEncryptedSeedRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.EncryptedSeed(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryParamsRequest,\n QueryParamsResponse,\n QuerySigningInfoRequest,\n QuerySigningInfoResponse,\n QuerySigningInfosRequest,\n QuerySigningInfosResponse,\n} from \"../grpc_gateway/cosmos/slashing/v1beta1/query.pb\";\n\nexport class SlashingQuerier {\n constructor(private url: string) {}\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n signingInfo(\n req: QuerySigningInfoRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.SigningInfo(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n signingInfos(\n req: QuerySigningInfosRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.SigningInfos(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryDelegationRequest,\n QueryDelegationResponse,\n QueryDelegatorDelegationsRequest,\n QueryDelegatorDelegationsResponse,\n QueryDelegatorUnbondingDelegationsRequest,\n QueryDelegatorUnbondingDelegationsResponse,\n QueryDelegatorValidatorRequest,\n QueryDelegatorValidatorResponse,\n QueryDelegatorValidatorsRequest,\n QueryDelegatorValidatorsResponse,\n QueryHistoricalInfoRequest,\n QueryHistoricalInfoResponse,\n QueryParamsRequest,\n QueryParamsResponse,\n QueryPoolRequest,\n QueryPoolResponse,\n QueryRedelegationsRequest,\n QueryRedelegationsResponse,\n QueryUnbondingDelegationRequest,\n QueryUnbondingDelegationResponse,\n QueryValidatorDelegationsRequest,\n QueryValidatorDelegationsResponse,\n QueryValidatorRequest,\n QueryValidatorResponse,\n QueryValidatorsRequest,\n QueryValidatorsResponse,\n QueryValidatorUnbondingDelegationsRequest,\n QueryValidatorUnbondingDelegationsResponse,\n} from \"../grpc_gateway/cosmos/staking/v1beta1/query.pb\";\n\nexport class StakingQuerier {\n constructor(private url: string) {}\n\n validators(\n req: QueryValidatorsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Validators(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n validator(\n req: QueryValidatorRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Validator(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n validatorDelegations(\n req: QueryValidatorDelegationsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ValidatorDelegations(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n validatorUnbondingDelegations(\n req: QueryValidatorUnbondingDelegationsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ValidatorUnbondingDelegations(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegation(\n req: QueryDelegationRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Delegation(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n unbondingDelegation(\n req: QueryUnbondingDelegationRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.UnbondingDelegation(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegatorDelegations(\n req: QueryDelegatorDelegationsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DelegatorDelegations(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegatorUnbondingDelegations(\n req: QueryDelegatorUnbondingDelegationsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DelegatorUnbondingDelegations(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n redelegations(\n req: QueryRedelegationsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Redelegations(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegatorValidators(\n req: QueryDelegatorValidatorsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DelegatorValidators(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n delegatorValidator(\n req: QueryDelegatorValidatorRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.DelegatorValidator(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n historicalInfo(\n req: QueryHistoricalInfoRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.HistoricalInfo(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n pool(\n req: QueryPoolRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Pool(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n params(\n req: QueryParamsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.Params(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n GetBlockByHeightRequest,\n GetBlockByHeightResponse,\n GetLatestBlockRequest,\n GetLatestBlockResponse,\n GetLatestValidatorSetRequest,\n GetLatestValidatorSetResponse,\n GetNodeInfoRequest,\n GetNodeInfoResponse,\n GetSyncingRequest,\n GetSyncingResponse,\n GetValidatorSetByHeightRequest,\n GetValidatorSetByHeightResponse,\n Service,\n} from \"../grpc_gateway/cosmos/base/tendermint/v1beta1/query.pb\";\n\nexport class TendermintQuerier {\n constructor(private url: string) {}\n\n getNodeInfo(\n req: GetNodeInfoRequest,\n headers?: HeadersInit,\n ): Promise {\n return Service.GetNodeInfo(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n getSyncing(\n req: GetSyncingRequest,\n headers?: HeadersInit,\n ): Promise {\n return Service.GetSyncing(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n getLatestBlock(\n req: GetLatestBlockRequest,\n headers?: HeadersInit,\n ): Promise {\n return Service.GetLatestBlock(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n getBlockByHeight(\n req: GetBlockByHeightRequest,\n headers?: HeadersInit,\n ): Promise {\n return Service.GetBlockByHeight(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n getLatestValidatorSet(\n req: GetLatestValidatorSetRequest,\n headers?: HeadersInit,\n ): Promise {\n return Service.GetLatestValidatorSet(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n getValidatorSetByHeight(\n req: GetValidatorSetByHeightRequest,\n headers?: HeadersInit,\n ): Promise {\n return Service.GetValidatorSetByHeight(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "import {\n Query,\n QueryAppliedPlanRequest,\n QueryAppliedPlanResponse,\n QueryCurrentPlanRequest,\n QueryCurrentPlanResponse,\n QueryModuleVersionsRequest,\n QueryModuleVersionsResponse,\n QueryUpgradedConsensusStateRequest,\n QueryUpgradedConsensusStateResponse,\n} from \"../grpc_gateway/cosmos/upgrade/v1beta1/query.pb\";\n\nexport class UpgradeQuerier {\n constructor(private url: string) {}\n\n currentPlan(\n req: QueryCurrentPlanRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.CurrentPlan(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n appliedPlan(\n req: QueryAppliedPlanRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.AppliedPlan(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n upgradedConsensusState(\n req: QueryUpgradedConsensusStateRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.UpgradedConsensusState(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n\n moduleVersions(\n req: QueryModuleVersionsRequest,\n headers?: HeadersInit,\n ): Promise {\n return Query.ModuleVersions(req, {\n headers,\n pathPrefix: this.url,\n });\n }\n}\n", "// conditinally load cross-fetch for nodejs and react-native\nif (typeof window === \"undefined\" || typeof window.fetch === \"undefined\") {\n const fetch = require(\"cross-fetch\");\n global.fetch = fetch;\n}\n\nimport {\n fromBase64,\n fromHex,\n fromUtf8,\n toBase64,\n toHex,\n} from \"@cosmjs/encoding\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport {\n Coin,\n MauthQuerier,\n MsgBeginRedelegate,\n MsgBeginRedelegateParams,\n MsgCreateValidator,\n MsgCreateValidatorParams,\n MsgDelegate,\n MsgDelegateParams,\n MsgDeposit,\n MsgDepositParams,\n MsgEditValidator,\n MsgEditValidatorParams,\n MsgExec,\n MsgExecParams,\n MsgExecuteContract,\n MsgExecuteContractParams,\n MsgFundCommunityPool,\n MsgFundCommunityPoolParams,\n MsgGrant,\n MsgGrantAllowance,\n MsgGrantAllowanceParams,\n MsgGrantParams,\n MsgInstantiateContract,\n MsgInstantiateContractParams,\n MsgMultiSend,\n MsgMultiSendParams,\n MsgRevoke,\n MsgRevokeAllowance,\n MsgRevokeAllowanceParams,\n MsgRevokeParams,\n MsgSend,\n MsgSendParams,\n MsgSetWithdrawAddress,\n MsgSetWithdrawAddressParams,\n MsgSnip721AddMinter,\n MsgSnip721Mint,\n MsgStoreCode,\n MsgStoreCodeParams,\n MsgSubmitEvidence,\n MsgSubmitEvidenceParams,\n MsgSubmitProposal,\n MsgSubmitProposalParams,\n MsgTransfer,\n MsgTransferParams,\n MsgUndelegate,\n MsgUndelegateParams,\n MsgUnjail,\n MsgUnjailParams,\n MsgUpdateAdminParams,\n MsgVerifyInvariant,\n MsgVote,\n MsgVoteParams,\n MsgVoteWeighted,\n MsgVoteWeightedParams,\n MsgWithdrawDelegatorReward,\n MsgWithdrawDelegatorRewardParams,\n MsgWithdrawValidatorCommission,\n MsgWithdrawValidatorCommissionParams,\n NodeQuerier,\n StdSignature,\n bytesToAddress,\n} from \".\";\nimport { EncryptionUtils, EncryptionUtilsImpl } from \"./encryption\";\nimport { PermitSigner } from \"./extensions/access_control/permit/permit_signer\";\nimport {\n MsgCreateViewingKey,\n MsgSetViewingKey,\n} from \"./extensions/access_control/viewing_key/msgs\";\nimport {\n CreateViewingKeyContractParams,\n SetViewingKeyContractParams,\n} from \"./extensions/access_control/viewing_key/params\";\nimport { Snip1155Querier } from \"./extensions/snip1155/query\";\nimport {\n MsgSnip1155AddCurator,\n MsgSnip1155BatchSend,\n MsgSnip1155BatchTransfer,\n MsgSnip1155Burn,\n MsgSnip1155ChangeAdmin,\n MsgSnip1155ChangeMetadata,\n MsgSnip1155CurateTokens,\n MsgSnip1155Mint,\n MsgSnip1155RemoveAdmin,\n MsgSnip1155RemoveCurator,\n MsgSnip1155RemoveMinter,\n MsgSnip1155Send,\n MsgSnip1155Transfer,\n MsgSnipAddMinter,\n} from \"./extensions/snip1155/tx\";\nimport {\n Snip1155AddCuratorOptions,\n Snip1155AddMinterOptions,\n Snip1155BatchSendOptions,\n Snip1155BatchTransferOptions,\n Snip1155BurnTokensOptions,\n Snip1155ChangeAdminOptions,\n Snip1155ChangeMetaDataOptions,\n Snip1155CurateTokensOptions,\n Snip1155MintTokensOptions,\n Snip1155RemoveAdminOptions,\n Snip1155RemoveCuratorOptions,\n Snip1155RemoveMinterOptions,\n Snip1155SendOptions,\n Snip1155TransferOptions,\n} from \"./extensions/snip1155/types\";\nimport {\n MsgSnip20DecreaseAllowance,\n MsgSnip20IncreaseAllowance,\n MsgSnip20Send,\n MsgSnip20Transfer,\n Snip20Querier,\n} from \"./extensions/snip20\";\nimport {\n Snip20DecreaseAllowanceOptions,\n Snip20IncreaseAllowanceOptions,\n Snip20SendOptions,\n Snip20TransferOptions,\n} from \"./extensions/snip20/types\";\nimport { MsgSnip721Send, Snip721Querier } from \"./extensions/snip721\";\nimport {\n Snip721AddMinterOptions,\n Snip721MintOptions,\n Snip721SendOptions,\n} from \"./extensions/snip721/types\";\nimport {\n BaseAccount,\n ModuleAccount,\n} from \"./grpc_gateway/cosmos/auth/v1beta1/auth.pb\";\nimport { TxResponse as TxResponsePb } from \"./grpc_gateway/cosmos/base/abci/v1beta1/abci.pb\";\nimport { PageRequest } from \"./grpc_gateway/cosmos/base/query/v1beta1/pagination.pb\";\nimport {\n OrderBy,\n SimulateResponse,\n Service as TxService,\n} from \"./grpc_gateway/cosmos/tx/v1beta1/service.pb\";\nimport { Tx as TxPb } from \"./grpc_gateway/cosmos/tx/v1beta1/tx.pb\";\nimport {\n ContinuousVestingAccount,\n DelayedVestingAccount,\n} from \"./grpc_gateway/cosmos/vesting/v1beta1/vesting.pb\";\nimport { TxMsgData } from \"./protobuf/cosmos/base/abci/v1beta1/abci\";\nimport { LegacyAminoPubKey } from \"./protobuf/cosmos/crypto/multisig/keys\";\nimport { PubKey } from \"./protobuf/cosmos/crypto/secp256k1/keys\";\nimport {\n AuthInfo,\n SignDoc,\n TxBody as TxBodyPb,\n TxRaw,\n} from \"./protobuf/cosmos/tx/v1beta1/tx\";\nimport { Any } from \"./protobuf/google/protobuf/any\";\nimport {\n MsgExecuteContractResponse,\n MsgInstantiateContractResponse,\n MsgMigrateContractResponse,\n} from \"./protobuf/secret/compute/v1beta1/msg\";\nimport { AuthQuerier } from \"./query/auth\";\nimport { AuthzQuerier } from \"./query/authz\";\nimport { BankQuerier } from \"./query/bank\";\nimport { ComputeQuerier } from \"./query/compute\";\nimport { DistributionQuerier } from \"./query/distribution\";\nimport { EmergencyButtonQuerier } from \"./query/emergency_button\";\nimport { EvidenceQuerier } from \"./query/evidence\";\nimport { FeegrantQuerier } from \"./query/feegrant\";\nimport { GovQuerier } from \"./query/gov\";\nimport { IbcChannelQuerier } from \"./query/ibc_channel\";\nimport { IbcClientQuerier } from \"./query/ibc_client\";\nimport { IbcConnectionQuerier } from \"./query/ibc_connection\";\nimport { IbcFeeQuerier } from \"./query/ibc_fee\";\nimport { IbcInterchainAccountsControllerQuerier } from \"./query/ibc_interchain_accounts_controller\";\nimport { IbcInterchainAccountsHostQuerier } from \"./query/ibc_interchain_accounts_host\";\nimport { IbcPacketForwardQuerier } from \"./query/ibc_packet_forward\";\nimport { IbcTransferQuerier } from \"./query/ibc_transfer\";\nimport { MintQuerier } from \"./query/mint\";\nimport { ParamsQuerier } from \"./query/params\";\nimport { RegistrationQuerier } from \"./query/registration\";\nimport { SlashingQuerier } from \"./query/slashing\";\nimport { StakingQuerier } from \"./query/staking\";\nimport { TendermintQuerier } from \"./query/tendermint\";\nimport { UpgradeQuerier } from \"./query/upgrade\";\nimport {\n AminoMsg,\n Msg,\n MsgClearAdmin,\n MsgClearAdminParams,\n MsgMigrateContract,\n MsgMigrateContractParams,\n MsgParams,\n MsgPayPacketFee,\n MsgPayPacketFeeAsync,\n MsgPayPacketFeeAsyncParams,\n MsgPayPacketFeeParams,\n MsgRegisterCounterpartyPayee,\n MsgRegisterCounterpartyPayeeParams,\n MsgRegisterPayee,\n MsgRegisterPayeeParams,\n MsgRegistry,\n MsgSetAutoRestake,\n MsgSetAutoRestakeParams,\n MsgUpdateAdmin,\n ProtoMsg,\n} from \"./tx\";\nimport {\n MsgToggleIbcSwitch,\n MsgToggleIbcSwitchParams,\n} from \"./tx/emergency_button\";\nimport { RaAuthenticate, RaAuthenticateParams } from \"./tx/registration\";\nimport {\n MsgCreateVestingAccount,\n MsgCreateVestingAccountParams,\n} from \"./tx/vesting\";\nimport {\n AccountData,\n AminoSignResponse,\n AminoSigner,\n Pubkey,\n Signer,\n StdFee,\n StdSignDoc,\n encodeSecp256k1Pubkey,\n isDirectSigner,\n isSignDoc,\n isSignDocCamelCase,\n} from \"./wallet_amino\";\n\nexport type CreateClientOptions = {\n /** A URL to the API service, also known as LCD, REST API or gRPC-gateway, by default on port 1317 */\n url: string;\n /** The chain-id is used in encryption code & when signing txs. */\n chainId: string;\n /** A wallet for signing transactions & permits. When `wallet` is supplied, `walletAddress` & `chainId` must be supplied too. */\n wallet?: Signer;\n /** walletAddress is the specific account address in the wallet that is permitted to sign transactions & permits. */\n walletAddress?: string;\n /** Passing `encryptionSeed` will allow tx decryption at a later time. Ignored if `encryptionUtils` is supplied. Must be 32 bytes. */\n encryptionSeed?: Uint8Array;\n /** `encryptionUtils` overrides the default {@link EncryptionUtilsImpl}. */\n encryptionUtils?: EncryptionUtils;\n};\n\n/**\n * SingleMsgTx is a function that broadcasts a single message transaction.\n * It also has a `simulate()` method to execute the transaction without\n * committing it on-chain. This is helpful for gas estimation.\n *\n * WARNING: `tx.compute.instantiateContract()` & `tx.compute.executeContract()` simulation is not supported for security reasons!\n */\nexport type SingleMsgTx = {\n (params: T, txOptions?: TxOptions): Promise;\n simulate(params: T, txOptions?: TxOptions): Promise;\n};\n\nexport enum BroadcastMode {\n /**\n * Broadcast transaction to mempool and wait for DeliverTx response.\n *\n * @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_commit\n */\n Block = \"Block\",\n /**\n * Broadcast transaction to mempool and wait for CheckTx response.\n *\n * @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync\n */\n Sync = \"Sync\",\n /**\n * Broadcast transaction to mempool and do not wait for CheckTx response.\n *\n * @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_async\n */\n Async = \"Async\",\n}\n\nexport type IbcTxOptions = {\n /** If `false` skip resolving the IBC response txs (acknowledge/timeout).\n *\n * Defaults to `true` when broadcasting a tx or using `getTx()`.\n * Defaults to `false` when using `txsQuery()`.\n *\n */\n resolveResponses?: boolean;\n /**\n * How much time (in milliseconds) to wait for IBC response txs (acknowledge/timeout).\n *\n * Defaults to `120_000` (2 minutes).\n *\n */\n resolveResponsesTimeoutMs?: number;\n /**\n * When waiting for the IBC response txs (acknowledge/timeout) to commit on-chain, how much time (in milliseconds) to wait between checks.\n *\n * Smaller intervals will cause more load on your node provider. Keep in mind that blocks on Secret Network take about 6 seconds to finalize.\n *\n * Defaults to `15_000` (15 seconds).\n */\n resolveResponsesCheckIntervalMs?: number;\n};\n\ntype ExplicitIbcTxOptions = {\n resolveResponses: boolean;\n resolveResponsesTimeoutMs: number;\n resolveResponsesCheckIntervalMs: number;\n};\n\nexport type TxOptions = {\n /** Defaults to `25_000`. */\n gasLimit?: number;\n /** E.g. gasPriceInFeeDenom=0.1 & feeDenom=\"uscrt\" => Total fee for tx is `0.1 * gasLimit`uscrt. Defaults to `0.1`. */\n gasPriceInFeeDenom?: number;\n /** Defaults to `\"uscrt\"`. */\n feeDenom?: string;\n /** Address of the fee granter from which to charge gas fees. */\n feeGranter?: string;\n /** Defaults to `\"\"`. */\n memo?: string;\n /** If `false` returns immediately with only the `transactionHash` field set. Defaults to `true`. */\n waitForCommit?: boolean;\n /**\n * How much time (in milliseconds) to wait for tx to commit on-chain.\n *\n * Defaults to `60_000`. Ignored if `waitForCommit = false`.\n */\n broadcastTimeoutMs?: number;\n /**\n * When waiting for the tx to commit on-chain, how much time (in milliseconds) to wait between checks.\n *\n * Smaller intervals will cause more load on your node provider. Keep in mind that blocks on Secret Network take about 6 seconds to finalize.\n *\n * Defaults to `6_000`. Ignored if `waitForCommit = false`.\n */\n broadcastCheckIntervalMs?: number;\n /**\n * If `BroadcastMode.Sync` - Broadcast transaction to mempool and wait for CheckTx response.\n *\n * @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync\n *\n * If `BroadcastMode.Async` Broadcast transaction to mempool and do not wait for CheckTx response.\n *\n * @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_async\n */\n broadcastMode?: BroadcastMode;\n /**\n * explicitSignerData can be used to override `chainId`, `accountNumber` & `accountSequence`.\n * This is useful when using {@link BroadcastMode.Async} or when you don't want secretjs\n * to query for `accountNumber` & `accountSequence` from the chain. (smoother in UIs, less load on your node provider).\n */\n explicitSignerData?: SignerData;\n /**\n * Options for resolving IBC ack/timeout txs that resulted from this tx.\n */\n ibcTxsOptions?: IbcTxOptions;\n};\n\n/**\n * Signing information for a single signer that is not included in the transaction.\n *\n * @see https://github.com/cosmos/cosmos-sdk/blob/v0.42.2/x/auth/signing/sign_mode_handler.go#L23-L37\n */\nexport interface SignerData {\n readonly accountNumber: number;\n readonly sequence: number;\n readonly chainId: string;\n}\n\nexport class ReadonlySigner implements AminoSigner {\n getAccounts(): Promise {\n throw new Error(\"getAccounts() is not supported in readonly mode.\");\n }\n signAmino(\n _signerAddress: string,\n _signDoc: StdSignDoc,\n ): Promise {\n throw new Error(\"signAmino() is not supported in readonly mode.\");\n }\n}\n\nexport type Querier = {\n /** Returns a transaction with a txhash. Must be 64 character upper-case hex string */\n getTx: (\n hash: string,\n ibcTxOptions?: IbcTxOptions,\n ) => Promise;\n /**\n * To tell which events you want, you need to provide a query. query is a string, which has a form: \"condition AND condition ...\" (no OR at the moment).\n *\n * condition has a form: \"key operation operand\". key is a string with a restricted set of possible symbols (\\t\\n\\r\\()\"'=>< are not allowed).\n *\n * operation can be \"=\", \"<\", \"<=\", \">\", \">=\", \"CONTAINS\" AND \"EXISTS\". operand can be a string (escaped with single quotes), number, date or time.\n *\n * Examples:\n * - `tx.hash='XYZ'` # single transaction\n * - `tx.height=5` # all txs of the fifth block\n * - `create_validator.validator='ABC'` # tx where validator ABC was created\n *\n * Tendermint provides a few predefined keys: `tm.event`, `tx.hash` and `tx.height`. You can provide additional event keys that were emitted during the transaction.\n *\n * All events are indexed by a composite key of the form `{eventType}.{evenAttrKey}`.\n *\n * Multiple event types with duplicate keys are allowed and are meant to categorize unique and distinct events.\n *\n * To create a query for txs where AddrA transferred funds: `transfer.sender='AddrA'`.\n *\n * NOTE: Stating from Cosmos SDK v0.46+, expressions cannot contain spaces anymore:\n * - Legal: `a.b='c'`\n * - Illegal: `a.b = 'c'`\n */\n txsQuery: (\n query: string,\n ibcTxOptions?: IbcTxOptions,\n pagination?: PageRequest,\n order_by?: OrderBy,\n ) => Promise;\n auth: AuthQuerier;\n authz: AuthzQuerier;\n bank: BankQuerier;\n compute: ComputeQuerier;\n snip20: Snip20Querier;\n snip721: Snip721Querier;\n snip1155: Snip1155Querier;\n distribution: DistributionQuerier;\n evidence: EvidenceQuerier;\n feegrant: FeegrantQuerier;\n gov: GovQuerier;\n ibc_channel: IbcChannelQuerier;\n ibc_client: IbcClientQuerier;\n ibc_connection: IbcConnectionQuerier;\n ibc_transfer: IbcTransferQuerier;\n ibc_iterchain_accounts_host: IbcInterchainAccountsHostQuerier;\n ibc_iterchain_accounts_controller: IbcInterchainAccountsControllerQuerier;\n ibc_fee: IbcFeeQuerier;\n ibc_packet_forward: IbcPacketForwardQuerier;\n emergency_button: EmergencyButtonQuerier;\n mauth: MauthQuerier;\n mint: MintQuerier;\n node: NodeQuerier;\n params: ParamsQuerier;\n registration: RegistrationQuerier;\n slashing: SlashingQuerier;\n staking: StakingQuerier;\n tendermint: TendermintQuerier;\n upgrade: UpgradeQuerier;\n};\n\nexport type ArrayLog = Array<{\n msg: number;\n type: string;\n key: string;\n value: string;\n}>;\n\nexport type JsonLog = Array<{\n msg_index: number;\n events: Array<{\n type: string;\n attributes: Array<{ key: string; value: string }>;\n }>;\n}>;\n\n/**\n * MsgData defines the data returned in a Result object during message\n * execution.\n */\nexport type MsgData = {\n msgType: string;\n data: Uint8Array;\n};\n\nexport type AnyJson = { \"@type\": string } & any;\n\n/** A transaction that is indexed as part of the transaction history */\nexport type TxResponse = {\n /** Block height in which the tx was committed on-chain */\n readonly height: number;\n /** An RFC 3339 timestamp of when the tx was committed on-chain.\n * The format is `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z`.\n */\n readonly timestamp: string;\n /** Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex */\n readonly transactionHash: string;\n /** Transaction execution error code. 0 on success. See {@link TxResultCode}. */\n readonly code: TxResultCode;\n /** Namespace for the Code */\n readonly codespace: string;\n /** Additional information. May be non-deterministic. */\n readonly info: string;\n /**\n * If code != 0, rawLog contains the error.\n *\n * If code = 0 you'll probably want to use `jsonLog` or `arrayLog`. Values are not decrypted.\n */\n readonly rawLog: string;\n /** If code = 0, `jsonLog = JSON.parse(rawLow)`. Values are decrypted if possible. */\n readonly jsonLog?: JsonLog;\n /** If code = 0, `arrayLog` is a flattened `jsonLog`. Values are decrypted if possible. */\n readonly arrayLog?: ArrayLog;\n\n /**\n * Events defines all the events emitted by processing a transaction. Note,\n * these events include those emitted by processing all the messages and those\n * emitted from the ante handler. Whereas Logs contains the events, with\n * additional metadata, emitted only by processing the messages.\n *\n * Note: events are not decrypted.\n */\n readonly events: Array<\n import(\"./grpc_gateway/tendermint/abci/types.pb\").Event\n >;\n /** Return value (if there's any) for each input message */\n readonly data: Array;\n /**\n * Decoded transaction input.\n */\n readonly tx: TxPb;\n /**\n * Amount of gas that was actually used by the transaction.\n */\n readonly gasUsed: number;\n /**\n * Gas limit that was originaly set by the transaction.\n */\n readonly gasWanted: number;\n /** If code = 0 and the tx resulted in sending IBC packets, `ibcAckTxs` is a list of IBC acknowledgement or timeout transactions which signal whether the original IBC packet was accepted, rejected or timed-out on the receiving chain. */\n readonly ibcResponses: Array>;\n};\n\nexport type IbcResponse = {\n type: \"ack\" | \"timeout\";\n tx: TxResponse;\n};\n\nexport type TxSender = {\n /**\n * Sign and broadcast a transaction to Secret Network.\n *\n * @param {TxOptions} [options] Options for signing and broadcasting\n * @param {Number} [options.gasLimit=25_000]\n * @param {Number} [options.gasPriceInFeeDenom=0.1] E.g. gasPriceInFeeDenom=0.1 & feeDenom=\"uscrt\" => Total fee for tx is `0.1 * gasLimit`uscrt.\n * @param {String} [options.feeDenom=\"uscrt\"]\n * @param {String} [options.memo=\"\"]\n * @param {boolean} [options.waitForCommit=true] If false returns immediately with `transactionHash`. Defaults to `true`.\n * @param {Number} [options.broadcastTimeoutMs=60_000] How much time (in milliseconds) to wait for tx to commit on-chain. Ignored if `waitForCommit = false`.\n * @param {Number} [options.broadcastCheckIntervalMs=6_000] When waiting for the tx to commit on-chain, how much time (in milliseconds) to wait between checks. Smaller intervals will cause more load on your node provider. Keep in mind that blocks on Secret Network take about 6 seconds to finalize. Ignored if `waitForCommit = false`.\n * @param {BroadcastMode} [options.broadcastMode=BroadcastMode.Sync] If {@link BroadcastMode.Sync} - Broadcast transaction to mempool and wait for CheckTx response. @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync. If {@link BroadcastMode.Async} Broadcast transaction to mempool and do not wait for CheckTx response. @see https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_async.\n * @param {SignerData} [options.explicitSignerData] explicitSignerData can be used to override `chainId`, `accountNumber` & `accountSequence`. This is useful when using {@link BroadcastMode.Async} or when you don't want secretjs to query for `accountNumber` & `accountSequence` from the chain. (smoother in UIs, less load on your node provider).\n * @param {Number} [options.explicitSignerData.accountNumber]\n * @param {Number} [options.explicitSignerData.sequence]\n * @param {String} [options.explicitSignerData.chainId]\n * @param {Msg[]} messages A list of messages, executed sequentially. If all messages succeeds then the transaction succeed, and the resulting {@link TxResponse} object will have `code = 0`. If at lease one message fails, the entire transaction is reverted and {@link TxResponse} `code` field will not be `0`.\n *\n * List of possible Msgs:\n * - authz {@link MsgExec}\n * - authz {@link MsgGrant}\n * - authz {@link MsgRevoke}\n * - bank {@link MsgMultiSend}\n * - bank {@link MsgSend}\n * - compute {@link MsgExecuteContract}\n * - compute {@link MsgInstantiateContract}\n * - compute {@link MsgStoreCode}\n * - crisis {@link MsgVerifyInvariant}\n * - distribution {@link MsgFundCommunityPool}\n * - distribution {@link MsgSetWithdrawAddress}\n * - distribution {@link MsgWithdrawDelegatorReward}\n * - distribution {@link MsgWithdrawValidatorCommission}\n * - evidence {@link MsgSubmitEvidence}\n * - feegrant {@link MsgGrantAllowance}\n * - feegrant {@link MsgRevokeAllowance}\n * - gov {@link MsgDeposit}\n * - gov {@link MsgSubmitProposal}\n * - gov {@link MsgVote}\n * - gov {@link MsgVoteWeighted}\n * - ibc_channel {@link MsgAcknowledgement}\n * - ibc_channel {@link MsgChannelCloseConfirm}\n * - ibc_channel {@link MsgChannelCloseInit}\n * - ibc_channel {@link MsgChannelOpenAck}\n * - ibc_channel {@link MsgChannelOpenConfirm}\n * - ibc_channel {@link MsgChannelOpenInit}\n * - ibc_channel {@link MsgChannelOpenTry}\n * - ibc_channel {@link MsgRecvPacket}\n * - ibc_channel {@link MsgTimeout}\n * - ibc_channel {@link MsgTimeoutOnClose}\n * - ibc_client {@link MsgCreateClient}\n * - ibc_client {@link MsgSubmitMisbehaviour}\n * - ibc_client {@link MsgUpdateClient}\n * - ibc_client {@link MsgUpgradeClient}\n * - ibc_connection {@link MsgConnectionOpenAck}\n * - ibc_connection {@link MsgConnectionOpenConfirm}\n * - ibc_connection {@link MsgConnectionOpenInit}\n * - ibc_connection {@link MsgConnectionOpenTry}\n * - ibc_transfer {@link MsgTransfer}\n * - slashing {@link MsgUnjail}\n * - staking {@link MsgBeginRedelegate}\n * - staking {@link MsgCreateValidator}\n * - staking {@link MsgDelegate}\n * - staking {@link MsgEditValidator}\n * - staking {@link MsgUndelegate}\n */\n broadcast: (messages: Msg[], txOptions?: TxOptions) => Promise;\n\n /**\n * Prepare and sign an array of messages as a transaction\n * @async\n * @param {Msg[]} messages - Array of messages to prepare and sign\n * @param {TxOptions} [txOptions] - An optional object of transaction options\n * @returns {Promise} Returns a Promise that resolves txBytes, which can be passed into broadcastSignedTx().\n */\n signTx: (messages: Msg[], txOptions?: TxOptions) => Promise;\n\n /**\n * Broadcast a signed transactions\n * @async\n * @param {Uint8Array} txBytes - Signed transaction bytes, can be the output of signTx()\n * @param {TxOptions} [txOptions] - An optional object of transaction options\n * @returns {Promise}\n */\n broadcastSignedTx: (\n txBytes: Uint8Array,\n txOptions?: TxOptions,\n ) => Promise;\n\n /**\n * Simulates a transaction on the node without broadcasting it to the chain.\n * Can be used to get a gas estimation or to see the output without actually committing a transaction on-chain.\n * The input should be exactly how you'd use it in `broadcast`.\n *\n * WARNING: `MsgInstantiateContract` & `MsgExecuteContract` simulation is not supported for security reasons!\n */\n simulate: (\n messages: Msg[],\n txOptions?: TxOptions,\n ) => Promise;\n\n snip721: {\n send: SingleMsgTx>;\n mint: SingleMsgTx>;\n addMinter: SingleMsgTx>;\n setViewingKey: SingleMsgTx;\n createViewingKey: SingleMsgTx;\n };\n\n snip20: {\n send: SingleMsgTx>;\n transfer: SingleMsgTx>;\n increaseAllowance: SingleMsgTx<\n MsgExecuteContractParams\n >;\n decreaseAllowance: SingleMsgTx<\n MsgExecuteContractParams\n >;\n setViewingKey: SingleMsgTx;\n createViewingKey: SingleMsgTx;\n };\n\n snip1155: {\n changeAdmin: SingleMsgTx<\n MsgExecuteContractParams\n >;\n removeAdmin: SingleMsgTx<\n MsgExecuteContractParams\n >;\n addCurator: SingleMsgTx<\n MsgExecuteContractParams\n >;\n removeCurator: SingleMsgTx<\n MsgExecuteContractParams\n >;\n addMinter: SingleMsgTx>;\n removeMinter: SingleMsgTx<\n MsgExecuteContractParams\n >;\n send: SingleMsgTx>;\n batchSend: SingleMsgTx>;\n transfer: SingleMsgTx>;\n batchTransfer: SingleMsgTx<\n MsgExecuteContractParams\n >;\n curate: SingleMsgTx>;\n mint: SingleMsgTx>;\n burn: SingleMsgTx>;\n changeMetaData: SingleMsgTx<\n MsgExecuteContractParams\n >;\n setViewingKey: SingleMsgTx;\n createViewingKey: SingleMsgTx;\n };\n\n authz: {\n /**\n * MsgExec attempts to execute the provided messages using\n * authorizations granted to the grantee. Each message should have only\n * one signer corresponding to the granter of the authorization.\n */\n exec: SingleMsgTx;\n /**\n * MsgGrant is a request type for Grant method. It declares authorization to the grantee\n * on behalf of the granter with the provided expiration time.\n */\n grant: SingleMsgTx;\n /**\n * MsgRevoke revokes any authorization with the provided sdk.Msg type on the\n * granter's account with that has been granted to the grantee.\n */\n revoke: SingleMsgTx;\n };\n bank: {\n /** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */\n multiSend: SingleMsgTx;\n /** MsgSend represents a message to send coins from one account to another. */\n send: SingleMsgTx;\n };\n compute: {\n /** Upload a compiled contract */\n storeCode: SingleMsgTx;\n /** Instantiate a contract from code id */\n instantiateContract: SingleMsgTx;\n /** Execute a function on a contract */\n executeContract: SingleMsgTx>;\n /** Runs a code upgrade/downgrade for a contract */\n migrateContract: SingleMsgTx>;\n /** Update the admin of a contract */\n updateAdmin: SingleMsgTx;\n /** Clear the admin of a contract */\n clearAdmin: SingleMsgTx;\n };\n emergency_button: {\n toggleIbcSwitch: SingleMsgTx;\n };\n crisis: {\n /** MsgVerifyInvariant represents a message to verify a particular invariance. */\n verifyInvariant: SingleMsgTx;\n };\n distribution: {\n /**\n * MsgFundCommunityPool allows an account to directly\n * fund the community pool.\n */\n fundCommunityPool: SingleMsgTx;\n /**\n * MsgSetWithdrawAddress sets the withdraw address for\n * a delegator (or validator self-delegation).\n */\n setWithdrawAddress: SingleMsgTx;\n /**\n * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator\n * from a single validator.\n */\n withdrawDelegatorReward: SingleMsgTx;\n /**\n * MsgWithdrawValidatorCommission withdraws the full commission to the validator\n * address.\n */\n withdrawValidatorCommission: SingleMsgTx;\n /**\n * MsgWithdrawValidatorCommission withdraws the full commission to the validator\n * address.\n */\n setAutoRestake: SingleMsgTx;\n };\n evidence: {\n /**\n * MsgSubmitEvidence represents a message that supports submitting arbitrary\n * Evidence of misbehavior such as equivocation or counterfactual signing.\n */\n submitEvidence: SingleMsgTx;\n };\n feegrant: {\n /**\n * MsgGrantAllowance adds permission for Grantee to spend up to Allowance\n * of fees from the account of Granter.\n */\n grantAllowance: SingleMsgTx;\n /** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */\n revokeAllowance: SingleMsgTx;\n };\n gov: {\n /** MsgDeposit defines a message to submit a deposit to an existing proposal. */\n deposit: SingleMsgTx;\n /**\n * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary\n * proposal Content.\n */\n submitProposal: SingleMsgTx;\n /** MsgVote defines a message to cast a vote. */\n vote: SingleMsgTx;\n /** MsgVoteWeighted defines a message to cast a vote, with an option to split the vote. */\n voteWeighted: SingleMsgTx;\n };\n ibc: {\n /**\n * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between\n * ICS20 enabled chains. See ICS Spec here:\n * https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures\n */\n transfer: SingleMsgTx;\n };\n ibc_fee: {\n payPacketFee: SingleMsgTx;\n payPacketFeeAsync: SingleMsgTx;\n registerPayee: SingleMsgTx;\n registerCounterpartyPayee: SingleMsgTx;\n };\n registration: {\n register: SingleMsgTx;\n };\n slashing: {\n /** MsgUnjail defines a message to release a validator from jail. */\n unjail: SingleMsgTx;\n };\n staking: {\n /** MsgBeginRedelegate defines an SDK message for performing a redelegation of coins from a delegator and source validator to a destination validator. */\n beginRedelegate: SingleMsgTx;\n /** MsgCreateValidator defines an SDK message for creating a new validator. */\n createValidator: SingleMsgTx;\n /** MsgDelegate defines an SDK message for performing a delegation of coins from a delegator to a validator. */\n delegate: SingleMsgTx;\n /** MsgEditValidator defines an SDK message for editing an existing validator. */\n editValidator: SingleMsgTx;\n /** MsgUndelegate defines an SDK message for performing an undelegation from a delegate and a validator */\n undelegate: SingleMsgTx;\n };\n vesting: {\n /** MsgCreateVestingAccount defines a message that enables creating a vesting account. */\n createVestingAccount: SingleMsgTx;\n };\n};\n\ntype ComputeMsgToNonce = { [msgIndex: number]: Uint8Array };\n\nexport class SecretNetworkClient {\n public readonly query: Querier;\n public readonly tx: TxSender;\n public readonly address: string;\n private readonly url: string;\n private readonly wallet: Signer;\n private readonly chainId: string;\n\n private encryptionUtils: EncryptionUtils;\n\n public utils: { accessControl: { permit: PermitSigner } };\n\n /** Creates a new SecretNetworkClient client. For a readonly client pass just the `url` param. */\n constructor(options: CreateClientOptions) {\n this.url = options.url.replace(/\\/*$/g, \"\"); // remove trailing slashes\n\n this.query = {\n auth: new AuthQuerier(options.url),\n authz: new AuthzQuerier(options.url),\n bank: new BankQuerier(options.url),\n compute: new ComputeQuerier(options.url),\n snip20: new Snip20Querier(options.url),\n snip721: new Snip721Querier(options.url),\n snip1155: new Snip1155Querier(options.url),\n distribution: new DistributionQuerier(options.url),\n evidence: new EvidenceQuerier(options.url),\n feegrant: new FeegrantQuerier(options.url),\n gov: new GovQuerier(options.url),\n ibc_channel: new IbcChannelQuerier(options.url),\n ibc_client: new IbcClientQuerier(options.url),\n ibc_connection: new IbcConnectionQuerier(options.url),\n ibc_transfer: new IbcTransferQuerier(options.url),\n ibc_iterchain_accounts_host: new IbcInterchainAccountsHostQuerier(\n options.url,\n ),\n ibc_iterchain_accounts_controller:\n new IbcInterchainAccountsControllerQuerier(options.url),\n ibc_fee: new IbcFeeQuerier(options.url),\n ibc_packet_forward: new IbcPacketForwardQuerier(options.url),\n emergency_button: new EmergencyButtonQuerier(options.url),\n mauth: new MauthQuerier(options.url),\n mint: new MintQuerier(options.url),\n node: new NodeQuerier(options.url),\n params: new ParamsQuerier(options.url),\n registration: new RegistrationQuerier(options.url),\n slashing: new SlashingQuerier(options.url),\n staking: new StakingQuerier(options.url),\n tendermint: new TendermintQuerier(options.url),\n upgrade: new UpgradeQuerier(options.url),\n getTx: (hash, ibcTxOptions) => this.getTx(hash, ibcTxOptions),\n txsQuery: (query, ibcTxOptions, pagination, order_by) =>\n this.txsQuery(query, ibcTxOptions, pagination, order_by),\n };\n\n if (options.wallet && options.walletAddress === undefined) {\n throw new Error(\"Must also pass 'walletAddress' when passing 'wallet'\");\n }\n\n this.wallet = options.wallet ?? new ReadonlySigner();\n this.address = options.walletAddress ?? \"\";\n this.chainId = options.chainId;\n\n this.utils = { accessControl: { permit: new PermitSigner(this.wallet) } };\n\n // TODO fix this \"any\"\n const doMsg = (msgClass: any): SingleMsgTx => {\n const func = (params: MsgParams, options?: TxOptions) => {\n return this.tx.broadcast([new msgClass(params)], options);\n };\n func.simulate = (params: MsgParams, options?: TxOptions) => {\n return this.tx.simulate([new msgClass(params)], options);\n };\n\n return func;\n };\n\n this.tx = {\n signTx: this.signTx.bind(this),\n broadcastSignedTx: this.broadcastSignedTx.bind(this),\n\n broadcast: this.signAndBroadcast.bind(this),\n simulate: this.simulate.bind(this),\n\n snip20: {\n send: doMsg(MsgSnip20Send),\n transfer: doMsg(MsgSnip20Transfer),\n increaseAllowance: doMsg(MsgSnip20IncreaseAllowance),\n decreaseAllowance: doMsg(MsgSnip20DecreaseAllowance),\n setViewingKey: doMsg(MsgSetViewingKey),\n createViewingKey: doMsg(MsgCreateViewingKey),\n },\n\n snip721: {\n send: doMsg(MsgSnip721Send),\n mint: doMsg(MsgSnip721Mint),\n addMinter: doMsg(MsgSnip721AddMinter),\n setViewingKey: doMsg(MsgSetViewingKey),\n createViewingKey: doMsg(MsgCreateViewingKey),\n },\n\n snip1155: {\n changeAdmin: doMsg(MsgSnip1155ChangeAdmin),\n removeAdmin: doMsg(MsgSnip1155RemoveAdmin),\n addCurator: doMsg(MsgSnip1155AddCurator),\n removeCurator: doMsg(MsgSnip1155RemoveCurator),\n addMinter: doMsg(MsgSnipAddMinter),\n removeMinter: doMsg(MsgSnip1155RemoveMinter),\n send: doMsg(MsgSnip1155Send),\n batchSend: doMsg(MsgSnip1155BatchSend),\n transfer: doMsg(MsgSnip1155Transfer),\n batchTransfer: doMsg(MsgSnip1155BatchTransfer),\n curate: doMsg(MsgSnip1155CurateTokens),\n mint: doMsg(MsgSnip1155Mint),\n burn: doMsg(MsgSnip1155Burn),\n changeMetaData: doMsg(MsgSnip1155ChangeMetadata),\n setViewingKey: doMsg(MsgSetViewingKey),\n createViewingKey: doMsg(MsgCreateViewingKey),\n },\n\n authz: {\n exec: doMsg(MsgExec),\n grant: doMsg(MsgGrant),\n revoke: doMsg(MsgRevoke),\n },\n bank: {\n multiSend: doMsg(MsgMultiSend),\n send: doMsg(MsgSend),\n },\n compute: {\n storeCode: doMsg(MsgStoreCode),\n instantiateContract: doMsg(MsgInstantiateContract),\n executeContract: doMsg(MsgExecuteContract),\n migrateContract: doMsg(MsgMigrateContract),\n updateAdmin: doMsg(MsgUpdateAdmin),\n clearAdmin: doMsg(MsgClearAdmin),\n },\n emergency_button: {\n toggleIbcSwitch: doMsg(MsgToggleIbcSwitch),\n },\n crisis: {\n verifyInvariant: doMsg(MsgVerifyInvariant),\n },\n distribution: {\n fundCommunityPool: doMsg(MsgFundCommunityPool),\n setWithdrawAddress: doMsg(MsgSetWithdrawAddress),\n withdrawDelegatorReward: doMsg(MsgWithdrawDelegatorReward),\n withdrawValidatorCommission: doMsg(MsgWithdrawValidatorCommission),\n setAutoRestake: doMsg(MsgSetAutoRestake),\n },\n evidence: {\n submitEvidence: doMsg(MsgSubmitEvidence),\n },\n feegrant: {\n grantAllowance: doMsg(MsgGrantAllowance),\n revokeAllowance: doMsg(MsgRevokeAllowance),\n },\n gov: {\n deposit: doMsg(MsgDeposit),\n submitProposal: doMsg(MsgSubmitProposal),\n vote: doMsg(MsgVote),\n voteWeighted: doMsg(MsgVoteWeighted),\n },\n ibc: {\n transfer: doMsg(MsgTransfer),\n },\n ibc_fee: {\n payPacketFee: doMsg(MsgPayPacketFee),\n payPacketFeeAsync: doMsg(MsgPayPacketFeeAsync),\n registerPayee: doMsg(MsgRegisterPayee),\n registerCounterpartyPayee: doMsg(MsgRegisterCounterpartyPayee),\n },\n registration: {\n register: doMsg(RaAuthenticate),\n },\n slashing: {\n unjail: doMsg(MsgUnjail),\n },\n staking: {\n beginRedelegate: doMsg(MsgBeginRedelegate),\n createValidator: doMsg(MsgCreateValidator),\n delegate: doMsg(MsgDelegate),\n editValidator: doMsg(MsgEditValidator),\n undelegate: doMsg(MsgUndelegate),\n },\n vesting: {\n createVestingAccount: doMsg(MsgCreateVestingAccount),\n },\n };\n\n if (options.encryptionUtils) {\n this.encryptionUtils = options.encryptionUtils;\n } else {\n this.encryptionUtils = new EncryptionUtilsImpl(\n this.url,\n options.encryptionSeed,\n this.chainId,\n );\n }\n\n // Reinitialize ComputeQuerier with a shared EncryptionUtils (better caching, same seed)\n this.query.compute = new ComputeQuerier(this.url, this.encryptionUtils);\n }\n\n private async getTx(\n hash: string,\n ibcTxOptions?: IbcTxOptions,\n ): Promise {\n try {\n const { tx_response } = await TxService.GetTx(\n { hash },\n { pathPrefix: this.url },\n );\n\n return tx_response\n ? this.decodeTxResponse(tx_response, ibcTxOptions)\n : null;\n } catch (error) {\n const txNotFoundRegex = new RegExp(\n `tx not found: ${hash}|tx \\\\(${hash}\\\\) not found`,\n \"i\",\n );\n\n if (\n typeof error?.message == \"string\" &&\n error?.message?.match(txNotFoundRegex) !== null\n ) {\n return null;\n } else {\n throw error;\n }\n }\n }\n\n private async txsQuery(\n query: string,\n ibcTxOptions: IbcTxOptions = {\n resolveResponses: false,\n },\n pagination: PageRequest = {\n key: undefined,\n offset: undefined,\n limit: undefined,\n count_total: undefined,\n reverse: undefined,\n },\n order_by?: OrderBy,\n ): Promise {\n const { tx_responses } = await TxService.GetTxsEvent(\n {\n events: query.split(\" AND \").map((q) => q.trim()),\n pagination,\n order_by,\n },\n { pathPrefix: this.url },\n );\n\n return this.decodeTxResponses(tx_responses ?? [], ibcTxOptions);\n }\n\n private async waitForIbcResponse(\n packetSequence: string,\n packetSrcChannel: string,\n type: \"ack\" | \"timeout\",\n ibcTxOptions: ExplicitIbcTxOptions,\n isDoneObject: { isDone: boolean },\n ): Promise {\n return new Promise(async (resolve, reject) => {\n let tries =\n ibcTxOptions.resolveResponsesTimeoutMs /\n ibcTxOptions.resolveResponsesCheckIntervalMs;\n\n let txType: string = type;\n if (type === \"ack\") {\n txType = \"acknowledge\";\n }\n\n const query = [\n `${txType}_packet.packet_src_channel='${packetSrcChannel}'`,\n `${txType}_packet.packet_sequence='${packetSequence}'`,\n ].join(\" AND \");\n\n while (tries > 0 && !isDoneObject.isDone) {\n const txs = await this.txsQuery(query);\n\n const ibcRespTx = txs.find((tx) => tx.code === 0);\n\n if (ibcRespTx) {\n isDoneObject.isDone = true;\n resolve({\n type,\n tx: ibcRespTx,\n });\n }\n\n tries--;\n await sleep(ibcTxOptions.resolveResponsesCheckIntervalMs);\n }\n\n reject(\n `timed-out while trying to resolve IBC ${type} tx for packet_src_channel='${packetSrcChannel}' and packet_sequence='${packetSequence}'`,\n );\n });\n }\n\n private async decodeTxResponses(\n txResponses: TxResponsePb[],\n ibcTxOptions?: IbcTxOptions,\n ): Promise {\n return await Promise.all(\n txResponses.map((x) => this.decodeTxResponse(x, ibcTxOptions)),\n );\n }\n\n private async decodeTxResponse(\n txResp: TxResponsePb,\n ibcTxOptions?: IbcTxOptions,\n ): Promise {\n let explicitIbcTxOptions: ExplicitIbcTxOptions;\n\n if (!ibcTxOptions) {\n explicitIbcTxOptions = {\n resolveResponses: true,\n resolveResponsesTimeoutMs: 120_000,\n resolveResponsesCheckIntervalMs: 15_000,\n };\n } else {\n explicitIbcTxOptions = {\n resolveResponses:\n typeof ibcTxOptions.resolveResponses === \"boolean\"\n ? ibcTxOptions.resolveResponses\n : true,\n resolveResponsesTimeoutMs:\n typeof ibcTxOptions.resolveResponsesTimeoutMs === \"number\"\n ? ibcTxOptions.resolveResponsesTimeoutMs\n : 120_000,\n resolveResponsesCheckIntervalMs:\n typeof ibcTxOptions.resolveResponsesCheckIntervalMs === \"number\"\n ? ibcTxOptions.resolveResponsesCheckIntervalMs\n : 15_000,\n };\n }\n\n const nonces: ComputeMsgToNonce = [];\n\n const tx = txResp.tx as TxPb;\n\n // Decoded input tx messages\n for (\n let i = 0;\n !isNaN(Number(tx?.body?.messages?.length)) &&\n i < Number(tx?.body?.messages?.length);\n i++\n ) {\n const msg: AnyJson = tx.body!.messages![i];\n\n // Check if the message needs decryption\n let contractInputMsgFieldName = \"\";\n if (msg[\"@type\"] === \"/secret.compute.v1beta1.MsgInstantiateContract\") {\n contractInputMsgFieldName = \"init_msg\";\n } else if (\n msg[\"@type\"] === \"/secret.compute.v1beta1.MsgExecuteContract\" ||\n msg[\"@type\"] === \"/secret.compute.v1beta1.MsgMigrateContract\"\n ) {\n contractInputMsgFieldName = \"msg\";\n }\n\n if (contractInputMsgFieldName !== \"\") {\n // Encrypted, try to decrypt\n try {\n const contractInputMsgBytes = fromBase64(\n msg[contractInputMsgFieldName],\n );\n\n const nonce = contractInputMsgBytes.slice(0, 32);\n const ciphertext = contractInputMsgBytes.slice(64);\n\n const plaintext = await this.encryptionUtils.decrypt(\n ciphertext,\n nonce,\n );\n msg[contractInputMsgFieldName] = JSON.parse(\n fromUtf8(plaintext).slice(64), // first 64 chars is the codeHash as a hex string\n );\n\n nonces[i] = nonce; // Fill nonces array to later use it in output decryption\n } catch (decryptionError) {\n // Not encrypted or can't decrypt because not original sender\n }\n }\n\n tx.body!.messages![i] = msg;\n }\n\n let rawLog: string = txResp.raw_log!;\n let jsonLog: JsonLog | undefined;\n let arrayLog: ArrayLog | undefined;\n let ibcResponses: Array> = [];\n if (txResp.code === 0 && rawLog !== \"\") {\n jsonLog = JSON.parse(rawLog) as JsonLog;\n\n arrayLog = [];\n for (let msgIndex = 0; msgIndex < jsonLog.length; msgIndex++) {\n if (jsonLog[msgIndex].msg_index === undefined) {\n jsonLog[msgIndex].msg_index = msgIndex;\n // See https://github.com/cosmos/cosmos-sdk/pull/11147\n }\n\n const log = jsonLog[msgIndex];\n for (const event of log.events) {\n for (const attr of event.attributes) {\n // Try to decrypt\n if (event.type === \"wasm\") {\n const nonce = nonces[msgIndex];\n if (nonce && nonce.length === 32) {\n try {\n attr.key = fromUtf8(\n await this.encryptionUtils.decrypt(\n fromBase64(attr.key),\n nonce,\n ),\n ).trim();\n } catch (e) {}\n try {\n attr.value = fromUtf8(\n await this.encryptionUtils.decrypt(\n fromBase64(attr.value),\n nonce,\n ),\n ).trim();\n } catch (e) {}\n }\n }\n\n arrayLog.push({\n msg: msgIndex,\n type: event.type,\n key: attr.key,\n value: attr.value,\n });\n }\n }\n }\n } else if (txResp.code !== 0 && rawLog !== \"\") {\n try {\n const errorMessageRgx =\n /; message index: (\\d+):(?: dispatch: submessages:)* encrypted: (.+?): (?:instantiate|execute|query|reply to|migrate) contract failed/g;\n const rgxMatches = errorMessageRgx.exec(rawLog);\n if (rgxMatches?.length === 3) {\n const encryptedError = fromBase64(rgxMatches[2]);\n const msgIndex = Number(rgxMatches[1]);\n\n const decryptedBase64Error = await this.encryptionUtils.decrypt(\n encryptedError,\n nonces[msgIndex],\n );\n\n const decryptedError = fromUtf8(decryptedBase64Error);\n\n rawLog = rawLog.replace(\n `encrypted: ${rgxMatches[2]}`,\n decryptedError,\n );\n\n try {\n jsonLog = JSON.parse(decryptedError);\n } catch (e) {}\n }\n } catch (decryptionError) {\n // Not encrypted or can't decrypt because not original sender\n }\n }\n\n const txMsgData = TxMsgData.decode(fromHex(txResp.data!));\n const data = new Array(txMsgData.data.length);\n\n for (let msgIndex = 0; msgIndex < txMsgData.data.length; msgIndex++) {\n data[msgIndex] = txMsgData.data[msgIndex].data;\n\n const nonce = nonces[msgIndex];\n if (nonce && nonce.length === 32) {\n // Check if the output data needs decryption\n\n try {\n const { \"@type\": type_url } = tx.body!.messages![msgIndex] as AnyJson;\n\n if (type_url === \"/secret.compute.v1beta1.MsgInstantiateContract\") {\n const decoded = MsgInstantiateContractResponse.decode(\n txMsgData.data[msgIndex].data,\n );\n const decrypted = fromBase64(\n fromUtf8(await this.encryptionUtils.decrypt(decoded.data, nonce)),\n );\n data[msgIndex] = MsgInstantiateContractResponse.encode({\n address: decoded.address,\n data: decrypted,\n }).finish();\n } else if (\n type_url === \"/secret.compute.v1beta1.MsgExecuteContract\"\n ) {\n const decoded = MsgExecuteContractResponse.decode(\n txMsgData.data[msgIndex].data,\n );\n const decrypted = fromBase64(\n fromUtf8(await this.encryptionUtils.decrypt(decoded.data, nonce)),\n );\n data[msgIndex] = MsgExecuteContractResponse.encode({\n data: decrypted,\n }).finish();\n } else if (\n type_url === \"/secret.compute.v1beta1.MsgMigrateContract\"\n ) {\n const decoded = MsgMigrateContractResponse.decode(\n txMsgData.data[msgIndex].data,\n );\n const decrypted = fromBase64(\n fromUtf8(await this.encryptionUtils.decrypt(decoded.data, nonce)),\n );\n data[msgIndex] = MsgMigrateContractResponse.encode({\n data: decrypted,\n }).finish();\n }\n } catch (decryptionError) {\n // Not encrypted or can't decrypt because not original sender\n }\n }\n }\n\n // IBC ACKs:\n if (txResp.code === TxResultCode.Success) {\n const packetSequences =\n arrayLog?.filter(\n (x) => x.type === \"send_packet\" && x.key === \"packet_sequence\",\n ) || [];\n\n const packetSrcChannels =\n arrayLog?.filter(\n (x) => x.type === \"send_packet\" && x.key === \"packet_src_channel\",\n ) || [];\n\n if (explicitIbcTxOptions.resolveResponses) {\n for (let msgIndex = 0; msgIndex < packetSequences?.length; msgIndex++) {\n // isDoneObject is used to cancel the second promise if the first one is resolved\n const isDoneObject = {\n isDone: false,\n };\n\n ibcResponses.push(\n Promise.race([\n this.waitForIbcResponse(\n packetSequences[msgIndex].value,\n packetSrcChannels[msgIndex].value,\n \"ack\",\n explicitIbcTxOptions,\n isDoneObject,\n ),\n this.waitForIbcResponse(\n packetSequences[msgIndex].value,\n packetSrcChannels[msgIndex].value,\n \"timeout\",\n explicitIbcTxOptions,\n isDoneObject,\n ),\n ]),\n );\n }\n }\n }\n\n return {\n height: Number(txResp.height),\n timestamp: txResp.timestamp!,\n transactionHash: txResp.txhash!,\n code: txResp.code!,\n codespace: txResp.codespace!,\n info: txResp.info!,\n tx,\n rawLog,\n jsonLog,\n arrayLog,\n events: txResp.events!,\n data,\n gasUsed: Number(txResp.gas_used),\n gasWanted: Number(txResp.gas_wanted),\n ibcResponses,\n };\n }\n\n /**\n * Broadcasts a signed transaction to the network and monitors its inclusion in a block.\n *\n * If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure),\n * an error is thrown.\n *\n * If the transaction is not included in a block before the provided timeout, this errors with a `TimeoutError`.\n *\n * If the transaction is included in a block, a {@link TxResponse} is returned. The caller then\n * usually needs to check for execution success or failure.\n */\n private async broadcastTx(\n txBytes: Uint8Array,\n timeoutMs: number,\n checkIntervalMs: number,\n mode: BroadcastMode,\n waitForCommit: boolean,\n ibcTxOptions?: IbcTxOptions,\n ): Promise {\n const start = Date.now();\n\n const txhash = toHex(sha256(txBytes)).toUpperCase();\n\n if (!waitForCommit && mode == BroadcastMode.Block) {\n mode = BroadcastMode.Sync;\n }\n\n let tx_response: TxResponsePb | undefined;\n\n if (mode === BroadcastMode.Block) {\n waitForCommit = true;\n\n const { BroadcastMode } = await import(\n \"./grpc_gateway/cosmos/tx/v1beta1/service.pb\"\n );\n\n let isBroadcastTimedOut = false;\n try {\n ({ tx_response } = await TxService.BroadcastTx(\n {\n //@ts-ignore for some reason the type is tx_bytes but only works as txBytes\n txBytes: toBase64(txBytes),\n mode: BroadcastMode.BROADCAST_MODE_BLOCK,\n },\n { pathPrefix: this.url },\n ));\n } catch (e) {\n if (\n JSON.stringify(e)\n .toLowerCase()\n .includes(\"timed out waiting for tx to be included in a block\")\n ) {\n isBroadcastTimedOut = true;\n } else {\n throw new Error(\n `Failed to broadcast transaction ID ${txhash}: '${JSON.stringify(\n e,\n )}'.`,\n );\n }\n }\n\n if (!isBroadcastTimedOut) {\n tx_response!.tx = (\n await import(\"./protobuf/cosmos/tx/v1beta1/tx\")\n ).Tx.toJSON(\n (await import(\"./protobuf/cosmos/tx/v1beta1/tx\")).Tx.decode(txBytes),\n ) as AnyJson;\n\n const tx = tx_response!.tx as TxPb;\n\n const resolvePubkey = (pubkey: Any) => {\n if (pubkey.type_url === \"/cosmos.crypto.multisig.LegacyAminoPubKey\") {\n const multisig = LegacyAminoPubKey.decode(\n // @ts-expect-error\n fromBase64(pubkey.value),\n );\n for (let i = 0; i < multisig.public_keys.length; i++) {\n // @ts-expect-error\n multisig.public_keys[i] = resolvePubkey(multisig.public_keys[i]);\n }\n\n return LegacyAminoPubKey.toJSON(multisig);\n } else {\n return {\n type_url: pubkey.type_url,\n // assuming all single pubkeys have the same protobuf type\n // this works for secp256k1, secp256r1 & ethermint pubkeys\n value: PubKey.toJSON(\n PubKey.decode(\n // @ts-expect-error\n // pubkey.value is actually a base64 string but it's Any\n // so TypeScript thinks it's a Uint8Array\n fromBase64(pubkey.value),\n ),\n ),\n };\n }\n };\n\n //@ts-ignore\n tx.auth_info!.signer_infos! = tx.auth_info?.signer_infos?.map((si) => {\n //@ts-ignore\n si.public_key = resolvePubkey(si.public_key);\n return si;\n });\n\n for (\n let i = 0;\n !isNaN(Number(tx.body?.messages?.length)) &&\n i < Number(tx.body?.messages?.length);\n i++\n ) {\n //@ts-ignore\n let msg: { type_url: string; value: any } = tx.body!.messages![i];\n\n const { type_url: msgType, value: msgBytes } = msg;\n\n const msgDecoder = MsgRegistry.get(msgType);\n if (!msgDecoder) {\n continue;\n }\n\n msg = {\n type_url: msgType,\n value: msgDecoder.decode(fromBase64(msgBytes)),\n };\n\n if (\n msg.type_url === \"/secret.compute.v1beta1.MsgInstantiateContract\"\n ) {\n msg.value.sender = bytesToAddress(msg.value.sender);\n msg.value.init_msg = toBase64(msg.value.init_msg);\n msg.value.callback_sig = null;\n } else if (\n msg.type_url === \"/secret.compute.v1beta1.MsgExecuteContract\"\n ) {\n msg.value.sender = bytesToAddress(msg.value.sender);\n msg.value.contract = bytesToAddress(msg.value.contract);\n msg.value.msg = toBase64(msg.value.msg);\n msg.value.callback_sig = null;\n } else if (msg.type_url === \"/secret.compute.v1beta1.MsgStoreCode\") {\n msg.value.sender = bytesToAddress(msg.value.sender);\n msg.value.wasm_byte_code = toBase64(msg.value.wasm_byte_code);\n } else if (\n msg.type_url === \"/secret.compute.v1beta1.MsgMigrateContract\"\n ) {\n msg.value.msg = toBase64(msg.value.msg);\n }\n\n tx.body!.messages![i] = msg;\n }\n\n tx_response!.tx = {\n \"@type\": \"/cosmos.tx.v1beta1.Tx\",\n ...protobufJsonToGrpcGatewayJson(tx_response!.tx),\n };\n\n return await this.decodeTxResponse(tx_response!, ibcTxOptions);\n }\n } else if (mode === BroadcastMode.Sync) {\n const { BroadcastMode } = await import(\n \"./grpc_gateway/cosmos/tx/v1beta1/service.pb\"\n );\n\n ({ tx_response } = await TxService.BroadcastTx(\n {\n //@ts-ignore for some reason the type is tx_bytes but only works as txBytes\n txBytes: toBase64(txBytes),\n mode: BroadcastMode.BROADCAST_MODE_SYNC,\n },\n { pathPrefix: this.url },\n ));\n\n if (tx_response?.code !== 0) {\n throw new Error(\n `Broadcasting transaction failed with code ${tx_response?.code} (codespace: ${tx_response?.codespace}). Log: ${tx_response?.raw_log}`,\n );\n }\n } else if (mode === BroadcastMode.Async) {\n const { BroadcastMode } = await import(\n \"./grpc_gateway/cosmos/tx/v1beta1/service.pb\"\n );\n\n TxService.BroadcastTx(\n {\n //@ts-ignore for some reason the type is tx_bytes but only works as txBytes\n txBytes: toBase64(txBytes),\n mode: BroadcastMode.BROADCAST_MODE_ASYNC,\n },\n { pathPrefix: this.url },\n );\n } else {\n throw new Error(\n `Unknown broadcast mode \"${String(mode)}\", must be either \"${String(\n BroadcastMode.Block,\n )}\", \"${String(BroadcastMode.Sync)}\" or \"${String(\n BroadcastMode.Async,\n )}\".`,\n );\n }\n\n if (!waitForCommit) {\n //@ts-ignore\n return { transactionHash: txhash };\n }\n\n // sleep first because there's no point in checking right after broadcasting\n await sleep(checkIntervalMs / 2);\n\n while (true) {\n const result = await this.getTx(txhash, ibcTxOptions);\n\n if (result) {\n return result;\n }\n\n if (start + timeoutMs < Date.now()) {\n throw new Error(\n `Transaction ID ${txhash} was submitted but was not yet found on the chain. You might want to check later or increase broadcastTimeoutMs from '${timeoutMs}'.`,\n );\n }\n\n await sleep(checkIntervalMs);\n }\n }\n\n /**\n * Prepare and sign an array of messages as a transaction\n * @async\n * @private\n * @param {Msg[]} messages - Array of messages to prepare and sign\n * @param {TxOptions} [txOptions] - An optional object of transaction options\n * @returns {Promise} Returns a Promise that resolves txBytes, which can be passed into broadcastSignedTx().\n */\n private async signTx(\n messages: Msg[],\n txOptions?: TxOptions,\n ): Promise {\n return this.prepareAndSign(messages, txOptions);\n }\n\n /**\n * Broadcast a signed transactions\n * @async\n * @private\n * @param {Uint8Array} txBytes - Signed transaction bytes, can be the output of signTx()\n * @param {TxOptions} [txOptions] - An optional object of transaction options\n * @returns {Promise}\n */\n private async broadcastSignedTx(\n txBytes: Uint8Array,\n txOptions?: TxOptions,\n ): Promise {\n return this.broadcastTx(\n txBytes,\n txOptions?.broadcastTimeoutMs ?? 60_000,\n txOptions?.broadcastCheckIntervalMs ?? 6_000,\n txOptions?.broadcastMode ?? BroadcastMode.Block,\n txOptions?.waitForCommit ?? true,\n );\n }\n\n public async prepareAndSign(\n messages: Msg[],\n txOptions?: TxOptions,\n simulate: boolean = false,\n ): Promise {\n const gasLimit = txOptions?.gasLimit ?? 25_000;\n const gasPriceInFeeDenom = txOptions?.gasPriceInFeeDenom ?? 0.1;\n const feeDenom = txOptions?.feeDenom ?? \"uscrt\";\n const memo = txOptions?.memo ?? \"\";\n const feeGranter = txOptions?.feeGranter;\n\n const explicitSignerData = txOptions?.explicitSignerData;\n\n const txRaw = await this.sign(\n messages,\n {\n gas: String(gasLimit),\n amount: [\n {\n amount: String(gasToFee(gasLimit, gasPriceInFeeDenom)),\n denom: feeDenom,\n },\n ],\n granter: feeGranter,\n },\n memo,\n explicitSignerData,\n simulate,\n );\n\n return TxRaw.encode(txRaw).finish();\n }\n\n private async signAndBroadcast(\n messages: Msg[],\n txOptions?: TxOptions,\n ): Promise {\n const txBytes = await this.prepareAndSign(messages, txOptions);\n\n return this.broadcastTx(\n txBytes,\n txOptions?.broadcastTimeoutMs ?? 60_000,\n txOptions?.broadcastCheckIntervalMs ?? 6_000,\n txOptions?.broadcastMode ?? BroadcastMode.Block,\n txOptions?.waitForCommit ?? true,\n txOptions?.ibcTxsOptions,\n );\n }\n\n private async simulate(\n messages: Msg[],\n txOptions?: TxOptions,\n ): Promise {\n const txBytes = await this.prepareAndSign(messages, txOptions, true);\n return TxService.Simulate(\n //@ts-ignore for some reason the type is tx_bytes but only works as txBytes\n { txBytes: toBase64(txBytes) },\n { pathPrefix: this.url },\n );\n }\n\n /**\n * Gets account number and sequence from the API, creates a sign doc,\n * creates a single signature and assembles the signed transaction.\n *\n * The sign mode (SIGN_MODE_DIRECT or SIGN_MODE_LEGACY_AMINO_JSON) is determined by this client's signer.\n *\n * You can pass signer data (account number, sequence and chain ID) explicitly instead of querying them\n * from the chain. This is needed when signing for a multisig account, but it also allows for offline signing\n * (See the SigningStargateClient.offline constructor).\n */\n private async sign(\n messages: Msg[],\n fee: StdFee,\n memo: string,\n explicitSignerData?: SignerData,\n simulate: boolean = false,\n ): Promise {\n const accountFromSigner = (await this.wallet.getAccounts()).find(\n (account) => account.address === this.address,\n );\n if (!accountFromSigner) {\n throw new Error(\"Failed to retrieve account from signer\");\n }\n\n let signerData: SignerData;\n if (explicitSignerData) {\n signerData = explicitSignerData;\n } else {\n const { account } = await this.query.auth.account({\n address: this.address,\n });\n\n if (!account) {\n throw new Error(\n `Cannot find account \"${this.address}\", make sure it has a balance.`,\n );\n }\n\n let baseAccount: BaseAccount | undefined;\n if (account[\"@type\"] === \"/cosmos.auth.v1beta1.BaseAccount\") {\n baseAccount = account as BaseAccount;\n } else if (\n account[\"@type\"] === \"/cosmos.vesting.v1beta1.ContinuousVestingAccount\"\n ) {\n baseAccount = (account as ContinuousVestingAccount).base_vesting_account\n ?.base_account;\n } else if (\n account[\"@type\"] === \"/cosmos.vesting.v1beta1.DelayedVestingAccount\"\n ) {\n baseAccount = (account as DelayedVestingAccount).base_vesting_account\n ?.base_account;\n } else if (account[\"@type\"] === \"/cosmos.auth.v1beta1.ModuleAccount\") {\n // wat?\n baseAccount = (account as ModuleAccount).base_account;\n } else {\n throw new Error(\n `Cannot sign with account of type \"${account[\"@type\"]}\".`,\n );\n }\n\n if (!baseAccount) {\n throw new Error(\n `Cannot extract BaseAccount from \"${JSON.stringify(account)}\".`,\n );\n }\n\n signerData = {\n accountNumber: Number(baseAccount.account_number),\n sequence: Number(baseAccount.sequence),\n chainId: this.chainId,\n };\n }\n\n if (isDirectSigner(this.wallet)) {\n return this.signDirect(\n accountFromSigner,\n messages,\n fee,\n memo,\n signerData,\n simulate,\n );\n } else {\n return this.signAmino(\n accountFromSigner,\n messages,\n fee,\n memo,\n signerData,\n simulate,\n );\n }\n }\n\n private async signAmino(\n account: AccountData,\n messages: Msg[],\n fee: StdFee,\n memo: string,\n { accountNumber, sequence, chainId }: SignerData,\n simulate: boolean = false,\n ): Promise {\n if (isDirectSigner(this.wallet)) {\n throw new Error(\n \"Wrong signer type! Expected AminoSigner or AminoEip191Signer.\",\n );\n }\n\n let signMode = (\n await import(\"./protobuf/cosmos/tx/signing/v1beta1/signing\")\n ).SignMode.SIGN_MODE_LEGACY_AMINO_JSON;\n if (typeof this.wallet.getSignMode === \"function\") {\n signMode = await this.wallet.getSignMode();\n }\n\n const msgs = await Promise.all(\n messages.map(async (msg) => {\n await this.populateCodeHash(msg);\n return msg.toAmino(this.encryptionUtils);\n }),\n );\n const signDoc = makeSignDocAmino(\n msgs,\n fee,\n chainId,\n memo,\n accountNumber,\n sequence,\n );\n\n let signed: StdSignDoc;\n let signature: StdSignature;\n\n if (!simulate) {\n ({ signature, signed } = await this.wallet.signAmino(\n account.address,\n signDoc,\n ));\n } else {\n signed = signDoc;\n signature = getSimulateSignature();\n }\n\n const txBody = {\n type_url: \"/cosmos.tx.v1beta1.TxBody\",\n value: {\n messages: await Promise.all(\n messages.map(async (msg, index) => {\n await this.populateCodeHash(msg);\n const asProto: ProtoMsg = await msg.toProto(this.encryptionUtils);\n\n return asProto;\n }),\n ),\n memo: memo,\n },\n };\n const txBodyBytes = await this.encodeTx(txBody);\n const signedGasLimit = Number(signed.fee.gas);\n const signedSequence = Number(signed.sequence);\n const pubkey = await encodePubkey(encodeSecp256k1Pubkey(account.pubkey));\n const signedAuthInfoBytes = await makeAuthInfoBytes(\n [{ pubkey, sequence: signedSequence }],\n signed.fee.amount,\n signedGasLimit,\n signed.fee.granter,\n signMode,\n );\n return TxRaw.fromPartial({\n body_bytes: txBodyBytes,\n auth_info_bytes: signedAuthInfoBytes,\n signatures: [fromBase64(signature.signature)],\n });\n }\n\n private async populateCodeHash(msg: Msg) {\n if (msg instanceof MsgExecuteContract) {\n if (!msg.codeHash) {\n msg.codeHash = (\n await this.query.compute.codeHashByContractAddress({\n contract_address: msg.contractAddress,\n })\n ).code_hash!;\n }\n } else if (msg instanceof MsgInstantiateContract) {\n if (!msg.codeHash) {\n msg.codeHash = (\n await this.query.compute.codeHashByCodeId({\n code_id: msg.codeId,\n })\n ).code_hash!;\n }\n } else if (msg instanceof MsgMigrateContract) {\n if (!msg.codeHash) {\n msg.codeHash = (\n await this.query.compute.codeHashByCodeId({\n code_id: msg.codeId,\n })\n ).code_hash!;\n }\n }\n }\n\n private async encodeTx(txBody: {\n type_url: string;\n value: {\n messages: ProtoMsg[];\n memo: string;\n };\n }): Promise {\n const wrappedMessages = await Promise.all(\n txBody.value.messages.map(async (message) => {\n const binaryValue = await message.encode();\n return Any.fromPartial({\n type_url: message.type_url,\n value: binaryValue,\n });\n }),\n );\n\n const txBodyEncoded = TxBodyPb.fromPartial({\n ...txBody.value,\n messages: wrappedMessages,\n });\n return TxBodyPb.encode(txBodyEncoded).finish();\n }\n\n private async signDirect(\n account: AccountData,\n messages: Msg[],\n fee: StdFee,\n memo: string,\n { accountNumber, sequence, chainId }: SignerData,\n simulate: boolean = false,\n ): Promise {\n if (!isDirectSigner(this.wallet)) {\n throw new Error(\"Wrong signer type! Expected DirectSigner.\");\n }\n\n const txBody = {\n type_url: \"/cosmos.tx.v1beta1.TxBody\",\n value: {\n messages: await Promise.all(\n messages.map(async (msg, index) => {\n await this.populateCodeHash(msg);\n const asProto = await msg.toProto(this.encryptionUtils);\n\n return asProto;\n }),\n ),\n memo: memo,\n },\n };\n\n const txBodyBytes = await this.encodeTx(txBody);\n const pubkey = await encodePubkey(encodeSecp256k1Pubkey(account.pubkey));\n const gasLimit = Number(fee.gas);\n const authInfoBytes = await makeAuthInfoBytes(\n [{ pubkey, sequence }],\n fee.amount,\n gasLimit,\n fee.granter,\n );\n\n const signDoc = makeSignDocProto(\n txBodyBytes,\n authInfoBytes,\n chainId,\n accountNumber,\n );\n\n let signed: SignDoc | SignDocCamelCase;\n let signature: StdSignature;\n\n if (!simulate) {\n ({ signature, signed } = await this.wallet.signDirect(\n account.address,\n signDoc,\n ));\n } else {\n signed = signDoc;\n signature = getSimulateSignature();\n }\n\n if (isSignDoc(signed)) {\n // Wallet\n return TxRaw.fromPartial({\n body_bytes: signed.body_bytes,\n auth_info_bytes: signed.auth_info_bytes,\n signatures: [fromBase64(signature.signature)],\n });\n } else if (isSignDocCamelCase(signed)) {\n // cosmjs/Keplr\n return TxRaw.fromPartial({\n body_bytes: signed.bodyBytes,\n auth_info_bytes: signed.authInfoBytes,\n signatures: [fromBase64(signature.signature)],\n });\n } else {\n throw new Error(`unknown SignDoc instance: ${JSON.stringify(signed)}`);\n }\n }\n}\n\nfunction sleep(ms: number) {\n return new Promise((accept) => setTimeout(accept, ms));\n}\n\nexport function gasToFee(gasLimit: number, gasPrice: number): number {\n return Math.ceil(gasLimit * gasPrice);\n}\n\n/**\n * Creates and serializes an AuthInfo document.\n *\n * This implementation does not support different signing modes for the different signers.\n */\nasync function makeAuthInfoBytes(\n signers: ReadonlyArray<{\n readonly pubkey: import(\"./protobuf/google/protobuf/any\").Any;\n readonly sequence: number;\n }>,\n feeAmount: readonly Coin[],\n gasLimit: number,\n feeGranter?: string,\n signMode?: import(\"./protobuf/cosmos/tx/signing/v1beta1/signing\").SignMode,\n): Promise {\n if (!signMode) {\n signMode = (await import(\"./protobuf/cosmos/tx/signing/v1beta1/signing\"))\n .SignMode.SIGN_MODE_DIRECT;\n }\n\n const authInfo: AuthInfo = {\n signer_infos: makeSignerInfos(signers, signMode),\n fee: {\n amount: [...feeAmount],\n gas_limit: String(gasLimit),\n granter: feeGranter ?? \"\",\n payer: \"\",\n },\n };\n\n const { AuthInfo } = await import(\"./protobuf/cosmos/tx/v1beta1/tx\");\n return AuthInfo.encode(AuthInfo.fromPartial(authInfo)).finish();\n}\n\n/**\n * Create signer infos from the provided signers.\n *\n * This implementation does not support different signing modes for the different signers.\n */\nfunction makeSignerInfos(\n signers: ReadonlyArray<{\n readonly pubkey: import(\"./protobuf/google/protobuf/any\").Any;\n readonly sequence: number;\n }>,\n signMode: import(\"./protobuf/cosmos/tx/signing/v1beta1/signing\").SignMode,\n): import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignerInfo[] {\n return signers.map(\n ({\n pubkey,\n sequence,\n }): import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignerInfo => ({\n public_key: pubkey,\n mode_info: {\n single: { mode: signMode },\n },\n sequence: String(sequence),\n }),\n );\n}\n\n/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */\nexport interface SignDocCamelCase {\n /**\n * bodyBytes is protobuf serialization of a TxBody that matches the\n * representation in TxRaw.\n */\n bodyBytes: Uint8Array;\n /**\n * authInfoBytes is a protobuf serialization of an AuthInfo that matches the\n * representation in TxRaw.\n */\n authInfoBytes: Uint8Array;\n /**\n * chainId is the unique identifier of the chain this transaction targets.\n * It prevents signed transactions from being used on another chain by an\n * attacker\n */\n chainId: string;\n /** accountNumber is the account number of the account in state */\n accountNumber: string;\n}\n\nfunction makeSignDocProto(\n bodyBytes: Uint8Array,\n authInfoBytes: Uint8Array,\n chainId: string,\n accountNumber: number,\n): import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignDoc & SignDocCamelCase {\n return {\n body_bytes: bodyBytes,\n auth_info_bytes: authInfoBytes,\n chain_id: chainId,\n account_number: String(accountNumber),\n\n // cosmjs/Keplr\n bodyBytes,\n authInfoBytes,\n chainId,\n accountNumber: String(accountNumber),\n };\n}\n\nasync function encodePubkey(\n pubkey: Pubkey,\n): Promise {\n const { Any } = await import(\"./protobuf/google/protobuf/any\");\n\n if (isSecp256k1Pubkey(pubkey)) {\n const { PubKey } = await import(\"./protobuf/cosmos/crypto/secp256k1/keys\");\n\n const pubkeyProto = PubKey.fromPartial({\n key: fromBase64(pubkey.value),\n });\n return Any.fromPartial({\n type_url: \"/cosmos.crypto.secp256k1.PubKey\",\n value: Uint8Array.from(PubKey.encode(pubkeyProto).finish()),\n });\n } else if (isMultisigThresholdPubkey(pubkey)) {\n const { LegacyAminoPubKey } = await import(\n \"./protobuf/cosmos/crypto/multisig/keys\"\n );\n\n const pubkeyProto = LegacyAminoPubKey.fromPartial({\n threshold: Number(pubkey.value.threshold),\n public_keys: pubkey.value.pubkeys.map(encodePubkey),\n });\n return Any.fromPartial({\n type_url: \"/cosmos.crypto.multisig.LegacyAminoPubKey\",\n value: Uint8Array.from(LegacyAminoPubKey.encode(pubkeyProto).finish()),\n });\n } else {\n throw new Error(`Pubkey type ${pubkey.type} not recognized`);\n }\n}\n\nfunction isSecp256k1Pubkey(pubkey: Pubkey): boolean {\n return pubkey.type === \"tendermint/PubKeySecp256k1\";\n}\n\nfunction isMultisigThresholdPubkey(pubkey: Pubkey): boolean {\n return pubkey.type === \"tendermint/PubKeyMultisigThreshold\";\n}\n\nfunction makeSignDocAmino(\n msgs: readonly AminoMsg[],\n fee: StdFee,\n chainId: string,\n memo: string | undefined,\n accountNumber: number | string,\n sequence: number | string,\n): StdSignDoc {\n return {\n chain_id: chainId,\n account_number: String(accountNumber),\n sequence: String(sequence),\n fee: fee,\n msgs: msgs,\n memo: memo || \"\",\n };\n}\n\nexport enum TxResultCode {\n /** Success is returned if the transaction executed successfully */\n Success = 0,\n\n /** ErrInternal should never be exposed, but we reserve this code for non-specified errors */\n ErrInternal = 1,\n\n /** ErrTxDecode is returned if we cannot parse a transaction */\n ErrTxDecode = 2,\n\n /** ErrInvalidSequence is used the sequence number (nonce) is incorrect for the signature */\n ErrInvalidSequence = 3,\n\n /** ErrUnauthorized is used whenever a request without sufficient authorization is handled. */\n ErrUnauthorized = 4,\n\n /** ErrInsufficientFunds is used when the account cannot pay requested amount. */\n ErrInsufficientFunds = 5,\n\n /** ErrUnknownRequest to doc */\n ErrUnknownRequest = 6,\n\n /** ErrInvalidAddress to doc */\n ErrInvalidAddress = 7,\n\n /** ErrInvalidPubKey to doc */\n ErrInvalidPubKey = 8,\n\n /** ErrUnknownAddress to doc */\n ErrUnknownAddress = 9,\n\n /** ErrInvalidCoins to doc */\n ErrInvalidCoins = 10,\n\n /** ErrOutOfGas to doc */\n ErrOutOfGas = 11,\n\n /** ErrMemoTooLarge to doc */\n ErrMemoTooLarge = 12,\n\n /** ErrInsufficientFee to doc */\n ErrInsufficientFee = 13,\n\n /** ErrTooManySignatures to doc */\n ErrTooManySignatures = 14,\n\n /** ErrNoSignatures to doc */\n ErrNoSignatures = 15,\n\n /** ErrJSONMarshal defines an ABCI typed JSON marshalling error */\n ErrJSONMarshal = 16,\n\n /** ErrJSONUnmarshal defines an ABCI typed JSON unmarshalling error */\n ErrJSONUnmarshal = 17,\n\n /** ErrInvalidRequest defines an ABCI typed error where the request contains invalid data. */\n ErrInvalidRequest = 18,\n\n /** ErrTxInMempoolCache defines an ABCI typed error where a tx already exists in the mempool. */\n ErrTxInMempoolCache = 19,\n\n /** ErrMempoolIsFull defines an ABCI typed error where the mempool is full. */\n ErrMempoolIsFull = 20,\n\n /** ErrTxTooLarge defines an ABCI typed error where tx is too large. */\n ErrTxTooLarge = 21,\n\n /** ErrKeyNotFound defines an error when the key doesn't exist */\n ErrKeyNotFound = 22,\n\n /** ErrWrongPassword defines an error when the key password is invalid. */\n ErrWrongPassword = 23,\n\n /** ErrorInvalidSigner defines an error when the tx intended signer does not match the given signer. */\n ErrorInvalidSigner = 24,\n\n /** ErrorInvalidGasAdjustment defines an error for an invalid gas adjustment */\n ErrorInvalidGasAdjustment = 25,\n\n /** ErrInvalidHeight defines an error for an invalid height */\n ErrInvalidHeight = 26,\n\n /** ErrInvalidVersion defines a general error for an invalid version */\n ErrInvalidVersion = 27,\n\n /** ErrInvalidChainID defines an error when the chain-id is invalid. */\n ErrInvalidChainID = 28,\n\n /** ErrInvalidType defines an error an invalid type. */\n ErrInvalidType = 29,\n\n /** ErrTxTimeoutHeight defines an error for when a tx is rejected out due to an explicitly set timeout height. */\n ErrTxTimeoutHeight = 30,\n\n /** ErrUnknownExtensionOptions defines an error for unknown extension options. */\n ErrUnknownExtensionOptions = 31,\n\n /** ErrWrongSequence defines an error where the account sequence defined in the signer info doesn't match the account's actual sequence number. */\n ErrWrongSequence = 32,\n\n /** ErrPackAny defines an error when packing a protobuf message to Any fails. */\n ErrPackAny = 33,\n\n /** ErrUnpackAny defines an error when unpacking a protobuf message from Any fails. */\n ErrUnpackAny = 34,\n\n /** ErrLogic defines an internal logic error, e.g. an invariant or assertion that is violated. It is a programmer error, not a user-facing error. */\n ErrLogic = 35,\n\n /** ErrConflict defines a conflict error, e.g. when two goroutines try to access the same resource and one of them fails. */\n ErrConflict = 36,\n\n /** ErrNotSupported is returned when we call a branch of a code which is currently not supported. */\n ErrNotSupported = 37,\n\n /** ErrNotFound defines an error when requested entity doesn't exist in the state. */\n ErrNotFound = 38,\n\n /** ErrIO should be used to wrap internal errors caused by external operation. Examples: not DB domain error, file writing etc... */\n ErrIO = 39,\n\n /** ErrAppConfig defines an error occurred if min-gas-prices field in BaseConfig is empty. */\n ErrAppConfig = 40,\n\n /** ErrPanic is only set when we recover from a panic, so we know to redact potentially sensitive system info. */\n ErrPanic = 111222,\n}\n\n/**\n * Recursively converts an object of type `{ type_url: string; value: any; }`\n * to type `{ \"@type\": string; ...values }`\n */\nfunction protobufJsonToGrpcGatewayJson(obj: any): any {\n if (typeof obj !== \"object\" || obj === null) {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.map(protobufJsonToGrpcGatewayJson);\n }\n\n if (\n Object.keys(obj).length === 2 &&\n typeof obj[\"type_url\"] === \"string\" &&\n typeof obj[\"value\"] === \"object\"\n ) {\n return Object.assign(\n { \"@type\": obj[\"type_url\"] },\n protobufJsonToGrpcGatewayJson(obj[\"value\"]),\n );\n }\n\n const result: Record = {};\n\n Object.keys(obj).forEach((key) => {\n result[key] = protobufJsonToGrpcGatewayJson(obj[key]);\n });\n\n return result;\n}\n\nfunction getSimulateSignature(): StdSignature {\n return {\n pub_key: {\n type: \"tendermint/PubKeySecp256k1\",\n value: toBase64(new Uint8Array(33).fill(0)),\n },\n signature: toBase64(new Uint8Array(64).fill(0)),\n };\n}\n", "import { AminoMsg, Coin, Msg, MsgParams, ProtoMsg } from \".\";\nimport { EncryptionUtils } from \"..\";\nimport {\n GenericAuthorization as GenericAuthorizationProto,\n Grant,\n} from \"../protobuf/cosmos/authz/v1beta1/authz\";\nimport {\n MsgExec as MsgExecProto,\n MsgGrant as MsgGrantProto,\n MsgRevoke as MsgRevokeProto,\n} from \"../protobuf/cosmos/authz/v1beta1/tx\";\nimport { SendAuthorization as SendAuthorizationProto } from \"../protobuf/cosmos/bank/v1beta1/authz\";\nimport {\n StakeAuthorization as StakeAuthorizationProto,\n StakeAuthorization_Validators,\n} from \"../protobuf/cosmos/staking/v1beta1/authz\";\nimport { Any } from \"../protobuf/google/protobuf/any\";\n\nexport enum MsgGrantAuthorization {\n MsgAcknowledgement = \"/ibc.core.channel.v1.MsgAcknowledgement\",\n MsgBeginRedelegate = \"/cosmos.staking.v1beta1.MsgBeginRedelegate\",\n MsgChannelCloseConfirm = \"/ibc.core.channel.v1.MsgChannelCloseConfirm\",\n MsgChannelCloseInit = \"/ibc.core.channel.v1.MsgChannelCloseInit\",\n MsgChannelOpenAck = \"/ibc.core.channel.v1.MsgChannelOpenAck\",\n MsgChannelOpenConfirm = \"/ibc.core.channel.v1.MsgChannelOpenConfirm\",\n MsgChannelOpenInit = \"/ibc.core.channel.v1.MsgChannelOpenInit\",\n MsgChannelOpenTry = \"/ibc.core.channel.v1.MsgChannelOpenTry\",\n MsgConnectionOpenAck = \"/ibc.core.connection.v1.MsgConnectionOpenAck\",\n MsgConnectionOpenConfirm = \"/ibc.core.connection.v1.MsgConnectionOpenConfirm\",\n MsgConnectionOpenInit = \"/ibc.core.connection.v1.MsgConnectionOpenInit\",\n MsgConnectionOpenTry = \"/ibc.core.connection.v1.MsgConnectionOpenTry\",\n MsgCreateClient = \"/ibc.core.client.v1.MsgCreateClient\",\n MsgCreateValidator = \"/cosmos.staking.v1beta1.MsgCreateValidator\",\n MsgDelegate = \"/cosmos.staking.v1beta1.MsgDelegate\",\n MsgDeposit = \"/cosmos.gov.v1beta1.MsgDeposit\",\n MsgEditValidator = \"/cosmos.staking.v1beta1.MsgEditValidator\",\n MsgExec = \"/cosmos.authz.v1beta1.MsgExec\",\n MsgExecuteContract = \"/secret.compute.v1beta1.MsgExecuteContract\",\n MsgFundCommunityPool = \"/cosmos.distribution.v1beta1.MsgFundCommunityPool\",\n MsgGrant = \"/cosmos.authz.v1beta1.MsgGrant\",\n MsgGrantAllowance = \"/cosmos.feegrant.v1beta1.MsgGrantAllowance\",\n MsgInstantiateContract = \"/secret.compute.v1beta1.MsgInstantiateContract\",\n MsgMultiSend = \"/cosmos.bank.v1beta1.MsgMultiSend\",\n MsgRecvPacket = \"/ibc.core.channel.v1.MsgRecvPacket\",\n MsgRevoke = \"/cosmos.authz.v1beta1.MsgRevoke\",\n MsgRevokeAllowance = \"/cosmos.feegrant.v1beta1.MsgRevokeAllowance\",\n MsgSend = \"/cosmos.bank.v1beta1.MsgSend\",\n MsgSetWithdrawAddress = \"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress\",\n MsgStoreCode = \"/secret.compute.v1beta1.MsgStoreCode\",\n MsgSubmitEvidence = \"/cosmos.evidence.v1beta1.MsgSubmitEvidence\",\n MsgSubmitMisbehaviour = \"/ibc.core.client.v1.MsgSubmitMisbehaviour\",\n MsgSubmitProposal = \"/cosmos.gov.v1beta1.MsgSubmitProposal\",\n MsgTimeout = \"/ibc.core.channel.v1.MsgTimeout\",\n MsgTimeoutOnClose = \"/ibc.core.channel.v1.MsgTimeoutOnClose\",\n MsgTransfer = \"/ibc.applications.transfer.v1.MsgTransfer\",\n MsgUndelegate = \"/cosmos.staking.v1beta1.MsgUndelegate\",\n MsgUnjail = \"/cosmos.slashing.v1beta1.MsgUnjail\",\n MsgUpdateClient = \"/ibc.core.client.v1.MsgUpdateClient\",\n MsgUpgradeClient = \"/ibc.core.client.v1.MsgUpgradeClient\",\n MsgVerifyInvariant = \"/cosmos.crisis.v1beta1.MsgVerifyInvariant\",\n MsgVote = \"/cosmos.gov.v1beta1.MsgVote\",\n MsgVoteWeighted = \"/cosmos.gov.v1beta1.MsgVoteWeighted\",\n MsgWithdrawDelegatorReward = \"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\n MsgWithdrawValidatorCommission = \"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission\",\n}\n\n/**\n * GenericAuthorization gives the grantee unrestricted permissions to execute\n * the provided Msg on behalf of the granter's account.\n * The provided Msg must implement the Authorization interface: https://github.com/cosmos/cosmos-sdk/blob/c44309bc694ea8b6069ae147743f0b25dc8b52c0/x/authz/authorizations.go#L9-L25\n */\nexport type GenericAuthorization = {\n msg: MsgGrantAuthorization;\n};\n\nfunction isGenericAuthorization(object: any): object is GenericAuthorization {\n return \"msg\" in object;\n}\n\n/**\n * SendAuthorization allows the grantee to spend up to spend_limit coins from the granter's account.\n */\nexport interface SendAuthorization {\n spend_limit: Coin[];\n}\n\nfunction isSendAuthorization(object: any): object is SendAuthorization {\n return \"spend_limit\" in object;\n}\n\n/** StakeAuthorization defines authorization for delegate/undelegate/redelegate. */\nexport type StakeAuthorization = {\n /**\n * max_tokens specifies the maximum amount of tokens can be delegate to a validator.\n * If it is empty, there is no spend limit and any amount of coins can be delegated.\n */\n max_tokens: Coin;\n /** allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's account. */\n allow_list: string[];\n /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */\n deny_list: string[];\n /** authorization_type defines one of AuthorizationType. */\n authorization_type: StakeAuthorizationType;\n};\n\nfunction isStakeAuthorization(object: any): object is StakeAuthorization {\n return (\n \"max_tokens\" in object &&\n \"allow_list\" in object &&\n \"deny_list\" in object &&\n \"authorization_type\" in object\n );\n}\n\n/** AuthorizationType defines the type of staking module authorization type */\nexport enum StakeAuthorizationType {\n /** defines an authorization type for MsgDelegate */\n Delegate = 1,\n /** defines an authorization type for MsgUndelegate */\n Undelegate = 2,\n /** defines an authorization type for MsgBeginRedelegate */\n Redelegate = 3,\n}\n\nexport interface MsgGrantParams extends MsgParams {\n granter: string;\n grantee: string;\n authorization: GenericAuthorization | SendAuthorization | StakeAuthorization;\n /** Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. */\n expiration: number;\n}\n\n/**\n * MsgGrant is a request type for Grant method. It declares authorization to the grantee\n * on behalf of the granter with the provided expiration time.\n */\nexport class MsgGrant implements Msg {\n constructor(public params: MsgGrantParams) {}\n\n async toProto(): Promise {\n let grant: Grant;\n const expiration = {\n seconds: String(Math.floor(this.params.expiration)),\n nanos: 0,\n };\n\n if (isSendAuthorization(this.params.authorization)) {\n grant = {\n authorization: {\n type_url: \"/cosmos.bank.v1beta1.SendAuthorization\",\n value: SendAuthorizationProto.encode(\n this.params.authorization,\n ).finish(),\n },\n expiration,\n };\n } else if (isStakeAuthorization(this.params.authorization)) {\n let allow_list: StakeAuthorization_Validators | undefined = undefined;\n let deny_list: StakeAuthorization_Validators | undefined = undefined;\n\n if (this.params.authorization.allow_list?.length > 0) {\n allow_list = { address: this.params.authorization.allow_list };\n } else if (this.params.authorization.deny_list?.length > 0) {\n deny_list = { address: this.params.authorization.deny_list };\n }\n\n grant = {\n authorization: {\n type_url: \"/cosmos.staking.v1beta1.StakeAuthorization\",\n value: StakeAuthorizationProto.encode({\n max_tokens: this.params.authorization.max_tokens,\n allow_list,\n deny_list,\n authorization_type: Number(\n this.params.authorization.authorization_type,\n ),\n }).finish(),\n },\n expiration,\n };\n } else if (isGenericAuthorization(this.params.authorization)) {\n grant = {\n authorization: {\n type_url: \"/cosmos.authz.v1beta1.GenericAuthorization\",\n value: GenericAuthorizationProto.encode({\n msg: String(this.params.authorization.msg),\n }).finish(),\n },\n expiration,\n };\n } else {\n throw new Error(\"Unknown authorization type.\");\n }\n\n const msgContent = {\n granter: this.params.granter,\n grantee: this.params.grantee,\n grant: grant,\n };\n\n return {\n type_url: \"/cosmos.authz.v1beta1.MsgGrant\",\n value: msgContent,\n encode: async () => MsgGrantProto.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n let grant: {\n type: string;\n value: {\n granter: string;\n grantee: string;\n grant: {\n authorization: { type: string; value: object };\n expiration: string;\n };\n };\n } = {\n type: \"cosmos-sdk/MsgGrant\",\n value: {\n granter: this.params.granter,\n grantee: this.params.grantee,\n grant: {\n //@ts-ignore\n authorization: {}, // override later\n expiration: new Date(Math.floor(this.params.expiration) * 1000)\n .toISOString()\n .replace(/\\.\\d+Z/, \"Z\"),\n },\n },\n };\n if (isSendAuthorization(this.params.authorization)) {\n grant.value.grant.authorization = {\n type: \"cosmos-sdk/SendAuthorization\",\n value: {\n spend_limit: this.params.authorization.spend_limit,\n },\n };\n } else if (isStakeAuthorization(this.params.authorization)) {\n let Validators: { type: string; value: object };\n if (this.params.authorization.allow_list?.length > 0) {\n Validators = {\n type: \"cosmos-sdk/StakeAuthorization/AllowList\",\n value: {\n allow_list: {\n address: this.params.authorization.allow_list,\n },\n },\n };\n } else if (this.params.authorization.deny_list?.length > 0) {\n Validators = {\n type: \"cosmos-sdk/StakeAuthorization/DenyList\",\n value: {\n deny_list: {\n address: this.params.authorization.deny_list,\n },\n },\n };\n } else {\n throw new Error(\"Must pass in allow_list or deny_list.\");\n }\n\n grant.value.grant.authorization = {\n type: \"cosmos-sdk/StakeAuthorization\",\n value: {\n max_tokens: this.params.authorization.max_tokens,\n authorization_type: this.params.authorization.authorization_type,\n Validators,\n },\n };\n } else if (isGenericAuthorization(this.params.authorization)) {\n grant.value.grant.authorization = {\n type: \"cosmos-sdk/GenericAuthorization\",\n value: {\n msg: this.params.authorization.msg,\n },\n };\n } else {\n throw new Error(\"Unknown authorization type.\");\n }\n\n return grant;\n }\n}\n\nexport interface MsgExecParams extends MsgParams {\n grantee: string;\n /**\n * Authorization Msg requests to execute. Each msg must implement Authorization interface\n * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))\n * triple and validate it.\n */\n msgs: Msg[];\n}\n\n/**\n * MsgExec attempts to execute the provided messages using\n * authorizations granted to the grantee. Each message should have only\n * one signer corresponding to the granter of the authorization.\n */\nexport class MsgExec implements Msg {\n constructor(public params: MsgExecParams) {}\n\n async toProto(encryptionUtils: EncryptionUtils): Promise {\n const msgs: Any[] = [];\n for (const m of this.params.msgs) {\n const asProto = await m.toProto(encryptionUtils);\n msgs.push({\n type_url: asProto.type_url,\n value: await asProto.encode(),\n });\n }\n\n const msgContent = {\n grantee: this.params.grantee,\n msgs,\n };\n\n return {\n type_url: \"/cosmos.authz.v1beta1.MsgExec\",\n value: msgContent,\n encode: async () => MsgExecProto.encode(msgContent).finish(),\n };\n }\n\n async toAmino(encryptionUtils: EncryptionUtils): Promise {\n return {\n type: \"cosmos-sdk/MsgExec\",\n value: {\n grantee: this.params.grantee,\n msgs: await Promise.all(\n this.params.msgs.map((m) => m.toAmino(encryptionUtils)),\n ),\n },\n };\n }\n}\n\nexport interface MsgRevokeParams extends MsgParams {\n granter: string;\n grantee: string;\n /** revokes any authorization with the provided sdk.Msg type on the\n * granter's account with that has been granted to the grantee. */\n msg: MsgGrantAuthorization;\n}\n\n/**\n * MsgRevoke revokes any authorization with the provided sdk.Msg type on the\n * granter's account with that has been granted to the grantee.\n */\nexport class MsgRevoke implements Msg {\n constructor(public params: MsgRevokeParams) {}\n\n async toProto(): Promise {\n const msgContent = {\n granter: this.params.granter,\n grantee: this.params.grantee,\n msg_type_url: String(this.params.msg),\n };\n\n return {\n type_url: \"/cosmos.authz.v1beta1.MsgRevoke\",\n value: msgContent,\n encode: async () => MsgRevokeProto.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgRevoke\",\n value: {\n granter: this.params.granter,\n grantee: this.params.grantee,\n msg_type_url: String(this.params.msg),\n },\n };\n }\n}\n", "import { MsgParams } from \".\";\nimport { AminoMsg, Coin, Input, Msg, Output, ProtoMsg } from \"./types\";\n\nexport interface MsgSendParams extends MsgParams {\n from_address: string;\n to_address: string;\n amount: Coin[];\n}\n\n/** MsgSend represents a message to send coins from one account to another. */\nexport class MsgSend implements Msg {\n public from_address: string;\n public to_address: string;\n public amount: Coin[];\n\n constructor({ from_address, to_address, amount }: MsgSendParams) {\n this.from_address = from_address;\n this.to_address = to_address;\n this.amount = amount;\n }\n\n async toProto(): Promise {\n const msgContent = {\n from_address: this.from_address,\n to_address: this.to_address,\n amount: this.amount,\n };\n\n return {\n type_url: \"/cosmos.bank.v1beta1.MsgSend\",\n value: msgContent,\n encode: async () =>\n (await import(\"../protobuf/cosmos/bank/v1beta1/tx\")).MsgSend.encode(\n msgContent,\n ).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgSend\",\n value: {\n from_address: this.from_address,\n to_address: this.to_address,\n amount: this.amount,\n },\n };\n }\n}\n\nexport interface MsgMultiSendParams extends MsgParams {\n inputs: Input[];\n outputs: Output[];\n}\n\n/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */\nexport class MsgMultiSend implements Msg {\n public inputs: Input[];\n public outputs: Output[];\n\n constructor({ inputs, outputs }: MsgMultiSendParams) {\n this.inputs = inputs;\n this.outputs = outputs;\n }\n\n async toProto(): Promise {\n const msgContent = {\n inputs: this.inputs,\n outputs: this.outputs,\n };\n\n return {\n type_url: \"/cosmos.bank.v1beta1.MsgMultiSend\",\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/bank/v1beta1/tx\")\n ).MsgMultiSend.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgMultiSend\",\n value: {\n inputs: this.inputs,\n outputs: this.outputs,\n },\n };\n }\n}\n", "import { toBase64 } from \"@cosmjs/encoding\";\nimport { MsgParams } from \".\";\nimport { EncryptionUtils } from \"..\";\nimport { addressToBytes, is_gzip } from \"../utils\";\nimport { AminoMsg, Coin, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgInstantiateContractParams extends MsgParams {\n /** The actor that signed the messages */\n sender: string;\n /** The id of the contract's WASM code */\n code_id: number | string;\n /** A unique label across all contracts */\n label: string;\n /** The input message to the contract's constructor */\n init_msg: any;\n /** Funds to send to the contract */\n init_funds?: Coin[];\n /** The SHA256 hash value of the contract's WASM bytecode, represented as case-insensitive 64\n * character hex string.\n * This is used to make sure only the contract that's being invoked can decrypt the query data.\n *\n * codeHash is an optional parameter but using it will result in way faster execution time (otherwise secret.js will make an query to get the code_hash from the chain).\n *\n * Valid examples:\n * - \"af74387e276be8874f07bec3a87023ee49b0e7ebe08178c49d0a49c3c98ed60e\"\n * - \"0xaf74387e276be8874f07bec3a87023ee49b0e7ebe08178c49d0a49c3c98ed60e\"\n * - \"AF74387E276BE8874F07BEC3A87023EE49B0E7EBE08178C49D0A49C3C98ED60E\"\n * - \"0xAF74387E276BE8874F07BEC3A87023EE49B0E7EBE08178C49D0A49C3C98ED60E\"\n */\n code_hash?: string;\n /** Admin is an optional address that can execute migrations */\n admin?: string;\n}\n\nexport function getMissingCodeHashWarning(method: string): string {\n return `${new Date().toISOString()} WARNING: ${method} was used without the \"code_hash\" parameter. This is discouraged and will result in much slower execution times for your app.`;\n}\n\n/** Instantiate a contract from code id */\nexport class MsgInstantiateContract implements Msg {\n public sender: string;\n public codeId: string;\n public label: string;\n public initMsg: object;\n private initMsgEncrypted: Uint8Array | null;\n public initFunds: Coin[];\n public codeHash: string;\n private warnCodeHash: boolean = false;\n public admin: string;\n\n constructor({\n sender,\n code_id,\n label,\n init_msg,\n init_funds,\n code_hash,\n admin,\n }: MsgInstantiateContractParams) {\n this.sender = sender;\n this.codeId = String(code_id);\n this.label = label;\n this.initMsg = init_msg;\n this.initMsgEncrypted = null;\n this.initFunds = init_funds ?? [];\n this.admin = admin ?? \"\";\n\n if (code_hash) {\n this.codeHash = code_hash.replace(/^0x/, \"\").toLowerCase();\n } else {\n // codeHash will be set in SecretNetworkClient before invoking toProto() & toAimno()\n this.codeHash = \"\";\n this.warnCodeHash = true;\n console.warn(getMissingCodeHashWarning(\"MsgInstantiateContract\"));\n }\n }\n\n async toProto(utils: EncryptionUtils): Promise {\n if (this.warnCodeHash) {\n console.warn(getMissingCodeHashWarning(\"MsgInstantiateContract\"));\n }\n\n if (!this.initMsgEncrypted) {\n // The encryption uses a random nonce\n // toProto() & toAmino() are called multiple times during signing\n // so to keep the msg consistant across calls we encrypt the msg only once\n this.initMsgEncrypted = await utils.encrypt(this.codeHash, this.initMsg);\n }\n\n const msgContent = {\n sender: addressToBytes(this.sender),\n code_id: this.codeId,\n label: this.label,\n init_msg: this.initMsgEncrypted,\n init_funds: this.initFunds,\n // callback_sig & callback_code_hash are internal stuff that doesn't matter here\n callback_sig: new Uint8Array(0),\n callback_code_hash: \"\",\n admin: this.admin,\n };\n\n return {\n type_url: \"/secret.compute.v1beta1.MsgInstantiateContract\",\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/secret/compute/v1beta1/msg\")\n ).MsgInstantiateContract.encode(msgContent).finish(),\n };\n }\n\n async toAmino(utils: EncryptionUtils): Promise {\n if (this.warnCodeHash) {\n console.warn(getMissingCodeHashWarning(\"MsgInstantiateContract\"));\n }\n\n if (!this.initMsgEncrypted) {\n // The encryption uses a random nonce\n // toProto() & toAmino() are called multiple times during signing\n // so to keep the msg consistant across calls we encrypt the msg only once\n this.initMsgEncrypted = await utils.encrypt(this.codeHash, this.initMsg);\n }\n\n return {\n type: \"wasm/MsgInstantiateContract\",\n value: {\n sender: this.sender,\n code_id: this.codeId,\n label: this.label,\n init_msg: toBase64(this.initMsgEncrypted),\n init_funds: this.initFunds,\n admin: this.admin.length > 0 ? this.admin : undefined,\n },\n };\n }\n}\n\nexport interface MsgExecuteContractParams extends MsgParams {\n /** The actor that signed the messages */\n sender: string;\n /** The contract's address */\n contract_address: string;\n /** The input message */\n msg: T;\n /** Funds to send to the contract */\n sent_funds?: Coin[];\n /** The SHA256 hash value of the contract's WASM bytecode, represented as case-insensitive 64\n * character hex string.\n * This is used to make sure only the contract that's being invoked can decrypt the query data.\n *\n * codeHash is an optional parameter but using it will result in way faster execution time (otherwise secret.js will make an query to get the code_hash from the chain).\n *\n * Valid examples:\n * - \"af74387e276be8874f07bec3a87023ee49b0e7ebe08178c49d0a49c3c98ed60e\"\n * - \"0xaf74387e276be8874f07bec3a87023ee49b0e7ebe08178c49d0a49c3c98ed60e\"\n * - \"AF74387E276BE8874F07BEC3A87023EE49B0E7EBE08178C49D0A49C3C98ED60E\"\n * - \"0xAF74387E276BE8874F07BEC3A87023EE49B0E7EBE08178C49D0A49C3C98ED60E\"\n */\n code_hash?: string;\n}\n\n/** Execute a function on a contract */\nexport class MsgExecuteContract implements Msg {\n public sender: string;\n public contractAddress: string;\n public msg: T;\n private msgEncrypted: Uint8Array | null;\n public sentFunds: Coin[];\n public codeHash: string;\n private warnCodeHash: boolean = false;\n\n constructor({\n sender,\n contract_address: contractAddress,\n msg,\n sent_funds: sentFunds,\n code_hash: codeHash,\n }: MsgExecuteContractParams) {\n this.sender = sender;\n this.contractAddress = contractAddress;\n this.msg = msg;\n this.msgEncrypted = null;\n this.sentFunds = sentFunds ?? [];\n\n if (codeHash) {\n this.codeHash = codeHash.replace(/^0x/, \"\").toLowerCase();\n } else {\n // codeHash will be set in SecretNetworkClient before invoking toProto() & toAimno()\n this.codeHash = \"\";\n this.warnCodeHash = true;\n console.warn(getMissingCodeHashWarning(\"MsgExecuteContract\"));\n }\n }\n\n async toProto(utils: EncryptionUtils): Promise {\n if (this.warnCodeHash) {\n console.warn(getMissingCodeHashWarning(\"MsgExecuteContract\"));\n }\n\n if (!this.msgEncrypted) {\n // The encryption uses a random nonce\n // toProto() & toAmino() are called multiple times during signing\n // so to keep the msg consistant across calls we encrypt the msg only once\n this.msgEncrypted = await utils.encrypt(this.codeHash, this.msg);\n }\n\n const msgContent = {\n sender: addressToBytes(this.sender),\n contract: addressToBytes(this.contractAddress),\n msg: this.msgEncrypted,\n sent_funds: this.sentFunds,\n // callback_sig & callback_code_hash are internal stuff that doesn't matter here\n callback_sig: new Uint8Array(),\n callback_code_hash: \"\",\n };\n\n return {\n type_url: \"/secret.compute.v1beta1.MsgExecuteContract\",\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/secret/compute/v1beta1/msg\")\n ).MsgExecuteContract.encode(msgContent).finish(),\n };\n }\n async toAmino(utils: EncryptionUtils): Promise {\n if (this.warnCodeHash) {\n console.warn(getMissingCodeHashWarning(\"MsgExecuteContract\"));\n }\n\n if (!this.msgEncrypted) {\n // The encryption uses a random nonce\n // toProto() & toAmino() are called multiple times during signing\n // so to keep the msg consistant across calls we encrypt the msg only once\n this.msgEncrypted = await utils.encrypt(this.codeHash, this.msg);\n }\n\n return {\n type: \"wasm/MsgExecuteContract\",\n value: {\n sender: this.sender,\n contract: this.contractAddress,\n msg: toBase64(this.msgEncrypted),\n sent_funds: this.sentFunds,\n },\n };\n }\n}\n\nexport interface MsgStoreCodeParams extends MsgParams {\n /** The actor that signed the messages */\n sender: string;\n /** WASMByteCode can be raw or gzip compressed */\n wasm_byte_code: Uint8Array;\n /** Source is a valid absolute HTTPS URI to the contract's source code, optional */\n source: string;\n /** Builder is a valid docker image name with tag, optional */\n builder: string;\n}\n\n/** Upload a compiled contract to Secret Network */\nexport class MsgStoreCode implements Msg {\n public sender: string;\n public wasmByteCode: Uint8Array;\n public source: string;\n public builder: string;\n\n constructor({\n sender,\n wasm_byte_code: wasmByteCode,\n source,\n builder,\n }: MsgStoreCodeParams) {\n this.sender = sender;\n this.source = source;\n this.builder = builder;\n this.wasmByteCode = wasmByteCode;\n }\n\n private async gzipWasm() {\n if (!is_gzip(this.wasmByteCode)) {\n const pako = await import(\"pako\");\n this.wasmByteCode = pako.gzip(this.wasmByteCode, { level: 9 });\n }\n }\n\n async toProto(): Promise {\n await this.gzipWasm();\n\n const msgContent = {\n sender: addressToBytes(this.sender),\n wasm_byte_code: this.wasmByteCode,\n source: this.source,\n builder: this.builder,\n };\n\n return {\n type_url: \"/secret.compute.v1beta1.MsgStoreCode\",\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/secret/compute/v1beta1/msg\")\n ).MsgStoreCode.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n await this.gzipWasm();\n\n return {\n type: \"wasm/MsgStoreCode\",\n value: {\n sender: this.sender,\n wasm_byte_code: toBase64(this.wasmByteCode),\n source: this.source.length > 0 ? this.source : undefined,\n builder: this.builder.length > 0 ? this.builder : undefined,\n },\n };\n }\n}\n\nexport interface MsgMigrateContractParams extends MsgParams {\n /** The actor that signed the messages (should be the current admin) */\n sender: string;\n /** The contract's address */\n contract_address: string;\n /** The new code id */\n code_id: number | string;\n /** The input message */\n msg: T;\n /** The SHA256 hash value of the contract's *new* WASM bytecode, represented as case-insensitive 64 character hex string.\n * This is used to make sure only the contract that's being invoked can decrypt the query data.\n *\n * codeHash is an optional parameter but using it will result in way faster execution time (otherwise secret.js will make an query to get the code_hash from the chain).\n *\n * Valid examples:\n * - \"af74387e276be8874f07bec3a87023ee49b0e7ebe08178c49d0a49c3c98ed60e\"\n * - \"0xaf74387e276be8874f07bec3a87023ee49b0e7ebe08178c49d0a49c3c98ed60e\"\n * - \"AF74387E276BE8874F07BEC3A87023EE49B0E7EBE08178C49D0A49C3C98ED60E\"\n * - \"0xAF74387E276BE8874F07BEC3A87023EE49B0E7EBE08178C49D0A49C3C98ED60E\"\n */\n code_hash?: string;\n}\n\n/** Execute a function on a contract */\nexport class MsgMigrateContract implements Msg {\n public sender: string;\n public contractAddress: string;\n public msg: T;\n private msgEncrypted: Uint8Array | null;\n public codeId: string;\n public codeHash: string;\n private warnCodeHash: boolean = false;\n\n constructor({\n sender,\n contract_address: contractAddress,\n msg,\n code_id: codeId,\n code_hash: codeHash,\n }: MsgMigrateContractParams) {\n this.sender = sender;\n this.contractAddress = contractAddress;\n this.msg = msg;\n this.msgEncrypted = null;\n this.codeId = String(codeId);\n\n if (codeHash) {\n this.codeHash = codeHash.replace(/^0x/, \"\").toLowerCase();\n } else {\n // codeHash will be set in SecretNetworkClient before invoking toProto() & toAimno()\n this.codeHash = \"\";\n this.warnCodeHash = true;\n console.warn(getMissingCodeHashWarning(\"MsgMigrateContract\"));\n }\n }\n\n async toProto(utils: EncryptionUtils): Promise {\n if (this.warnCodeHash) {\n console.warn(getMissingCodeHashWarning(\"MsgMigrateContract\"));\n }\n\n if (!this.msgEncrypted) {\n // The encryption uses a random nonce\n // toProto() & toAmino() are called multiple times during signing\n // so to keep the msg consistant across calls we encrypt the msg only once\n this.msgEncrypted = await utils.encrypt(this.codeHash, this.msg);\n }\n\n const msgContent = {\n sender: this.sender,\n contract: this.contractAddress,\n msg: this.msgEncrypted,\n code_id: this.codeId,\n // callback_sig & callback_code_hash are internal stuff that doesn't matter here\n callback_sig: new Uint8Array(),\n callback_code_hash: \"\",\n };\n\n return {\n type_url: \"/secret.compute.v1beta1.MsgMigrateContract\",\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/secret/compute/v1beta1/msg\")\n ).MsgMigrateContract.encode(msgContent).finish(),\n };\n }\n async toAmino(utils: EncryptionUtils): Promise {\n if (this.warnCodeHash) {\n console.warn(getMissingCodeHashWarning(\"MsgMigrateContract\"));\n }\n\n if (!this.msgEncrypted) {\n // The encryption uses a random nonce\n // toProto() & toAmino() are called multiple times during signing\n // so to keep the msg consistant across calls we encrypt the msg only once\n this.msgEncrypted = await utils.encrypt(this.codeHash, this.msg);\n }\n\n return {\n type: \"wasm/MsgMigrateContract\",\n value: {\n sender: this.sender,\n contract: this.contractAddress,\n msg: toBase64(this.msgEncrypted),\n code_id: this.codeId,\n },\n };\n }\n}\n\nexport interface MsgUpdateAdminParams extends MsgParams {\n /** The actor that signed the messages (should be the current admin) */\n sender: string;\n /** New admin address to be set */\n new_admin: string;\n /** The address of the secret contract */\n contract_address: string;\n}\n\n/** MsgUpdateAdmin sets a new admin for a secret contract. */\nexport class MsgUpdateAdmin implements Msg {\n constructor(public params: MsgUpdateAdminParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/secret.compute.v1beta1.MsgUpdateAdmin\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/secret/compute/v1beta1/msg\")\n ).MsgUpdateAdmin.encode({\n sender: this.params.sender,\n new_admin: this.params.new_admin,\n contract: this.params.contract_address,\n // callback_sig is internal stuff that doesn't matter here\n callback_sig: new Uint8Array(),\n }).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"wasm/MsgUpdateAdmin\",\n value: {\n sender: this.params.sender,\n new_admin: this.params.new_admin,\n contract: this.params.contract_address,\n },\n };\n }\n}\n\nexport interface MsgClearAdminParams extends MsgParams {\n /** Sender is the actor that signed the messages (should be the current admin) */\n sender: string;\n /** Contract is the address of the smart contract */\n contract_address: string;\n}\n\n/** MsgClearAdmin removes any admin stored for a secret contract. */\nexport class MsgClearAdmin implements Msg {\n constructor(public params: MsgClearAdminParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/secret.compute.v1beta1.MsgClearAdmin\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/secret/compute/v1beta1/msg\")\n ).MsgClearAdmin.encode({\n sender: this.params.sender,\n contract: this.params.contract_address,\n // callback_sig is internal stuff that doesn't matter here\n callback_sig: new Uint8Array(),\n }).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"wasm/MsgClearAdmin\",\n value: {\n sender: this.params.sender,\n contract: this.params.contract_address,\n },\n };\n }\n}\n", "import { MsgParams } from \".\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgVerifyInvariantParams extends MsgParams {\n sender: string;\n invariant_module_name: string;\n invariant_route: string;\n}\n\n/** MsgVerifyInvariant represents a message to verify a particular invariance. */\nexport class MsgVerifyInvariant implements Msg {\n constructor(public params: MsgVerifyInvariantParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.crisis.v1beta1.MsgVerifyInvariant\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/crisis/v1beta1/tx\")\n ).MsgVerifyInvariant.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgVerifyInvariant\",\n value: {\n sender: this.params.sender || undefined,\n invariant_module_name: this.params.invariant_module_name || undefined,\n invariant_route: this.params.invariant_route || undefined,\n },\n };\n }\n}\n", "import { Coin, MsgParams } from \".\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgSetWithdrawAddressParams extends MsgParams {\n delegator_address: string;\n withdraw_address: string;\n}\n\n/**\n * MsgSetWithdrawAddress sets the withdraw address for\n * a delegator (or validator self-delegation).\n */\nexport class MsgSetWithdrawAddress implements Msg {\n constructor(public params: MsgSetWithdrawAddressParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/distribution/v1beta1/tx\")\n ).MsgSetWithdrawAddress.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgModifyWithdrawAddress\", // wtf\n value: this.params,\n };\n }\n}\n\n// proto and amino names are different, so export both names\nexport { MsgSetWithdrawAddress as MsgModifyWithdrawAddress };\n// proto and amino names are different, so export both names\nexport { MsgWithdrawDelegatorReward as MsgWithdrawDelegationReward };\n\nexport interface MsgWithdrawDelegatorRewardParams extends MsgParams {\n delegator_address: string;\n validator_address: string;\n}\n\n/**\n * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator\n * from a single validator.\n */\nexport class MsgWithdrawDelegatorReward implements Msg {\n constructor(public params: MsgWithdrawDelegatorRewardParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/distribution/v1beta1/tx\")\n ).MsgWithdrawDelegatorReward.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgWithdrawDelegationReward\", // wtf\n value: this.params,\n };\n }\n}\n\nexport interface MsgWithdrawValidatorCommissionParams extends MsgParams {\n validator_address: string;\n}\n\n/**\n * MsgWithdrawValidatorCommission withdraws the full commission to the validator\n * address.\n */\nexport class MsgWithdrawValidatorCommission implements Msg {\n constructor(public params: MsgWithdrawValidatorCommissionParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/distribution/v1beta1/tx\")\n ).MsgWithdrawValidatorCommission.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgWithdrawValidatorCommission\",\n value: this.params,\n };\n }\n}\n\nexport interface MsgFundCommunityPoolParams extends MsgParams {\n amount: Coin[];\n depositor: string;\n}\n\n/**\n * MsgFundCommunityPool allows an account to directly\n * fund the community pool.\n */\nexport class MsgFundCommunityPool implements Msg {\n constructor(public params: MsgFundCommunityPoolParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.distribution.v1beta1.MsgFundCommunityPool\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/distribution/v1beta1/tx\")\n ).MsgFundCommunityPool.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgFundCommunityPool\",\n value: this.params,\n };\n }\n}\n\nexport interface MsgSetAutoRestakeParams extends MsgParams {\n delegator_address: string;\n validator_address: string;\n enabled: boolean;\n}\n\n/**\n * MsgSetAutoRestake enables or disables auto-restaking for\n * a delegator-validator pair.\n */\nexport class MsgSetAutoRestake implements Msg {\n constructor(public params: MsgSetAutoRestakeParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.distribution.v1beta1.MsgSetAutoRestake\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/distribution/v1beta1/tx\")\n ).MsgSetAutoRestake.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgSetAutoRestake\",\n value: Object.assign({}, this.params, {\n enabled: this.params.enabled ? true : undefined,\n }),\n };\n }\n}\n", "import { MsgParams } from \".\";\nimport { AminoMsg, Coin, Input, Msg, Output, ProtoMsg } from \"./types\";\n\nexport interface MsgToggleIbcSwitchParams extends MsgParams {\n sender: string;\n}\n\n/** MsgSend represents a message to send coins from one account to another. */\nexport class MsgToggleIbcSwitch implements Msg {\n constructor(private params: MsgToggleIbcSwitchParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/secret.emergencybutton.v1beta1.MsgToggleIbcSwitch\",\n value: this.params,\n encode: async () =>\n (await import(\"../protobuf/secret/emergencybutton/v1beta1/tx\")).MsgToggleIbcSwitch.encode(\n this.params,\n ).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"emergencybutton/MsgToggleIbcSwitch\",\n value: this.params,\n };\n }\n}", "import { MsgParams } from \".\";\nimport { Any } from \"../protobuf/google/protobuf/any\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgSubmitEvidenceParams extends MsgParams {\n submitter: string;\n evidence: Any;\n}\n\n/**\n * MsgSubmitEvidence represents a message that supports submitting arbitrary\n * Evidence of misbehavior such as equivocation or counterfactual signing.\n */\nexport class MsgSubmitEvidence implements Msg {\n constructor(public params: MsgSubmitEvidenceParams) {}\n\n async toProto(): Promise {\n throw new Error(\"MsgSubmitEvidence not implemented.\");\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgSubmitEvidence not implemented.\");\n }\n}\n", "import { MsgParams } from \".\";\nimport {\n AllowedMsgAllowance as AllowedMsgAllowanceProto,\n BasicAllowance,\n PeriodicAllowance,\n} from \"../protobuf/cosmos/feegrant/v1beta1/feegrant\";\nimport {\n MsgGrantAllowance as MsgGrantAllowanceProto,\n MsgRevokeAllowance as MsgRevokeAllowanceProto,\n} from \"../protobuf/cosmos/feegrant/v1beta1/tx\";\nimport { Any } from \"../protobuf/google/protobuf/any\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgGrantAllowanceParams extends MsgParams {\n /** granter is the address of the user granting an allowance of their funds. */\n granter: string;\n /** grantee is the address of the user being granted an allowance of another user's funds. */\n grantee: string;\n /** allowance can be any of basic and filtered fee allowance. */\n allowance: BasicAllowance | PeriodicAllowance | AllowedMsgAllowance;\n}\n\nexport interface AllowedMsgAllowance {\n /** allowance can be any of basic and filtered fee allowance. */\n allowance: BasicAllowance | PeriodicAllowance;\n /** allowed_messages are the messages for which the grantee has the access. */\n allowed_messages: string[];\n}\n\nfunction isBasicAllowance(obj: any): obj is BasicAllowance {\n return \"spend_limit\" in obj;\n}\n\nfunction isPeriodicAllowance(obj: any): obj is PeriodicAllowance {\n return \"period_spend_limit\" in obj;\n}\n\nfunction isAllowedMsgAllowance(obj: any): obj is AllowedMsgAllowanceProto {\n return \"allowed_messages\" in obj;\n}\n\n/**\n * MsgGrantAllowance adds permission for Grantee to spend up to Allowance\n * of fees from the account of Granter.\n */\nexport class MsgGrantAllowance implements Msg {\n constructor(public params: MsgGrantAllowanceParams) {}\n\n async toProto(): Promise {\n let allowance: Any;\n if (isBasicAllowance(this.params.allowance)) {\n allowance = {\n type_url: \"/cosmos.feegrant.v1beta1.BasicAllowance\",\n value: BasicAllowance.encode(this.params.allowance).finish(),\n };\n } else if (isPeriodicAllowance(this.params.allowance)) {\n allowance = {\n type_url: \"/cosmos.feegrant.v1beta1.PeriodicAllowance\",\n value: PeriodicAllowance.encode(this.params.allowance).finish(),\n };\n } else if (isAllowedMsgAllowance(this.params.allowance)) {\n let internalAllowance: Any;\n if (isBasicAllowance(this.params.allowance.allowance)) {\n internalAllowance = {\n type_url: \"/cosmos.feegrant.v1beta1.BasicAllowance\",\n value: BasicAllowance.encode(\n this.params.allowance.allowance,\n ).finish(),\n };\n } else if (isPeriodicAllowance(this.params.allowance.allowance)) {\n internalAllowance = {\n type_url: \"/cosmos.feegrant.v1beta1.PeriodicAllowance\",\n value: PeriodicAllowance.encode(\n this.params.allowance.allowance,\n ).finish(),\n };\n } else {\n throw new Error(\n `PeriodicAllowance: Cannot cast allowance into 'BasicAllowance' or 'PeriodicAllowance': ${JSON.stringify(\n this.params.allowance.allowance,\n )}`,\n );\n }\n\n allowance = {\n type_url: \"/cosmos.feegrant.v1beta1.AllowedMsgAllowance\",\n value: AllowedMsgAllowanceProto.encode({\n allowed_messages: this.params.allowance.allowed_messages,\n allowance: internalAllowance,\n }).finish(),\n };\n } else {\n throw new Error(\n `Cannot cast allowance into 'BasicAllowance', 'PeriodicAllowance' or 'AllowedMsgAllowance': ${JSON.stringify(\n this.params.allowance,\n )}`,\n );\n }\n\n return {\n type_url: \"/cosmos.feegrant.v1beta1.MsgGrantAllowance\",\n value: this.params,\n encode: async () =>\n MsgGrantAllowanceProto.encode({\n grantee: this.params.grantee,\n granter: this.params.granter,\n allowance,\n }).finish(),\n };\n }\n\n async toAmino(): Promise {\n let allowance: { type: string; value: object };\n if (isBasicAllowance(this.params.allowance)) {\n allowance = {\n type: \"cosmos-sdk/BasicAllowance\",\n value: {\n spend_limit: this.params.allowance.spend_limit,\n expiration: this.params.allowance.expiration,\n },\n };\n } else if (isPeriodicAllowance(this.params.allowance)) {\n allowance = {\n type: \"cosmos-sdk/PeriodicAllowance\",\n value: {\n basic: this.params.allowance.basic,\n period: this.params.allowance.period,\n period_spend_limit: this.params.allowance.period_spend_limit,\n period_can_spend: this.params.allowance.period_can_spend,\n period_reset: this.params.allowance.period_reset,\n },\n };\n } else if (isAllowedMsgAllowance(this.params.allowance)) {\n let internalAllowance: { type: string; value: object };\n if (isBasicAllowance(this.params.allowance.allowance)) {\n internalAllowance = {\n type: \"cosmos-sdk/BasicAllowance\",\n value: {\n spend_limit: this.params.allowance.allowance.spend_limit,\n expiration: this.params.allowance.allowance.expiration,\n },\n };\n } else if (isPeriodicAllowance(this.params.allowance.allowance)) {\n internalAllowance = {\n type: \"cosmos-sdk/PeriodicAllowance\",\n value: {\n basic: this.params.allowance.allowance.basic,\n period: this.params.allowance.allowance.period,\n period_spend_limit:\n this.params.allowance.allowance.period_spend_limit,\n period_can_spend: this.params.allowance.allowance.period_can_spend,\n period_reset: this.params.allowance.allowance.period_reset,\n },\n };\n } else {\n throw new Error(\n `PeriodicAllowance: Cannot cast allowance into 'BasicAllowance' or 'PeriodicAllowance': ${JSON.stringify(\n this.params.allowance.allowance,\n )}`,\n );\n }\n\n allowance = {\n type: \"cosmos-sdk/AllowedMsgAllowance\",\n value: {\n allowed_messages: this.params.allowance.allowed_messages,\n allowance: internalAllowance,\n },\n };\n } else {\n throw new Error(\n `Cannot cast allowance into 'BasicAllowance', 'PeriodicAllowance' or 'AllowedMsgAllowance': ${JSON.stringify(\n this.params.allowance,\n )}`,\n );\n }\n\n return {\n type: \"cosmos-sdk/MsgGrantAllowance\",\n value: {\n granter: this.params.granter,\n grantee: this.params.grantee,\n allowance: allowance,\n },\n };\n }\n}\n\nexport interface MsgRevokeAllowanceParams extends MsgParams {\n /** granter is the address of the user granting an allowance of their funds. */\n granter: string;\n /** grantee is the address of the user being granted an allowance of another user's funds. */\n grantee: string;\n}\n\n/** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */\nexport class MsgRevokeAllowance implements Msg {\n constructor(public params: MsgRevokeAllowanceParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.feegrant.v1beta1.MsgRevokeAllowance\",\n value: this.params,\n encode: async () => MsgRevokeAllowanceProto.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgRevokeAllowance\",\n value: this.params,\n };\n }\n}\n", "import BigNumber from \"bignumber.js\";\nimport { Coin, MsgParams } from \"..\";\nimport { Any } from \"../protobuf/google/protobuf/any\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\nexport type ProposalContent =\n | import(\"../protobuf/cosmos/gov/v1beta1/gov\").TextProposal\n | import(\"../protobuf/cosmos/distribution/v1beta1/distribution\").CommunityPoolSpendProposal\n | import(\"../protobuf/cosmos/params/v1beta1/params\").ParameterChangeProposal\n | import(\"../protobuf/ibc/core/client/v1/client\").ClientUpdateProposal\n | import(\"../protobuf/ibc/core/client/v1/client\").UpgradeProposal\n | import(\"../protobuf/cosmos/upgrade/v1beta1/upgrade\").SoftwareUpgradeProposal\n | import(\"../protobuf/cosmos/upgrade/v1beta1/upgrade\").CancelSoftwareUpgradeProposal;\n\n/** VoteOption enumerates the valid vote options for a given governance proposal. */\nexport enum VoteOption {\n /** VOTE_OPTION_UNSPECIFIED defines a no-op vote option. */\n VOTE_OPTION_UNSPECIFIED = 0,\n /** VOTE_OPTION_YES defines a yes vote option. */\n VOTE_OPTION_YES = 1,\n /** VOTE_OPTION_ABSTAIN defines an abstain vote option. */\n VOTE_OPTION_ABSTAIN = 2,\n /** VOTE_OPTION_NO defines a no vote option. */\n VOTE_OPTION_NO = 3,\n /** VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */\n VOTE_OPTION_NO_WITH_VETO = 4,\n}\n\n/** ProposalStatus enumerates the valid statuses of a proposal. */\nexport enum ProposalStatus {\n /** PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. */\n PROPOSAL_STATUS_UNSPECIFIED = 0,\n /** PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. */\n PROPOSAL_STATUS_DEPOSIT_PERIOD = 1,\n /** PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. */\n PROPOSAL_STATUS_VOTING_PERIOD = 2,\n /** PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. */\n PROPOSAL_STATUS_PASSED = 3,\n /** PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. */\n PROPOSAL_STATUS_REJECTED = 4,\n /** PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. */\n PROPOSAL_STATUS_FAILED = 5,\n UNRECOGNIZED = -1,\n}\n\n/** ParamChange defines an individual parameter change, for use in ParameterChangeProposal. */\nexport type ParamChange = {\n subspace: string;\n key: string;\n value: string;\n};\n\nexport enum ProposalType {\n TextProposal = \"TextProposal\",\n CommunityPoolSpendProposal = \"CommunityPoolSpendProposal\",\n /**\n * @see {@link https://docs.scrt.network/guides/governance} for possible subspaces, keys and values.\n */\n ParameterChangeProposal = \"ParameterChangeProposal\",\n /** Not supported with Amino signer. */\n ClientUpdateProposal = \"ClientUpdateProposal\",\n /** Not supported with Amino signer. */\n UpgradeProposal = \"UpgradeProposal\",\n SoftwareUpgradeProposal = \"SoftwareUpgradeProposal\",\n CancelSoftwareUpgradeProposal = \"CancelSoftwareUpgradeProposal\",\n}\n\nconst proposalTypeToAminoType: Map = new Map([\n [ProposalType.TextProposal, \"cosmos-sdk/TextProposal\"],\n [\n ProposalType.CommunityPoolSpendProposal,\n \"cosmos-sdk/CommunityPoolSpendProposal\",\n ],\n [ProposalType.ParameterChangeProposal, \"cosmos-sdk/ParameterChangeProposal\"],\n [ProposalType.SoftwareUpgradeProposal, \"cosmos-sdk/SoftwareUpgradeProposal\"],\n [\n ProposalType.CancelSoftwareUpgradeProposal,\n \"cosmos-sdk/CancelSoftwareUpgradeProposal\",\n ],\n]);\n\nexport interface MsgSubmitProposalParams {\n type: ProposalType;\n content: ProposalContent;\n initial_deposit: Coin[];\n proposer: string;\n is_expedited?: boolean;\n}\n\n/**\n * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary\n * proposal Content.\n */\nexport class MsgSubmitProposal implements Msg {\n constructor(public params: MsgSubmitProposalParams) {}\n\n async toProto(): Promise {\n let content: Any;\n\n switch (this.params.type) {\n case ProposalType.TextProposal:\n const { TextProposal } = await import(\n \"../protobuf/cosmos/gov/v1beta1/gov\"\n );\n content = Any.fromPartial({\n type_url: \"/cosmos.gov.v1beta1.TextProposal\",\n value: TextProposal.encode(\n TextProposal.fromPartial(this.params.content),\n ).finish(),\n });\n break;\n\n case ProposalType.CommunityPoolSpendProposal:\n const { CommunityPoolSpendProposal } = await import(\n \"../protobuf/cosmos/distribution/v1beta1/distribution\"\n );\n content = Any.fromPartial({\n type_url: \"/cosmos.distribution.v1beta1.CommunityPoolSpendProposal\",\n value: CommunityPoolSpendProposal.encode(\n CommunityPoolSpendProposal.fromPartial(this.params.content),\n ).finish(),\n });\n break;\n\n case ProposalType.ParameterChangeProposal:\n const { ParameterChangeProposal } = await import(\n \"../protobuf/cosmos/params/v1beta1/params\"\n );\n content = Any.fromPartial({\n type_url: \"/cosmos.params.v1beta1.ParameterChangeProposal\",\n value: ParameterChangeProposal.encode(\n ParameterChangeProposal.fromPartial(this.params.content),\n ).finish(),\n });\n break;\n\n case ProposalType.ClientUpdateProposal:\n const { ClientUpdateProposal } = await import(\n \"../protobuf/ibc/core/client/v1/client\"\n );\n content = Any.fromPartial({\n type_url: \"/ibc.core.client.v1.ClientUpdateProposal\",\n value: ClientUpdateProposal.encode(\n ClientUpdateProposal.fromPartial(this.params.content),\n ).finish(),\n });\n break;\n\n case ProposalType.UpgradeProposal:\n const { UpgradeProposal } = await import(\n \"../protobuf/ibc/core/client/v1/client\"\n );\n content = Any.fromPartial({\n type_url: \"/ibc.core.client.v1.UpgradeProposal\",\n value: UpgradeProposal.encode(\n UpgradeProposal.fromPartial(this.params.content),\n ).finish(),\n });\n break;\n\n case ProposalType.SoftwareUpgradeProposal:\n const { SoftwareUpgradeProposal } = await import(\n \"../protobuf/cosmos/upgrade/v1beta1/upgrade\"\n );\n content = Any.fromPartial({\n type_url: \"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal\",\n value: SoftwareUpgradeProposal.encode(\n SoftwareUpgradeProposal.fromPartial(this.params.content),\n ).finish(),\n });\n break;\n\n case ProposalType.CancelSoftwareUpgradeProposal:\n const { CancelSoftwareUpgradeProposal } = await import(\n \"../protobuf/cosmos/upgrade/v1beta1/upgrade\"\n );\n content = Any.fromPartial({\n type_url: \"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal\",\n value: CancelSoftwareUpgradeProposal.encode(\n CancelSoftwareUpgradeProposal.fromPartial(this.params.content),\n ).finish(),\n });\n break;\n\n default:\n throw new Error(\n `Unknown proposal type: \"${this.params.type}\" - ${JSON.stringify(\n this.params.content,\n )}`,\n );\n }\n\n const msgContent = {\n content: content,\n initial_deposit: this.params.initial_deposit,\n proposer: this.params.proposer,\n is_expedited: this.params.is_expedited ?? false,\n };\n\n return {\n type_url: `/cosmos.gov.v1beta1.MsgSubmitProposal`,\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/gov/v1beta1/tx\")\n ).MsgSubmitProposal.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n const contentType = proposalTypeToAminoType.get(this.params.type);\n if (!contentType) {\n throw new Error(\n `Proposal of type \"${String(\n this.params.type,\n )}\" is not supported with an Amino signer.`,\n );\n }\n\n let content: any = this.params.content;\n if (this.params.type === ProposalType.SoftwareUpgradeProposal) {\n if (content.plan) {\n content = {\n ...content,\n plan: {\n ...content.plan,\n time: \"0001-01-01T00:00:00Z\",\n },\n };\n }\n }\n\n return {\n type: \"cosmos-sdk/MsgSubmitProposal\",\n value: {\n content: {\n type: contentType,\n value: content,\n },\n initial_deposit: this.params.initial_deposit,\n proposer: this.params.proposer,\n is_expedited: this.params.is_expedited ? true : undefined,\n },\n };\n }\n}\n\n/** MsgVote defines a message to cast a vote. */\n\nexport interface MsgVoteParams extends MsgParams {\n proposal_id: string;\n voter: string;\n option: VoteOption;\n}\n\nexport class MsgVote implements Msg {\n constructor(public params: MsgVoteParams) {}\n\n async toProto(): Promise {\n return {\n type_url: `/cosmos.gov.v1beta1.MsgVote`,\n value: this.params,\n encode: async () =>\n (await import(\"../protobuf/cosmos/gov/v1beta1/tx\")).MsgVote.encode(\n this.params,\n ).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgVote\",\n value: this.params,\n };\n }\n}\n\n/** WeightedVoteOption defines a unit of vote for vote split. */\nexport interface WeightedVoteOption {\n /** option is a {@link VoteOption}. */\n option: VoteOption;\n /** weight is a number between 0 and 1 with precision of 18 decimals. */\n weight: number;\n}\n\nexport interface MsgVoteWeightedParams extends MsgParams {\n voter: string;\n proposal_id: string;\n options: WeightedVoteOption[];\n}\n\n/** MsgVoteWeighted defines a message to cast a vote, with an option to split the vote. */\nexport class MsgVoteWeighted implements Msg {\n constructor(public params: MsgVoteWeightedParams) {}\n\n async toProto(): Promise {\n const msgContent = {\n voter: this.params.voter,\n proposal_id: this.params.proposal_id,\n options: this.params.options.map((o) => ({\n option: o.option,\n weight: new BigNumber(o.weight).toFixed(18).replace(/0\\.0*/, \"\"),\n })),\n };\n\n return {\n type_url: `/cosmos.gov.v1beta1.MsgVoteWeighted`,\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/gov/v1beta1/tx\")\n ).MsgVoteWeighted.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n const msgContent = {\n voter: this.params.voter,\n proposal_id: this.params.proposal_id,\n options: this.params.options.map((o) => ({\n option: o.option,\n weight: new BigNumber(o.weight).toFixed(18),\n })),\n };\n\n return {\n type: \"cosmos-sdk/MsgVoteWeighted\",\n value: msgContent,\n };\n }\n}\n\nexport interface MsgDepositParams extends MsgParams {\n proposal_id: string;\n depositor: string;\n amount: Coin[];\n}\n\n/** MsgDeposit defines a message to submit a deposit to an existing proposal. */\nexport class MsgDeposit implements Msg {\n constructor(public params: MsgDepositParams) {}\n\n async toProto(): Promise {\n return {\n type_url: `/cosmos.gov.v1beta1.MsgDeposit`,\n value: this.params,\n encode: async () =>\n (await import(\"../protobuf/cosmos/gov/v1beta1/tx\")).MsgDeposit.encode(\n this.params,\n ).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgDeposit\",\n value: this.params,\n };\n }\n}\n", "import { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\n/** MsgRecvPacket receives incoming IBC packet */\nexport class MsgRecvPacket implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgRecvPacket,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgRecvPacket\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgRecvPacket.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgRecvPacket doesn't support Amino encoding.\");\n }\n}\n\n/** MsgTimeout receives timed-out packet */\nexport class MsgTimeout implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgTimeout,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgTimeout\",\n value: this.msg,\n encode: async () =>\n (await import(\"../protobuf/ibc/core/channel/v1/tx\")).MsgTimeout.encode(\n this.msg,\n ).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgTimeout doesn't support Amino encoding.\");\n }\n}\n\n/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */\nexport class MsgTimeoutOnClose implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgTimeoutOnClose,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgTimeoutOnClose\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgTimeoutOnClose.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgTimeoutOnClose doesn't support Amino encoding.\");\n }\n}\n\n/**\n * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It\n * is called by a relayer on Chain A.\n */\nexport class MsgChannelOpenInit implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgChannelOpenInit,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgChannelOpenInit\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgChannelOpenInit.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgChannelOpenInit doesn't support Amino encoding.\");\n }\n}\n\n/** MsgAcknowledgement receives incoming IBC acknowledgement */\nexport class MsgAcknowledgement implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgAcknowledgement,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgAcknowledgement\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgAcknowledgement.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgAcknowledgement doesn't support Amino encoding.\");\n }\n}\n\n/**\n * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel\n * on Chain B.\n */\nexport class MsgChannelOpenTry implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgChannelOpenTry,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgChannelOpenTry\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgChannelOpenTry.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgChannelOpenTry doesn't support Amino encoding.\");\n }\n}\n\n/**\n * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge\n * the change of channel state to TRYOPEN on Chain B.\n */\nexport class MsgChannelOpenAck implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgChannelOpenAck,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgChannelOpenAck\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgChannelOpenAck.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgChannelOpenAck doesn't support Amino encoding.\");\n }\n}\n\n/**\n * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to\n * acknowledge the change of channel state to OPEN on Chain A.\n */\nexport class MsgChannelOpenConfirm implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgChannelOpenConfirm,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgChannelOpenConfirm\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgChannelOpenConfirm.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgChannelOpenConfirm doesn't support Amino encoding.\");\n }\n}\n\n/**\n * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A\n * to close a channel with Chain B.\n */\nexport class MsgChannelCloseInit implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgChannelCloseInit,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgChannelCloseInit\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgChannelCloseInit.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgChannelCloseInit doesn't support Amino encoding.\");\n }\n}\n\n/** MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of channel state to CLOSED on Chain A. */\nexport class MsgChannelCloseConfirm implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/channel/v1/tx\").MsgChannelCloseConfirm,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.channel.v1.MsgChannelCloseConfirm\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/channel/v1/tx\")\n ).MsgChannelCloseConfirm.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgChannelCloseConfirm doesn't support Amino encoding.\");\n }\n}\n", "import { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\n/** MsgUpdateClient defines an sdk.Msg to update a IBC client state using the given header. */\nexport class MsgUpdateClient implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/client/v1/tx\").MsgUpdateClient,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.client.v1.MsgUpdateClient\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/client/v1/tx\")\n ).MsgUpdateClient.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgUpdateClient doesn't support Amino encoding.\");\n }\n}\n\n/** MsgUpdateClient defines an sdk.Msg to update a IBC client state using the given header. */\nexport class MsgUpgradeClient implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/client/v1/tx\").MsgUpgradeClient,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.client.v1.MsgUpgradeClient\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/client/v1/tx\")\n ).MsgUpgradeClient.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgUpgradeClient doesn't support Amino encoding.\");\n }\n}\n\n/** MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for light client misbehaviour. */\nexport class MsgSubmitMisbehaviour implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/client/v1/tx\").MsgSubmitMisbehaviour,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.client.v1.MsgSubmitMisbehaviour\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/client/v1/tx\")\n ).MsgSubmitMisbehaviour.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgSubmitMisbehaviour doesn't support Amino encoding.\");\n }\n}\n\n/** MsgCreateClient defines a message to create an IBC client */\nexport class MsgCreateClient implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/client/v1/tx\").MsgCreateClient,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.client.v1.MsgCreateClient\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/client/v1/tx\")\n ).MsgCreateClient.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgCreateClient doesn't support Amino encoding.\");\n }\n}\n", "import { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\n/** MsgConnectionOpenInit defines the msg sent by an account on Chain A to initialize a connection with Chain B. */\nexport class MsgConnectionOpenInit implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/connection/v1/tx\").MsgConnectionOpenInit,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.connection.v1.MsgConnectionOpenInit\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/connection/v1/tx\")\n ).MsgConnectionOpenInit.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgConnectionOpenInit doesn't support Amino encoding.\");\n }\n}\n\n/** MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a connection on Chain B. */\nexport class MsgConnectionOpenTry implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/connection/v1/tx\").MsgConnectionOpenTry,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.connection.v1.MsgConnectionOpenTry\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/connection/v1/tx\")\n ).MsgConnectionOpenTry.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgConnectionOpenTry doesn't support Amino encoding.\");\n }\n}\n\n/** MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to acknowledge the change of connection state to TRYOPEN on Chain B. */\nexport class MsgConnectionOpenAck implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/connection/v1/tx\").MsgConnectionOpenAck,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.connection.v1.MsgConnectionOpenAck\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/connection/v1/tx\")\n ).MsgConnectionOpenAck.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgConnectionOpenAck doesn't support Amino encoding.\");\n }\n}\n\n/** MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of connection state to OPEN on Chain A. */\nexport class MsgConnectionOpenConfirm implements Msg {\n constructor(\n private msg: import(\"../protobuf/ibc/core/connection/v1/tx\").MsgConnectionOpenConfirm,\n ) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.core.connection.v1.MsgConnectionOpenConfirm\",\n value: this.msg,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/core/connection/v1/tx\")\n ).MsgConnectionOpenConfirm.encode(this.msg).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgConnectionOpenConfirm doesn't support Amino encoding.\");\n }\n}\n", "import { MsgParams } from \".\";\nimport { Fee, PacketFee } from \"../protobuf/ibc/applications/fee/v1/fee\";\nimport {\n MsgPayPacketFeeAsync as MsgPayPacketFeeAsyncProto,\n MsgPayPacketFee as MsgPayPacketFeeProto,\n MsgRegisterCounterpartyPayee as MsgRegisterCounterpartyPayeeProto,\n MsgRegisterPayee as MsgRegisterPayeeProto,\n} from \"../protobuf/ibc/applications/fee/v1/tx\";\nimport { PacketId } from \"../protobuf/ibc/core/channel/v1/channel\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgRegisterPayeeParams extends MsgParams {\n /** unique port identifier */\n port_id: string;\n /** unique channel identifier */\n channel_id: string;\n /** the relayer address */\n relayer: string;\n /** the payee address */\n payee: string;\n}\n\n/** MsgRegisterPayee defines the request type for the RegisterPayee rpc */\nexport class MsgRegisterPayee implements Msg {\n constructor(public params: MsgRegisterPayeeParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.applications.fee.v1.MsgRegisterPayee\",\n value: this.params,\n encode: async () => MsgRegisterPayeeProto.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgRegisterPayee\",\n value: this.params,\n };\n }\n}\n\nexport interface MsgRegisterCounterpartyPayeeParams extends MsgParams {\n /** unique port identifier */\n port_id: string;\n /** unique channel identifier */\n channel_id: string;\n /** the relayer address */\n relayer: string;\n /** the counterparty payee address */\n counterparty_payee: string;\n}\n\n/** MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc */\nexport class MsgRegisterCounterpartyPayee implements Msg {\n constructor(public params: MsgRegisterCounterpartyPayeeParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee\",\n value: this.params,\n encode: async () =>\n MsgRegisterCounterpartyPayeeProto.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgRegisterCounterpartyPayee\",\n value: this.params,\n };\n }\n}\n\nexport interface MsgPayPacketFeeParams extends MsgParams {\n /** fee encapsulates the recv, ack and timeout fees associated with an IBC packet */\n fee: Fee;\n /** the source port unique identifier */\n source_port_id: string;\n /** the source channel unique identifer */\n source_channel_id: string;\n /** account address to refund fee if necessary */\n signer: string;\n /** optional list of relayers permitted to the receive packet fees */\n relayers?: string[];\n}\n\n/**\n * MsgPayPacketFee defines the request type for the PayPacketFee rpc\n * This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be\n * paid for\n */\nexport class MsgPayPacketFee implements Msg {\n constructor(public params: MsgPayPacketFeeParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.applications.fee.v1.MsgPayPacketFee\",\n value: this.params,\n encode: async () =>\n MsgPayPacketFeeProto.encode({\n fee: this.params.fee,\n source_port_id: this.params.source_port_id,\n source_channel_id: this.params.source_channel_id,\n signer: this.params.signer,\n relayers: this.params.relayers || [],\n }).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgPayPacketFee\",\n value: this.params,\n };\n }\n}\n\nexport interface MsgPayPacketFeeAsyncParams extends MsgParams {\n /** unique packet identifier comprised of the channel ID, port ID and sequence */\n packet_id: PacketId;\n /** the packet fee associated with a particular IBC packet */\n packet_fee: PacketFee;\n}\n\n/**\n * MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc\n * This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send)\n */\nexport class MsgPayPacketFeeAsync implements Msg {\n constructor(public params: MsgPayPacketFeeAsyncParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/ibc.applications.fee.v1.MsgPayPacketFeeAsync\",\n value: this.params,\n encode: async () =>\n MsgPayPacketFeeAsyncProto.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgPayPacketFeeAsync\",\n value: this.params,\n };\n }\n}\n", "import { MsgParams } from \".\";\nimport { AminoMsg, Coin, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgTransferParams extends MsgParams {\n /** the port on which the packet will be sent */\n source_port: string;\n /** the channel by which the packet will be sent */\n source_channel: string;\n /** the tokens to be transferred */\n token: Coin;\n /** the sender address */\n sender: string;\n /** the recipient address on the destination chain */\n receiver: string;\n /**\n * Timeout height relative to the current block height.\n * The timeout is disabled when undefined or set to 0.\n */\n timeout_height?: Height;\n /**\n * Timeout timestamp (in seconds) since Unix epoch.\n * The timeout is disabled when undefined or set to 0.\n */\n timeout_timestamp?: string;\n /** optional memo */\n memo?: string;\n}\n\n/**\n * Height is a monotonically increasing data type\n * that can be compared against another Height for the purposes of updating and\n * freezing clients\n *\n * Normally the RevisionHeight is incremented at each height while keeping\n * RevisionNumber the same. However some consensus algorithms may choose to\n * reset the height in certain conditions e.g. hard forks, state-machine\n * breaking changes In these cases, the RevisionNumber is incremented so that\n * height continues to be monitonically increasing even as the RevisionHeight\n * gets reset\n */\nexport type Height = {\n /** the revision that the client is currently on */\n revision_number: string;\n /** the height within the given revision */\n revision_height: string;\n};\n\n/**\n * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between\n * ICS20 enabled chains. See ICS Spec here:\n * https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures\n */\nexport class MsgTransfer implements Msg {\n constructor(public params: MsgTransferParams) {}\n\n async toProto(): Promise {\n const msgContent = {\n source_port: this.params.source_port,\n source_channel: this.params.source_channel,\n token: this.params.token,\n sender: this.params.sender,\n receiver: this.params.receiver,\n timeout_height: this.params.timeout_height,\n timeout_timestamp: this.params.timeout_timestamp\n ? `${this.params.timeout_timestamp}000000000` // sec -> ns\n : \"0\",\n memo: this.params.memo || \"\",\n };\n\n return {\n type_url: \"/ibc.applications.transfer.v1.MsgTransfer\",\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/ibc/applications/transfer/v1/tx\")\n ).MsgTransfer.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgTransfer\",\n value: {\n source_port: this.params.source_port,\n source_channel: this.params.source_channel,\n token: this.params.token,\n sender: this.params.sender,\n receiver: this.params.receiver,\n timeout_height: this.params.timeout_height\n ? {\n revision_number: this.params.timeout_height.revision_number,\n revision_height: this.params.timeout_height.revision_height,\n }\n : {},\n timeout_timestamp: this.params.timeout_timestamp\n ? `${this.params.timeout_timestamp}000000000` // sec -> ns\n : \"0\",\n memo: this.params.memo,\n },\n };\n }\n}\n", "import {\n MsgExec,\n MsgGrant,\n MsgRevoke,\n} from \"../protobuf/cosmos/authz/v1beta1/tx\";\nimport { MsgMultiSend, MsgSend } from \"../protobuf/cosmos/bank/v1beta1/tx\";\nimport { MsgVerifyInvariant } from \"../protobuf/cosmos/crisis/v1beta1/tx\";\nimport {\n MsgFundCommunityPool,\n MsgSetAutoRestake,\n MsgSetWithdrawAddress,\n MsgWithdrawDelegatorReward,\n MsgWithdrawValidatorCommission,\n} from \"../protobuf/cosmos/distribution/v1beta1/tx\";\nimport { MsgSubmitEvidence } from \"../protobuf/cosmos/evidence/v1beta1/tx\";\nimport {\n MsgGrantAllowance,\n MsgRevokeAllowance,\n} from \"../protobuf/cosmos/feegrant/v1beta1/tx\";\nimport {\n MsgDeposit,\n MsgSubmitProposal,\n MsgVote,\n MsgVoteWeighted,\n} from \"../protobuf/cosmos/gov/v1beta1/tx\";\nimport { MsgUnjail } from \"../protobuf/cosmos/slashing/v1beta1/tx\";\nimport {\n MsgBeginRedelegate,\n MsgCreateValidator,\n MsgDelegate,\n MsgEditValidator,\n MsgUndelegate,\n} from \"../protobuf/cosmos/staking/v1beta1/tx\";\nimport { MsgCreateVestingAccount } from \"../protobuf/cosmos/vesting/v1beta1/tx\";\nimport {\n MsgPayPacketFee,\n MsgPayPacketFeeAsync,\n MsgRegisterCounterpartyPayee,\n MsgRegisterPayee,\n} from \"../protobuf/ibc/applications/fee/v1/tx\";\nimport { MsgTransfer } from \"../protobuf/ibc/applications/transfer/v1/tx\";\nimport {\n MsgAcknowledgement,\n MsgChannelCloseConfirm,\n MsgChannelCloseInit,\n MsgChannelOpenAck,\n MsgChannelOpenConfirm,\n MsgChannelOpenInit,\n MsgChannelOpenTry,\n MsgRecvPacket,\n MsgTimeout,\n MsgTimeoutOnClose,\n} from \"../protobuf/ibc/core/channel/v1/tx\";\nimport {\n MsgCreateClient,\n MsgSubmitMisbehaviour,\n MsgUpdateClient,\n MsgUpgradeClient,\n} from \"../protobuf/ibc/core/client/v1/tx\";\nimport {\n MsgConnectionOpenAck,\n MsgConnectionOpenConfirm,\n MsgConnectionOpenInit,\n MsgConnectionOpenTry,\n} from \"../protobuf/ibc/core/connection/v1/tx\";\nimport {\n MsgClearAdmin,\n MsgExecuteContract,\n MsgInstantiateContract,\n MsgMigrateContract,\n MsgStoreCode,\n MsgUpdateAdmin,\n} from \"../protobuf/secret/compute/v1beta1/msg\";\nimport { MsgToggleIbcSwitch } from \"../protobuf/secret/emergencybutton/v1beta1/tx\";\nimport { RaAuthenticate } from \"../protobuf/secret/registration/v1beta1/msg\";\n\nexport * from \"./authz\";\nexport * from \"./bank\";\nexport * from \"./compute\";\nexport * from \"./crisis\";\nexport * from \"./distribution\";\nexport * from \"./emergency_button\";\nexport * from \"./evidence\";\nexport * from \"./feegrant\";\nexport * from \"./gov\";\nexport * from \"./ibc_channel\";\nexport * from \"./ibc_client\";\nexport * from \"./ibc_connection\";\nexport * from \"./ibc_fee\";\nexport * from \"./ibc_transfer\";\nexport * from \"./slashing\";\nexport * from \"./staking\";\nexport * from \"./types\";\nexport * from \"./vesting\";\n\nexport type MsgDecoder = {\n decode(input: Uint8Array): any;\n};\n\nexport const MsgRegistry = new Map([\n [\"/cosmos.authz.v1beta1.MsgGrant\", MsgGrant],\n [\"/cosmos.authz.v1beta1.MsgExec\", MsgExec],\n [\"/cosmos.authz.v1beta1.MsgRevoke\", MsgRevoke],\n [\"/cosmos.bank.v1beta1.MsgSend\", MsgSend],\n [\"/cosmos.bank.v1beta1.MsgMultiSend\", MsgMultiSend],\n [\"/cosmos.crisis.v1beta1.MsgVerifyInvariant\", MsgVerifyInvariant],\n [\"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress\", MsgSetWithdrawAddress],\n [\n \"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\n MsgWithdrawDelegatorReward,\n ],\n [\n \"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission\",\n MsgWithdrawValidatorCommission,\n ],\n [\"/cosmos.distribution.v1beta1.MsgFundCommunityPool\", MsgFundCommunityPool],\n [\"/cosmos.distribution.v1beta1.MsgSetAutoRestake\", MsgSetAutoRestake],\n [\"/cosmos.evidence.v1beta1.MsgSubmitEvidence\", MsgSubmitEvidence],\n [\"/cosmos.feegrant.v1beta1.MsgGrantAllowance\", MsgGrantAllowance],\n [\"/cosmos.feegrant.v1beta1.MsgRevokeAllowance\", MsgRevokeAllowance],\n [\"/cosmos.gov.v1beta1.MsgSubmitProposal\", MsgSubmitProposal],\n [\"/cosmos.gov.v1beta1.MsgVote\", MsgVote],\n [\"/cosmos.gov.v1beta1.MsgVoteWeighted\", MsgVoteWeighted],\n [\"/cosmos.gov.v1beta1.MsgDeposit\", MsgDeposit],\n [\"/cosmos.slashing.v1beta1.MsgUnjail\", MsgUnjail],\n [\"/cosmos.staking.v1beta1.MsgCreateValidator\", MsgCreateValidator],\n [\"/cosmos.staking.v1beta1.MsgEditValidator\", MsgEditValidator],\n [\"/cosmos.staking.v1beta1.MsgDelegate\", MsgDelegate],\n [\"/cosmos.staking.v1beta1.MsgBeginRedelegate\", MsgBeginRedelegate],\n [\"/cosmos.staking.v1beta1.MsgUndelegate\", MsgUndelegate],\n [\"/ibc.applications.transfer.v1.MsgTransfer\", MsgTransfer],\n [\"/ibc.applications.fee.v1.MsgPayPacketFee\", MsgPayPacketFee],\n [\"/ibc.applications.fee.v1.MsgPayPacketFeeAsync\", MsgPayPacketFeeAsync],\n [\"/ibc.applications.fee.v1.MsgRegisterPayee\", MsgRegisterPayee],\n [\n \"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee\",\n MsgRegisterCounterpartyPayee,\n ],\n [\"/ibc.core.channel.v1.MsgChannelOpenInit\", MsgChannelOpenInit],\n [\"/ibc.core.channel.v1.MsgChannelOpenTry\", MsgChannelOpenTry],\n [\"/ibc.core.channel.v1.MsgChannelOpenAck\", MsgChannelOpenAck],\n [\"/ibc.core.channel.v1.MsgChannelOpenConfirm\", MsgChannelOpenConfirm],\n [\"/ibc.core.channel.v1.MsgChannelCloseInit\", MsgChannelCloseInit],\n [\"/ibc.core.channel.v1.MsgChannelCloseConfirm\", MsgChannelCloseConfirm],\n [\"/ibc.core.channel.v1.MsgRecvPacket\", MsgRecvPacket],\n [\"/ibc.core.channel.v1.MsgTimeout\", MsgTimeout],\n [\"/ibc.core.channel.v1.MsgTimeoutOnClose\", MsgTimeoutOnClose],\n [\"/ibc.core.channel.v1.MsgAcknowledgement\", MsgAcknowledgement],\n [\"/ibc.core.client.v1.MsgCreateClient\", MsgCreateClient],\n [\"/ibc.core.client.v1.MsgUpdateClient\", MsgUpdateClient],\n [\"/ibc.core.client.v1.MsgUpgradeClient\", MsgUpgradeClient],\n [\"/ibc.core.client.v1.MsgSubmitMisbehaviour\", MsgSubmitMisbehaviour],\n [\"/ibc.core.connection.v1.MsgConnectionOpenInit\", MsgConnectionOpenInit],\n [\"/ibc.core.connection.v1.MsgConnectionOpenTry\", MsgConnectionOpenTry],\n [\"/ibc.core.connection.v1.MsgConnectionOpenAck\", MsgConnectionOpenAck],\n [\n \"/ibc.core.connection.v1.MsgConnectionOpenConfirm\",\n MsgConnectionOpenConfirm,\n ],\n [\"/secret.compute.v1beta1.MsgStoreCode\", MsgStoreCode],\n [\"/secret.compute.v1beta1.MsgInstantiateContract\", MsgInstantiateContract],\n [\"/secret.compute.v1beta1.MsgExecuteContract\", MsgExecuteContract],\n [\"/secret.compute.v1beta1.MsgMigrateContract\", MsgMigrateContract],\n [\"/secret.compute.v1beta1.MsgUpdateAdmin\", MsgUpdateAdmin],\n [\"/secret.compute.v1beta1.MsgClearAdmin\", MsgClearAdmin],\n [\"/secret.registration.v1beta1.RaAuthenticate\", RaAuthenticate],\n [\"/cosmos.vesting.v1beta1.MsgCreateVestingAccount\", MsgCreateVestingAccount],\n [\"/secret.emergencybutton.v1beta1.MsgToggleIbcSwitch\", MsgToggleIbcSwitch],\n]);\n", "import { toBase64 } from \"@cosmjs/encoding\";\nimport { MsgParams } from \".\";\nimport { addressToBytes } from \"..\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\nexport interface RaAuthenticateParams extends MsgParams {\n sender: string;\n certificate: Uint8Array;\n}\n\n/** RaAuthenticate defines a message to register an new node. */\nexport class RaAuthenticate implements Msg {\n constructor(public params: RaAuthenticateParams) {}\n\n async toProto(): Promise {\n const msgContent = {\n sender: addressToBytes(this.params.sender),\n certificate: this.params.certificate,\n };\n\n return {\n type_url: \"/secret.registration.v1beta1.RaAuthenticate\",\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/secret/registration/v1beta1/msg\")\n ).RaAuthenticate.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"reg/authenticate\",\n value: {\n sender: this.params.sender,\n ra_cert: toBase64(this.params.certificate),\n },\n };\n }\n}\n", "import { MsgParams } from \".\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgUnjailParams extends MsgParams {\n validator_addr: string;\n}\n\n/** MsgUnjail defines a message to release a validator from jail. */\nexport class MsgUnjail implements Msg {\n constructor(public params: MsgUnjailParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.slashing.v1beta1.MsgUnjail\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/slashing/v1beta1/tx\")\n ).MsgUnjail.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgUnjail\",\n value: {\n address: this.params.validator_addr,\n },\n };\n }\n}\n", "import { fromBase64 } from \"@cosmjs/encoding\";\nimport { bech32 } from \"bech32\";\nimport BigNumber from \"bignumber.js\";\nimport { Coin, MsgParams } from \".\";\nimport { PubKey } from \"../protobuf/cosmos/crypto/ed25519/keys\";\nimport { Any } from \"../protobuf/google/protobuf/any\";\nimport { AminoMsg, Msg, ProtoMsg } from \"./types\";\n\n/**\n * CommissionRates defines the initial commission rates to be used for creating\n * a validator.\n */\nexport type CommissionRates = {\n /** rate is the commission rate charged to delegators, as a fraction. */\n rate: number;\n /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */\n max_rate: number;\n /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */\n max_change_rate: number;\n};\n\n/** Description defines a validator description. */\nexport type ValidatorDescription = {\n /** moniker defines a human-readable name for the validator. */\n moniker: string;\n /** identity defines an optional identity signature (ex. UPort or Keybase). */\n identity: string;\n /** website defines an optional website link. */\n website: string;\n /** security_contact defines an optional email for security contact. */\n security_contact: string;\n /** details define other optional details. */\n details: string;\n};\n\nexport interface MsgCreateValidatorParams extends MsgParams {\n description: ValidatorDescription;\n commission: CommissionRates;\n /** minSelfDelegation is the minimum uscrt amount that\n * the self delegator must delegate to its validator. */\n min_self_delegation: string;\n /** selfDelegatorAddress is the self-delegator, which is the owner of the validator */\n delegator_address: string;\n /** pubkey is a base64 string representation of the validator's ed25519 pubkey (32 bytes).*/\n pubkey: string;\n /** initial delegation from the self-delegator to its validator */\n initial_delegation: Coin;\n}\n\n/** MsgCreateValidator defines an SDK message for creating a new validator. */\nexport class MsgCreateValidator implements Msg {\n constructor(public params: MsgCreateValidatorParams) {}\n\n async toProto(): Promise {\n const msgContent = {\n description: this.params.description,\n commission: {\n rate: new BigNumber(this.params.commission.rate)\n .toFixed(18)\n .replace(/0\\.0*/, \"\"),\n max_rate: new BigNumber(this.params.commission.max_rate)\n .toFixed(18)\n .replace(/0\\.0*/, \"\"),\n max_change_rate: new BigNumber(this.params.commission.max_change_rate)\n .toFixed(18)\n .replace(/0\\.0*/, \"\"),\n },\n min_self_delegation: this.params.min_self_delegation,\n delegator_address: this.params.delegator_address,\n validator_address: bech32.encode(\n \"secretvaloper\",\n bech32.decode(this.params.delegator_address).words,\n ),\n pubkey: Any.fromPartial({\n type_url: \"/cosmos.crypto.ed25519.PubKey\",\n value: PubKey.encode(\n PubKey.fromPartial({\n key: fromBase64(this.params.pubkey),\n }),\n ).finish(),\n }),\n value: this.params.initial_delegation,\n };\n\n return {\n type_url: `/cosmos.staking.v1beta1.MsgCreateValidator`,\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/staking/v1beta1/tx\")\n ).MsgCreateValidator.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgCreateValidator\",\n value: {\n description: {\n moniker: this.params.description.moniker,\n identity: this.params.description.identity,\n website: this.params.description.website,\n security_contact: this.params.description.security_contact,\n details: this.params.description.details,\n },\n commission: {\n rate: new BigNumber(this.params.commission.rate).toFixed(18),\n max_rate: new BigNumber(this.params.commission.max_rate).toFixed(18),\n max_change_rate: new BigNumber(\n this.params.commission.max_change_rate,\n ).toFixed(18),\n },\n min_self_delegation: this.params.min_self_delegation,\n delegator_address: this.params.delegator_address,\n validator_address: bech32.encode(\n \"secretvaloper\",\n bech32.decode(this.params.delegator_address).words,\n ),\n pubkey: {\n type: \"tendermint/PubKeyEd25519\",\n value: this.params.pubkey,\n },\n value: this.params.initial_delegation,\n },\n };\n }\n}\n\nexport interface MsgEditValidatorParams extends MsgParams {\n validator_address: string;\n /** if description is provided it updates all values */\n description?: ValidatorDescription;\n commission_rate?: number;\n min_self_delegation?: string;\n}\n\n/** MsgEditValidator defines an SDK message for editing an existing validator. */\nexport class MsgEditValidator implements Msg {\n constructor(public params: MsgEditValidatorParams) {}\n\n async toProto(): Promise {\n const { Description } = await import(\n \"../protobuf/cosmos/staking/v1beta1/staking\"\n );\n\n const msgContent = {\n validator_address: this.params.validator_address,\n description: Description.fromPartial(this.params.description || {}),\n commission_rate: this.params.commission_rate\n ? new BigNumber(this.params.commission_rate)\n .toFixed(18)\n .replace(/0\\.0*/, \"\")\n : \"\",\n min_self_delegation: this.params.min_self_delegation || \"\",\n };\n\n return {\n type_url: `/cosmos.staking.v1beta1.MsgEditValidator`,\n value: msgContent,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/staking/v1beta1/tx\")\n ).MsgEditValidator.encode(msgContent).finish(),\n };\n }\n\n async toAmino(): Promise {\n let description;\n if (this.params.description) {\n description = {\n moniker: this.params.description.moniker,\n identity: this.params.description.identity,\n website: this.params.description.website,\n security_contact: this.params.description.security_contact,\n details: this.params.description.details,\n };\n }\n\n let commission_rate;\n if (this.params.commission_rate) {\n commission_rate = new BigNumber(this.params.commission_rate).toFixed(18);\n }\n\n return {\n type: \"cosmos-sdk/MsgEditValidator\",\n value: {\n validator_address: this.params.validator_address,\n description,\n commission_rate,\n min_self_delegation: this.params.min_self_delegation,\n },\n };\n }\n}\n\nexport interface MsgDelegateParams extends MsgParams {\n delegator_address: string;\n validator_address: string;\n amount: Coin;\n}\n\n/** MsgDelegate defines an SDK message for performing a delegation of coins from a delegator to a validator. */\nexport class MsgDelegate implements Msg {\n constructor(public params: MsgDelegateParams) {}\n\n async toProto(): Promise {\n return {\n type_url: `/cosmos.staking.v1beta1.MsgDelegate`,\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/staking/v1beta1/tx\")\n ).MsgDelegate.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgDelegate\",\n value: this.params,\n };\n }\n}\n\nexport interface MsgBeginRedelegateParams extends MsgParams {\n delegator_address: string;\n validator_src_address: string;\n validator_dst_address: string;\n amount: Coin;\n}\n\n/** MsgBeginRedelegate defines an SDK message for performing a redelegation of coins from a delegator and source validator to a destination validator. */\nexport class MsgBeginRedelegate implements Msg {\n constructor(public params: MsgBeginRedelegateParams) {}\n\n async toProto(): Promise {\n return {\n type_url: `/cosmos.staking.v1beta1.MsgBeginRedelegate`,\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/staking/v1beta1/tx\")\n ).MsgBeginRedelegate.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgBeginRedelegate\",\n value: this.params,\n };\n }\n}\n\nexport interface MsgUndelegateParams {\n delegator_address: string;\n validator_address: string;\n amount: Coin;\n}\n\n/** MsgUndelegate defines an SDK message for performing an undelegation from a delegate and a validator */\nexport class MsgUndelegate implements Msg {\n constructor(public params: MsgUndelegateParams) {}\n\n async toProto(): Promise {\n return {\n type_url: `/cosmos.staking.v1beta1.MsgUndelegate`,\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/staking/v1beta1/tx\")\n ).MsgUndelegate.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n return {\n type: \"cosmos-sdk/MsgUndelegate\",\n value: this.params,\n };\n }\n}\n", "import { MsgParams } from \".\";\nimport { AminoMsg, Coin, Msg, ProtoMsg } from \"./types\";\n\nexport interface MsgCreateVestingAccountParams extends MsgParams {\n from_address: string;\n to_address: string;\n amount: Coin[];\n /** end of vesting as unix time (in seconds). */\n end_time: string;\n delayed: boolean;\n}\n\n/** MsgCreateVestingAccount defines a message that enables creating a vesting account. */\nexport class MsgCreateVestingAccount implements Msg {\n constructor(public params: MsgCreateVestingAccountParams) {}\n\n async toProto(): Promise {\n return {\n type_url: \"/cosmos.vesting.v1beta1.MsgCreateVestingAccount\",\n value: this.params,\n encode: async () =>\n (\n await import(\"../protobuf/cosmos/vesting/v1beta1/tx\")\n ).MsgCreateVestingAccount.encode(this.params).finish(),\n };\n }\n\n async toAmino(): Promise {\n throw new Error(\"MsgCreateVestingAccount not implemented.\");\n }\n}\n", "import { fromBase64, toHex, toUtf8 } from \"@cosmjs/encoding\";\nimport { ripemd160 } from \"@noble/hashes/ripemd160\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { bech32 } from \"bech32\";\nimport { Coin } from \"./tx\";\n\n/**\n *\n * Copied here to avoid unnecessary deps\n *\n * MIT License\n *\n * Copyright (c) Kevin Mårtensson (github.com/kevva)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @param buf\n */\nexport const is_gzip = (buf: Buffer | Uint8Array): boolean => {\n if (!buf || buf.length < 3) {\n return false;\n }\n\n return buf[0] === 0x1f && buf[1] === 0x8b && buf[2] === 0x08;\n};\n\n/**\n * Convert a secp256k1 compressed public key to an address\n *\n * @param {Uint8Array} pubkey The account's pubkey, should be 33 bytes (compressed secp256k1)\n * @param {String} [prefix=\"secret\"] The address' bech32 prefix. Defaults to `\"secret\"`.\n * @returns the account's address\n */\nexport function pubkeyToAddress(\n pubkey: Uint8Array,\n prefix: string = \"secret\",\n): string {\n return bech32.encode(prefix, bech32.toWords(ripemd160(sha256(pubkey))));\n}\n\n/**\n * Convert a secp256k1 compressed public key to an address\n *\n * @param {Uint8Array} pubkey The account's pubkey as base64 string, should be 33 bytes (compressed secp256k1)\n * @param {String} [prefix=\"secret\"] The address' bech32 prefix. Defaults to `\"secret\"`.\n * @returns the account's address\n */\nexport function base64PubkeyToAddress(\n pubkey: string,\n prefix: string = \"secret\",\n): string {\n return pubkeyToAddress(fromBase64(pubkey), prefix);\n}\n\n/**\n * Convert self delegator address to validator address\n *\n * @param {String} selfDelegator The self delegator bech32 encoded address\n * @param {String} [prefix=\"secret\"] The self delegator address' bech32 prefix. Defaults to `\"secret\"`.\n * @returns the account's address\n */\nexport function selfDelegatorAddressToValidatorAddress(\n selfDelegator: string,\n prefix: string = \"secret\",\n): string {\n return bech32.encode(`${prefix}valoper`, bech32.decode(selfDelegator).words);\n}\n\n/**\n * Convert self delegator address to validator address\n *\n * @param {String} validator The validator bech32 encoded address\n * @param {String} [prefix=\"secret\"] The self delegator address' bech32 prefix. Defaults to `\"secret\"`.\n * @returns the account's address\n */\nexport function validatorAddressToSelfDelegatorAddress(\n validator: string,\n prefix: string = \"secret\",\n): string {\n return bech32.encode(prefix, bech32.decode(validator).words);\n}\n\n/**\n * Convert a Tendermint ed25519 public key to a consensus address\n *\n * @param {Uint8Array} pubkey The tendermint pubkey, should be 32 bytes (ed25519)\n * @param {String} [prefix=\"secret\"] The valcons address' bech32 prefix. Defaults to `\"secret\"`.\n * @returns the valcons account's address\n */\nexport function tendermintPubkeyToValconsAddress(\n pubkey: Uint8Array,\n prefix: string = \"secret\",\n): string {\n return bech32.encode(\n `${prefix}valcons`,\n bech32.toWords(sha256(pubkey).slice(0, 20)),\n );\n}\n\n/**\n * Convert a secp256k1 compressed public key to an address\n *\n * @param {Uint8Array} pubkey The account's pubkey as base64 string, should be 33 bytes (compressed secp256k1)\n * @param {String} [prefix=\"secret\"] The address' bech32 prefix. Defaults to `\"secret\"`.\n * @returns the account's address\n */\nexport function base64TendermintPubkeyToValconsAddress(\n pubkey: string,\n prefix: string = \"secret\",\n): string {\n return tendermintPubkeyToValconsAddress(fromBase64(pubkey), prefix);\n}\n\n/**\n * Compute the IBC denom of a token that was sent over IBC.\n *\n * For example, to get the IBC denom of SCRT on mainnet Osmosis:\n * ```\n * ibcDenom([{incomingPortId: \"transfer\", incomingChannelId: \"channel-88\"}], \"uscrt\")\n * ```\n */\nexport const ibcDenom = (\n paths: {\n incomingPortId: string;\n incomingChannelId: string;\n }[],\n coinMinimalDenom: string,\n): string => {\n const prefixes = [];\n for (const path of paths) {\n prefixes.push(`${path.incomingPortId}/${path.incomingChannelId}`);\n }\n\n const prefix = prefixes.join(\"/\");\n const denom = `${prefix}/${coinMinimalDenom}`;\n\n return \"ibc/\" + toHex(sha256(toUtf8(denom))).toUpperCase();\n};\n\n/**\n * E.g. `\"1uscrt\"` => `{amount:\"1\",denom:\"uscrt\"}`\n */\nexport const stringToCoin = (coinAsString: string): Coin => {\n const regexMatch = coinAsString.match(/^(\\d+)([a-z]+)$/);\n\n if (regexMatch === null) {\n throw new Error(`cannot extract denom & amount from '${coinAsString}'`);\n }\n\n return { amount: regexMatch[1], denom: regexMatch[2] };\n};\n\n/**\n * E.g. `\"1uscrt\"` => `{amount:\"1\",denom:\"uscrt\"}`\n */\nexport const coinFromString = stringToCoin;\n\n/**\n * E.g. `\"1uscrt,1uatom,1uosmo\"` =>\n * `[{amount:\"1\",denom:\"uscrt\"},{amount:\"1\",denom:\"uatom\"},{amount:\"1\",denom:\"uosmo\"}]`\n */\nexport const stringToCoins = (coinsAsString: string): Coin[] =>\n coinsAsString.split(\",\").map(stringToCoin);\n\n/**\n * E.g. `\"1uscrt,1uatom,1uosmo\"` =>\n * `[{amount:\"1\",denom:\"uscrt\"},{amount:\"1\",denom:\"uatom\"},{amount:\"1\",denom:\"uosmo\"}]`\n */\nexport const coinsFromString = stringToCoins;\n\n/**\n * validateAddress checks if a given address is a valid address\n * @param {string} address the address to check\n * @param {string?} prefix the address prefix, defaults to `\"secret\"`\n * @returns `{ isValid: true }` if valid, `{ isValid: false, reason: \"...\" }` if not valid\n */\nexport const validateAddress = (\n address: string,\n prefix: string = \"secret\",\n): { isValid: boolean; reason?: string } => {\n let decoded;\n try {\n decoded = bech32.decode(address);\n } catch (e) {\n let reason = \"failed to decode address as a bech32\";\n if (e instanceof Error) {\n reason += `: ${e.message}`;\n }\n return { isValid: false, reason };\n }\n\n if (decoded.prefix !== prefix) {\n return {\n isValid: false,\n reason: `wrong bech32 prefix, expected '${prefix}', got '${decoded.prefix}'`,\n };\n }\n\n const canonicalAddress = bech32.fromWords(decoded.words);\n if (canonicalAddress.length !== 20 && canonicalAddress.length !== 32) {\n return {\n isValid: false,\n reason: `wrong address length, expected 20 or 32 bytes, got ${canonicalAddress.length}`,\n };\n }\n\n return {\n isValid: true,\n };\n};\n\n/**\n * Converts an address from a bech32 string to the bytes representation.\n * @param {string} address - The address bech32 string to convert.\n * @returns {Uint8Array} - The resulting bytes address.\n */\nexport function addressToBytes(address: string): Uint8Array {\n if (address === \"\") {\n return new Uint8Array(0);\n }\n return Uint8Array.from(bech32.fromWords(bech32.decode(address).words));\n}\n\n/**\n * Converts an address from bytes to the strong representation.\n * @param {Uint8Array} bytes - The address bytes to convert.\n * @param {string} prefix - The bech32 prefix to use.\n * @returns {string} - The resulting bech32 string address.\n */\nexport function bytesToAddress(\n bytes: Uint8Array,\n prefix: string = \"secret\",\n): string {\n if (bytes.length === 0) {\n return \"\";\n }\n return bech32.encode(prefix, bech32.toWords(bytes));\n}\n", "import { toBase64, toUtf8 } from \"@cosmjs/encoding\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport * as secp256k1 from \"@noble/secp256k1\";\nimport * as bip32 from \"bip32\";\nimport * as bip39 from \"bip39\";\nimport { AminoMsg, Coin, pubkeyToAddress, SignDocCamelCase } from \".\";\n\nexport const SECRET_COIN_TYPE = 529;\nexport const SECRET_BECH32_PREFIX = \"secret\";\n\nexport type WalletOptions = {\n hdAccountIndex?: number;\n coinType?: number;\n bech32Prefix?: string;\n};\n\n/**\n * AminoWallet is a wallet capable of signing on the legacy Amino encoding.\n * Amino encoding is still a must-use when signing with Ledger and thus still\n * supported in the chain, but is phased out slowly.\n *\n * In secret.js AminoWallet is mainly used for testing and should not be used\n * for anything else. The reason is that some Msg types don't support Amino\n * encoding anymore and thus won't work with this wallet (and Ledger).\n * Msgs that do support Amino encoding also must encode with Protobuf,\n * so if a Msg is working as intended with AminoWallet, it'll also work with {@link Wallet}.\n *\n * For reference, even txs that are signed using Amino, are sent to the chain\n * using Protobuf encoding, so inside the chain the tx is converted to Amino\n * in order to verify the signature.\n * */\nexport class AminoWallet {\n /** The mnemonic phrase used to derive this account */\n public readonly mnemonic: string;\n /** The account index in the HD derivation path */\n public readonly hdAccountIndex: number;\n /** The coin type in the HD derivation path */\n public readonly coinType: number;\n /** The secp256k1 private key that was derived from `mnemonic` + `hdAccountIndex` */\n public readonly privateKey: Uint8Array;\n /** The secp256k1 public key that was derived from `privateKey` */\n public readonly publicKey: Uint8Array;\n /** The account's secret address, derived from `publicKey` */\n public readonly address: string;\n /** The bech32 prefix for the account's address */\n private readonly bech32Prefix: string;\n\n /**\n * @param {String} mnemonic Import mnemonic or generate random if empty\n * @param {Number} [options.hdAccountIndex] The account index in the HD derivation path. Defaults to `0`.\n * @param {Number} [options.coinType] The coin type in the HD derivation path. Defaults to Secret's `529`.\n * @param {String} [options.bech32Prefix] The bech32 prefix for the account's address. Defaults tp `\"secret\"`\n */\n constructor(mnemonic: string = \"\", options: WalletOptions = {}) {\n if (mnemonic === \"\") {\n mnemonic = bip39.generateMnemonic(256 /* 24 words */);\n }\n this.mnemonic = mnemonic;\n\n this.hdAccountIndex = options.hdAccountIndex ?? 0;\n this.coinType = options.coinType ?? SECRET_COIN_TYPE;\n this.bech32Prefix = options.bech32Prefix ?? SECRET_BECH32_PREFIX;\n\n const seed = bip39.mnemonicToSeedSync(this.mnemonic);\n const node = bip32.fromSeed(seed);\n const secretHD = node.derivePath(\n `m/44'/${this.coinType}'/0'/0/${this.hdAccountIndex}`,\n );\n const privateKey = secretHD.privateKey;\n\n if (!privateKey) {\n throw new Error(\"Failed to derive key pair\");\n }\n\n this.privateKey = new Uint8Array(privateKey);\n this.publicKey = secp256k1.getPublicKey(this.privateKey, true);\n\n this.address = pubkeyToAddress(this.publicKey, this.bech32Prefix);\n }\n\n public async getAccounts(): Promise {\n return [\n {\n address: this.address,\n algo: \"secp256k1\",\n pubkey: this.publicKey,\n },\n ];\n }\n\n public async signAmino(\n signerAddress: string,\n signDoc: StdSignDoc,\n ): Promise {\n if (signerAddress !== this.address) {\n throw new Error(`Address ${signerAddress} not found in wallet`);\n }\n\n const messageHash = sha256(serializeStdSignDoc(signDoc));\n\n const signature = await secp256k1.sign(messageHash, this.privateKey, {\n extraEntropy: true,\n der: false,\n });\n\n return {\n signed: signDoc,\n signature: encodeSecp256k1Signature(this.publicKey, signature),\n };\n }\n}\n\n/**\n * Takes a binary pubkey and signature to create a signature object\n *\n * @param pubkey a compressed secp256k1 public key\n * @param signature a 64 byte fixed length representation of secp256k1 signature components r and s\n */\nexport function encodeSecp256k1Signature(\n pubkey: Uint8Array,\n signature: Uint8Array,\n): StdSignature {\n if (signature.length !== 64) {\n throw new Error(\n \"Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.\",\n );\n }\n\n return {\n pub_key: encodeSecp256k1Pubkey(pubkey),\n signature: toBase64(signature),\n };\n}\n\nexport function encodeSecp256k1Pubkey(pubkey: Uint8Array): Pubkey {\n if (pubkey.length !== 33 || (pubkey[0] !== 0x02 && pubkey[0] !== 0x03)) {\n throw new Error(\n \"Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03\",\n );\n }\n return {\n type: \"tendermint/PubKeySecp256k1\",\n value: toBase64(pubkey),\n };\n}\n\nexport type AminoSignResponse = {\n /**\n * The sign doc that was signed.\n * This may be different from the input signDoc when the signer modifies it as part of the signing process.\n */\n readonly signed: StdSignDoc;\n readonly signature: StdSignature;\n};\n\n/**\n * The document to be signed\n *\n * @see https://docs.cosmos.network/master/modules/auth/03_types.html#stdsigndoc\n */\nexport type StdSignDoc = {\n readonly chain_id: string;\n readonly account_number: string;\n readonly sequence: string;\n readonly fee: StdFee;\n readonly msgs: readonly AminoMsg[];\n readonly memo: string;\n};\n\nexport type StdFee = {\n readonly amount: readonly Coin[];\n readonly gas: string;\n readonly granter?: string;\n};\n\nexport type StdSignature = {\n readonly pub_key: Pubkey;\n readonly pubKey?: Pubkey; // cosmjs/Keplr\n readonly signature: string;\n};\n\nexport type Pubkey = {\n // type is one of the strings defined in pubkeyType\n // I don't use a string literal union here as that makes trouble with json test data:\n // https://github.com/cosmos/cosmjs/pull/44#pullrequestreview-353280504\n readonly type: string;\n readonly value: any;\n};\n\ntype Algo = \"secp256k1\" | \"ed25519\" | \"sr25519\";\n\nexport type AccountData = {\n /** A printable address (typically bech32 encoded) */\n readonly address: string;\n readonly algo: Algo;\n readonly pubkey: Uint8Array;\n};\n\nexport function sortObject(obj: any): any {\n if (typeof obj !== \"object\" || obj === null) {\n return obj;\n }\n if (Array.isArray(obj)) {\n return obj.map(sortObject);\n }\n const sortedKeys = Object.keys(obj).sort();\n const result: Record = {};\n // NOTE: Use forEach instead of reduce for performance with large objects eg Wasm code\n sortedKeys.forEach((key) => {\n result[key] = sortObject(obj[key]);\n });\n return result;\n}\n\n/** Returns a JSON string with objects sorted by key, used for Amino signing */\nfunction jsonSortedStringify(obj: any): string {\n return JSON.stringify(sortObject(obj));\n}\n\nexport function serializeStdSignDoc(signDoc: StdSignDoc): Uint8Array {\n return toUtf8(jsonSortedStringify(signDoc));\n}\n\nexport type DirectSigner = {\n readonly getAccounts: () => Promise;\n readonly signDirect: (\n signerAddress: string,\n signDoc:\n | import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignDoc\n | SignDocCamelCase,\n ) => Promise;\n};\n\nexport function isSignDoc(\n object: any,\n): object is import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignDoc {\n return (\n \"body_bytes\" in object &&\n \"auth_info_bytes\" in object &&\n \"chain_id\" in object &&\n \"account_number\" in object\n );\n}\n\nexport function isSignDocCamelCase(object: any): object is SignDocCamelCase {\n return (\n \"bodyBytes\" in object &&\n \"authInfoBytes\" in object &&\n \"chainId\" in object &&\n \"accountNumber\" in object\n );\n}\n\nexport type DirectSignResponse = {\n /**\n * The sign doc that was signed.\n * This may be different from the input signDoc when the signer modifies it as part of the signing process.\n */\n readonly signed:\n | import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignDoc\n | SignDocCamelCase;\n readonly signature: StdSignature;\n};\n\nexport type Signer = AminoSigner | DirectSigner;\n\nexport function isDirectSigner(signer: Signer): signer is DirectSigner {\n return (signer as DirectSigner).signDirect !== undefined;\n}\n\nexport interface AminoSigner {\n /**\n * Get SignMode for signing a tx.\n */\n readonly getSignMode?: () => Promise<\n import(\"./protobuf/cosmos/tx/signing/v1beta1/signing\").SignMode\n >;\n\n /**\n * Get AccountData array from wallet. Rejects if not enabled.\n */\n readonly getAccounts: () => Promise;\n\n /**\n * Request signature from whichever key corresponds to provided bech32-encoded address. Rejects if not enabled.\n *\n * The signer implementation may offer the user the ability to override parts of the signDoc. It must\n * return the doc that was signed in the response.\n *\n * @param signerAddress The address of the account that should sign the transaction\n * @param signDoc The content that should be signed\n */\n readonly signAmino: (\n signerAddress: string,\n signDoc: StdSignDoc,\n ) => Promise;\n\n readonly signPermit?: (\n signerAddress: string,\n signDoc: StdSignDoc\n ) => Promise;\n}\n\nexport interface AminoEip191Signer {\n readonly getAccounts: () => Promise;\n readonly signAminoEip191: (\n signerAddress: string,\n signDoc: StdSignDoc,\n ) => Promise;\n}\n", "import { keccak_256 } from \"@noble/hashes/sha3\";\nimport * as secp256k1 from \"@noble/secp256k1\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { fromHex, pubkeyToAddress, toHex, toUtf8 } from \".\";\nimport {\n AccountData,\n AminoSignResponse,\n encodeSecp256k1Signature,\n serializeStdSignDoc,\n sortObject,\n StdSignDoc,\n} from \"./wallet_amino\";\n\n/**\n * MetaMaskWallet is a wallet capable of signing on transactions using MetaMask.\n */\nexport class MetaMaskWallet {\n /** The account's secret address, derived from `publicKey` */\n public readonly address: string;\n\n private constructor(\n public ethProvider: any,\n public ethAddress: string,\n public publicKey: Uint8Array,\n ) {\n this.address = pubkeyToAddress(this.publicKey);\n }\n\n static async create(\n ethProvider: any,\n ethAddress: string,\n ): Promise {\n // use localStorage to cache the publicKey to prevent signing request on every MetaMaskWallet.create()\n // if MetaMask is used we assume that there's localStorage in the environment\n const localStorageKey = `secretjs_${ethAddress}_pubkey`;\n const publicKeyHex = localStorage.getItem(localStorageKey);\n\n if (publicKeyHex) {\n // verify that ethAddress can be derived from publicKeyHex\n // this prevents reading wrong/corrupted data from localStorage\n\n const ethAddressBytes = ethAddress.slice(2).toLocaleLowerCase();\n const derivedEthAddressBytes = toHex(\n keccak_256(decompressSecp256k1PublicKey(publicKeyHex).slice(1)).slice(\n -20,\n ),\n ).toLocaleLowerCase();\n\n if (derivedEthAddressBytes === ethAddressBytes) {\n return new MetaMaskWallet(\n ethProvider,\n ethAddress,\n fromHex(publicKeyHex),\n );\n }\n\n localStorage.removeItem(localStorageKey);\n }\n\n // On ETHland pubkeys are recovered from signatures, so we're going to:\n // 1. sign something\n // 2. recover the pubkey from the signature\n // 3. derive a secret address from the the pubkey\n\n const rawMsg = toUtf8(\"Get secret address\");\n const msgToSign = `0x${toHex(rawMsg)}`;\n\n const sigResult: string = (await ethProvider.request({\n method: \"personal_sign\",\n params: [msgToSign, ethAddress],\n }))!.toString();\n\n // strip leading 0x and extract recovery id\n const sig = fromHex(sigResult.slice(2, -2));\n let recoveryId = parseInt(sigResult.slice(-2), 16) - 27;\n\n // When a Ledger is used, this value doesn't need to be adjusted\n if (recoveryId < 0) {\n recoveryId += 27;\n }\n\n const eip191MessagePrefix = toUtf8(\"\\x19Ethereum Signed Message:\\n\");\n const rawMsgLength = toUtf8(String(rawMsg.length));\n\n const publicKey = secp256k1.recoverPublicKey(\n keccak_256(\n new Uint8Array([...eip191MessagePrefix, ...rawMsgLength, ...rawMsg]),\n ),\n sig,\n recoveryId,\n true,\n );\n\n localStorage.setItem(localStorageKey, toHex(publicKey));\n\n return new MetaMaskWallet(ethProvider, ethAddress, publicKey);\n }\n\n public async getAccounts(): Promise {\n return [\n {\n address: this.address,\n algo: \"secp256k1\",\n pubkey: this.publicKey,\n },\n ];\n }\n\n public async getSignMode(): Promise<\n import(\"./protobuf/cosmos/tx/signing/v1beta1/signing\").SignMode\n > {\n return (await import(\"./protobuf/cosmos/tx/signing/v1beta1/signing\"))\n .SignMode.SIGN_MODE_EIP_191;\n }\n\n public async signAmino(\n address: string,\n signDoc: StdSignDoc,\n ): Promise {\n if (address !== pubkeyToAddress(this.publicKey)) {\n throw new Error(`Address ${address} not found in wallet`);\n }\n\n const msgToSign = `0x${toHex(prettySerializeStdSignDoc(signDoc))}`;\n const sigResult: string = await this.ethProvider.request({\n method: \"personal_sign\",\n params: [msgToSign, this.ethAddress],\n });\n\n // strip leading 0x and trailing recovery id\n const sig = fromHex(sigResult.slice(2, -2));\n\n return {\n signed: signDoc,\n signature: encodeSecp256k1Signature(this.publicKey, sig),\n };\n }\n\n public async signPermit(\n address: string,\n signDoc: StdSignDoc,\n ): Promise {\n if (address !== pubkeyToAddress(this.publicKey)) {\n throw new Error(`Address ${address} not found in wallet`);\n }\n\n const messageHash = sha256(serializeStdSignDoc(signDoc));\n const sigResult: string = await this.ethProvider.request({\n method: \"eth_sign\",\n params: [this.ethAddress, \"0x\" + toHex(messageHash)],\n });\n\n // strip leading 0x and trailing recovery id\n const sig = fromHex(sigResult.slice(2, -2));\n\n return {\n signed: signDoc,\n signature: encodeSecp256k1Signature(this.publicKey, sig),\n };\n\n } \n}\n\n\n\nfunction decompressSecp256k1PublicKey(publicKeyHex: string): Uint8Array {\n const point = secp256k1.Point.fromHex(publicKeyHex);\n return point.toRawBytes(false);\n}\n\n/** Returns a JSON string with objects sorted by key, used for pretty Amino EIP191 signing */\nfunction prettyJsonSortedStringify(obj: any): string {\n return JSON.stringify(sortObject(obj), null, 4);\n}\n\nfunction prettySerializeStdSignDoc(signDoc: StdSignDoc): Uint8Array {\n return toUtf8(prettyJsonSortedStringify(signDoc));\n}\n", "import { sha256 } from \"@noble/hashes/sha256\";\nimport * as secp256k1 from \"@noble/secp256k1\";\nimport {\n AminoWallet,\n encodeSecp256k1Signature,\n StdSignature,\n} from \"./wallet_amino\";\n\n/**\n * Wallet is a wallet capable of signing on transactions.\n *\n * `Wallet` can just extend `AminoWallet` and be a valid `DirectSigner` because\n * `SecretNetworkClient` checks first for the existence of `signDirect` function\n * before checking for `signAmino` function.\n */\n\nexport class Wallet extends AminoWallet {\n public async signDirect(\n address: string,\n signDoc: import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignDoc,\n ): Promise {\n if (address !== this.address) {\n throw new Error(`Address ${address} not found in wallet`);\n }\n\n const messageHash = sha256(await serializeSignDoc(signDoc));\n const signature = await secp256k1.sign(messageHash, this.privateKey, {\n extraEntropy: true,\n der: false,\n });\n\n return {\n signed: signDoc,\n signature: encodeSecp256k1Signature(this.publicKey, signature),\n };\n }\n}\n\ntype DirectSignResponse = {\n /**\n * The sign doc that was signed.\n * This may be different from the input signDoc when the signer modifies it as part of the signing process.\n */\n readonly signed: import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignDoc;\n readonly signature: StdSignature;\n};\n\nasync function serializeSignDoc({\n account_number,\n auth_info_bytes,\n body_bytes,\n chain_id,\n}: import(\"./protobuf/cosmos/tx/v1beta1/tx\").SignDoc): Promise {\n const { SignDoc } = await import(\"./protobuf/cosmos/tx/v1beta1/tx\");\n return SignDoc.encode(\n SignDoc.fromPartial({\n account_number,\n auth_info_bytes,\n body_bytes,\n chain_id,\n }),\n ).finish();\n}\n", "var native = require('./native')\n\nfunction getTypeName (fn) {\n return fn.name || fn.toString().match(/function (.*?)\\s*\\(/)[1]\n}\n\nfunction getValueTypeName (value) {\n return native.Nil(value) ? '' : getTypeName(value.constructor)\n}\n\nfunction getValue (value) {\n if (native.Function(value)) return ''\n if (native.String(value)) return JSON.stringify(value)\n if (value && native.Object(value)) return ''\n return value\n}\n\nfunction captureStackTrace (e, t) {\n if (Error.captureStackTrace) {\n Error.captureStackTrace(e, t)\n }\n}\n\nfunction tfJSON (type) {\n if (native.Function(type)) return type.toJSON ? type.toJSON() : getTypeName(type)\n if (native.Array(type)) return 'Array'\n if (type && native.Object(type)) return 'Object'\n\n return type !== undefined ? type : ''\n}\n\nfunction tfErrorString (type, value, valueTypeName) {\n var valueJson = getValue(value)\n\n return 'Expected ' + tfJSON(type) + ', got' +\n (valueTypeName !== '' ? ' ' + valueTypeName : '') +\n (valueJson !== '' ? ' ' + valueJson : '')\n}\n\nfunction TfTypeError (type, value, valueTypeName) {\n valueTypeName = valueTypeName || getValueTypeName(value)\n this.message = tfErrorString(type, value, valueTypeName)\n\n captureStackTrace(this, TfTypeError)\n this.__type = type\n this.__value = value\n this.__valueTypeName = valueTypeName\n}\n\nTfTypeError.prototype = Object.create(Error.prototype)\nTfTypeError.prototype.constructor = TfTypeError\n\nfunction tfPropertyErrorString (type, label, name, value, valueTypeName) {\n var description = '\" of type '\n if (label === 'key') description = '\" with key type '\n\n return tfErrorString('property \"' + tfJSON(name) + description + tfJSON(type), value, valueTypeName)\n}\n\nfunction TfPropertyTypeError (type, property, label, value, valueTypeName) {\n if (type) {\n valueTypeName = valueTypeName || getValueTypeName(value)\n this.message = tfPropertyErrorString(type, label, property, value, valueTypeName)\n } else {\n this.message = 'Unexpected property \"' + property + '\"'\n }\n\n captureStackTrace(this, TfTypeError)\n this.__label = label\n this.__property = property\n this.__type = type\n this.__value = value\n this.__valueTypeName = valueTypeName\n}\n\nTfPropertyTypeError.prototype = Object.create(Error.prototype)\nTfPropertyTypeError.prototype.constructor = TfTypeError\n\nfunction tfCustomError (expected, actual) {\n return new TfTypeError(expected, {}, actual)\n}\n\nfunction tfSubError (e, property, label) {\n // sub child?\n if (e instanceof TfPropertyTypeError) {\n property = property + '.' + e.__property\n\n e = new TfPropertyTypeError(\n e.__type, property, e.__label, e.__value, e.__valueTypeName\n )\n\n // child?\n } else if (e instanceof TfTypeError) {\n e = new TfPropertyTypeError(\n e.__type, property, label, e.__value, e.__valueTypeName\n )\n }\n\n captureStackTrace(e)\n return e\n}\n\nmodule.exports = {\n TfTypeError: TfTypeError,\n TfPropertyTypeError: TfPropertyTypeError,\n tfCustomError: tfCustomError,\n tfSubError: tfSubError,\n tfJSON: tfJSON,\n getValueTypeName: getValueTypeName\n}\n", "var NATIVE = require('./native')\nvar ERRORS = require('./errors')\n\nfunction _Buffer (value) {\n return Buffer.isBuffer(value)\n}\n\nfunction Hex (value) {\n return typeof value === 'string' && /^([0-9a-f]{2})+$/i.test(value)\n}\n\nfunction _LengthN (type, length) {\n var name = type.toJSON()\n\n function Length (value) {\n if (!type(value)) return false\n if (value.length === length) return true\n\n throw ERRORS.tfCustomError(name + '(Length: ' + length + ')', name + '(Length: ' + value.length + ')')\n }\n Length.toJSON = function () { return name }\n\n return Length\n}\n\nvar _ArrayN = _LengthN.bind(null, NATIVE.Array)\nvar _BufferN = _LengthN.bind(null, _Buffer)\nvar _HexN = _LengthN.bind(null, Hex)\nvar _StringN = _LengthN.bind(null, NATIVE.String)\n\nfunction Range (a, b, f) {\n f = f || NATIVE.Number\n function _range (value, strict) {\n return f(value, strict) && (value > a) && (value < b)\n }\n _range.toJSON = function () {\n return `${f.toJSON()} between [${a}, ${b}]`\n }\n return _range\n}\n\nvar INT53_MAX = Math.pow(2, 53) - 1\n\nfunction Finite (value) {\n return typeof value === 'number' && isFinite(value)\n}\nfunction Int8 (value) { return ((value << 24) >> 24) === value }\nfunction Int16 (value) { return ((value << 16) >> 16) === value }\nfunction Int32 (value) { return (value | 0) === value }\nfunction Int53 (value) {\n return typeof value === 'number' &&\n value >= -INT53_MAX &&\n value <= INT53_MAX &&\n Math.floor(value) === value\n}\nfunction UInt8 (value) { return (value & 0xff) === value }\nfunction UInt16 (value) { return (value & 0xffff) === value }\nfunction UInt32 (value) { return (value >>> 0) === value }\nfunction UInt53 (value) {\n return typeof value === 'number' &&\n value >= 0 &&\n value <= INT53_MAX &&\n Math.floor(value) === value\n}\n\nvar types = {\n ArrayN: _ArrayN,\n Buffer: _Buffer,\n BufferN: _BufferN,\n Finite: Finite,\n Hex: Hex,\n HexN: _HexN,\n Int8: Int8,\n Int16: Int16,\n Int32: Int32,\n Int53: Int53,\n Range: Range,\n StringN: _StringN,\n UInt8: UInt8,\n UInt16: UInt16,\n UInt32: UInt32,\n UInt53: UInt53\n}\n\nfor (var typeName in types) {\n types[typeName].toJSON = function (t) {\n return t\n }.bind(null, typeName)\n}\n\nmodule.exports = types\n", "var ERRORS = require('./errors')\nvar NATIVE = require('./native')\n\n// short-hand\nvar tfJSON = ERRORS.tfJSON\nvar TfTypeError = ERRORS.TfTypeError\nvar TfPropertyTypeError = ERRORS.TfPropertyTypeError\nvar tfSubError = ERRORS.tfSubError\nvar getValueTypeName = ERRORS.getValueTypeName\n\nvar TYPES = {\n arrayOf: function arrayOf (type, options) {\n type = compile(type)\n options = options || {}\n\n function _arrayOf (array, strict) {\n if (!NATIVE.Array(array)) return false\n if (NATIVE.Nil(array)) return false\n if (options.minLength !== undefined && array.length < options.minLength) return false\n if (options.maxLength !== undefined && array.length > options.maxLength) return false\n if (options.length !== undefined && array.length !== options.length) return false\n\n return array.every(function (value, i) {\n try {\n return typeforce(type, value, strict)\n } catch (e) {\n throw tfSubError(e, i)\n }\n })\n }\n _arrayOf.toJSON = function () {\n var str = '[' + tfJSON(type) + ']'\n if (options.length !== undefined) {\n str += '{' + options.length + '}'\n } else if (options.minLength !== undefined || options.maxLength !== undefined) {\n str += '{' +\n (options.minLength === undefined ? 0 : options.minLength) + ',' +\n (options.maxLength === undefined ? Infinity : options.maxLength) + '}'\n }\n return str\n }\n\n return _arrayOf\n },\n\n maybe: function maybe (type) {\n type = compile(type)\n\n function _maybe (value, strict) {\n return NATIVE.Nil(value) || type(value, strict, maybe)\n }\n _maybe.toJSON = function () { return '?' + tfJSON(type) }\n\n return _maybe\n },\n\n map: function map (propertyType, propertyKeyType) {\n propertyType = compile(propertyType)\n if (propertyKeyType) propertyKeyType = compile(propertyKeyType)\n\n function _map (value, strict) {\n if (!NATIVE.Object(value)) return false\n if (NATIVE.Nil(value)) return false\n\n for (var propertyName in value) {\n try {\n if (propertyKeyType) {\n typeforce(propertyKeyType, propertyName, strict)\n }\n } catch (e) {\n throw tfSubError(e, propertyName, 'key')\n }\n\n try {\n var propertyValue = value[propertyName]\n typeforce(propertyType, propertyValue, strict)\n } catch (e) {\n throw tfSubError(e, propertyName)\n }\n }\n\n return true\n }\n\n if (propertyKeyType) {\n _map.toJSON = function () {\n return '{' + tfJSON(propertyKeyType) + ': ' + tfJSON(propertyType) + '}'\n }\n } else {\n _map.toJSON = function () { return '{' + tfJSON(propertyType) + '}' }\n }\n\n return _map\n },\n\n object: function object (uncompiled) {\n var type = {}\n\n for (var typePropertyName in uncompiled) {\n type[typePropertyName] = compile(uncompiled[typePropertyName])\n }\n\n function _object (value, strict) {\n if (!NATIVE.Object(value)) return false\n if (NATIVE.Nil(value)) return false\n\n var propertyName\n\n try {\n for (propertyName in type) {\n var propertyType = type[propertyName]\n var propertyValue = value[propertyName]\n\n typeforce(propertyType, propertyValue, strict)\n }\n } catch (e) {\n throw tfSubError(e, propertyName)\n }\n\n if (strict) {\n for (propertyName in value) {\n if (type[propertyName]) continue\n\n throw new TfPropertyTypeError(undefined, propertyName)\n }\n }\n\n return true\n }\n _object.toJSON = function () { return tfJSON(type) }\n\n return _object\n },\n\n anyOf: function anyOf () {\n var types = [].slice.call(arguments).map(compile)\n\n function _anyOf (value, strict) {\n return types.some(function (type) {\n try {\n return typeforce(type, value, strict)\n } catch (e) {\n return false\n }\n })\n }\n _anyOf.toJSON = function () { return types.map(tfJSON).join('|') }\n\n return _anyOf\n },\n\n allOf: function allOf () {\n var types = [].slice.call(arguments).map(compile)\n\n function _allOf (value, strict) {\n return types.every(function (type) {\n try {\n return typeforce(type, value, strict)\n } catch (e) {\n return false\n }\n })\n }\n _allOf.toJSON = function () { return types.map(tfJSON).join(' & ') }\n\n return _allOf\n },\n\n quacksLike: function quacksLike (type) {\n function _quacksLike (value) {\n return type === getValueTypeName(value)\n }\n _quacksLike.toJSON = function () { return type }\n\n return _quacksLike\n },\n\n tuple: function tuple () {\n var types = [].slice.call(arguments).map(compile)\n\n function _tuple (values, strict) {\n if (NATIVE.Nil(values)) return false\n if (NATIVE.Nil(values.length)) return false\n if (strict && (values.length !== types.length)) return false\n\n return types.every(function (type, i) {\n try {\n return typeforce(type, values[i], strict)\n } catch (e) {\n throw tfSubError(e, i)\n }\n })\n }\n _tuple.toJSON = function () { return '(' + types.map(tfJSON).join(', ') + ')' }\n\n return _tuple\n },\n\n value: function value (expected) {\n function _value (actual) {\n return actual === expected\n }\n _value.toJSON = function () { return expected }\n\n return _value\n }\n}\n\n// TODO: deprecate\nTYPES.oneOf = TYPES.anyOf\n\nfunction compile (type) {\n if (NATIVE.String(type)) {\n if (type[0] === '?') return TYPES.maybe(type.slice(1))\n\n return NATIVE[type] || TYPES.quacksLike(type)\n } else if (type && NATIVE.Object(type)) {\n if (NATIVE.Array(type)) {\n if (type.length !== 1) throw new TypeError('Expected compile() parameter of type Array of length 1')\n return TYPES.arrayOf(type[0])\n }\n\n return TYPES.object(type)\n } else if (NATIVE.Function(type)) {\n return type\n }\n\n return TYPES.value(type)\n}\n\nfunction typeforce (type, value, strict, surrogate) {\n if (NATIVE.Function(type)) {\n if (type(value, strict)) return true\n\n throw new TfTypeError(surrogate || type, value)\n }\n\n // JIT\n return typeforce(compile(type), value, strict)\n}\n\n// assign types to typeforce function\nfor (var typeName in NATIVE) {\n typeforce[typeName] = NATIVE[typeName]\n}\n\nfor (typeName in TYPES) {\n typeforce[typeName] = TYPES[typeName]\n}\n\nvar EXTRA = require('./extra')\nfor (typeName in EXTRA) {\n typeforce[typeName] = EXTRA[typeName]\n}\n\ntypeforce.compile = compile\ntypeforce.TfTypeError = TfTypeError\ntypeforce.TfPropertyTypeError = TfPropertyTypeError\n\nmodule.exports = typeforce\n", "var types = {\n Array: function (value) { return value !== null && value !== undefined && value.constructor === Array },\n Boolean: function (value) { return typeof value === 'boolean' },\n Function: function (value) { return typeof value === 'function' },\n Nil: function (value) { return value === undefined || value === null },\n Number: function (value) { return typeof value === 'number' },\n Object: function (value) { return typeof value === 'object' },\n String: function (value) { return typeof value === 'string' },\n '': function () { return true }\n}\n\n// TODO: deprecate\ntypes.Null = types.Nil\n\nfor (var typeName in types) {\n types[typeName].toJSON = function (t) {\n return t\n }.bind(null, typeName)\n}\n\nmodule.exports = types\n", "\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n", "module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}", "// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n", "'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBind = require('call-bind');\nvar callBound = require('call-bind/callBound');\nvar gOPD = require('gopd');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tcache['$' + typedArray] = callBind(arr.slice);\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar found = false;\n\tforEach(cache, function (getter, typedArray) {\n\t\tif (!found) {\n\t\t\ttry {\n\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\tfound = $slice(typedArray, 1);\n\t\t\t\t}\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn found;\n};\n\nvar trySlices = function tryAllSlices(value) {\n\tvar found = false;\n\tforEach(cache, function (getter, name) {\n\t\tif (!found) {\n\t\t\ttry {\n\t\t\t\tgetter(value);\n\t\t\t\tfound = $slice(name, 1);\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn found;\n};\n\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n", "var bs58check = require('bs58check')\n\nfunction decodeRaw (buffer, version) {\n // check version only if defined\n if (version !== undefined && buffer[0] !== version) throw new Error('Invalid network version')\n\n // uncompressed\n if (buffer.length === 33) {\n return {\n version: buffer[0],\n privateKey: buffer.slice(1, 33),\n compressed: false\n }\n }\n\n // invalid length\n if (buffer.length !== 34) throw new Error('Invalid WIF length')\n\n // invalid compression flag\n if (buffer[33] !== 0x01) throw new Error('Invalid compression flag')\n\n return {\n version: buffer[0],\n privateKey: buffer.slice(1, 33),\n compressed: true\n }\n}\n\nfunction encodeRaw (version, privateKey, compressed) {\n var result = new Buffer(compressed ? 34 : 33)\n\n result.writeUInt8(version, 0)\n privateKey.copy(result, 1)\n\n if (compressed) {\n result[33] = 0x01\n }\n\n return result\n}\n\nfunction decode (string, version) {\n return decodeRaw(bs58check.decode(string), version)\n}\n\nfunction encode (version, privateKey, compressed) {\n if (typeof version === 'number') return bs58check.encode(encodeRaw(version, privateKey, compressed))\n\n return bs58check.encode(\n encodeRaw(\n version.version,\n version.privateKey,\n version.compressed\n )\n )\n}\n\nmodule.exports = {\n decode: decode,\n decodeRaw: decodeRaw,\n encode: encode,\n encodeRaw: encodeRaw\n}\n", "'use strict';\n\nvar possibleNames = [\n\t'BigInt64Array',\n\t'BigUint64Array',\n\t'Float32Array',\n\t'Float64Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Int8Array',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray'\n];\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\nmodule.exports = function availableTypedArrays() {\n\tvar out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();", "__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};", "// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(3607);\n", "/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n", "/*\r\n * bignumber.js v9.1.2\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\nvar\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n/*\r\n * Create and return a BigNumber constructor.\r\n */\r\nfunction clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',\r\n alphabetHasNormalDecimalDigits = true;\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10 && alphabetHasNormalDecimalDigits) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, -1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return \u00B10 if x is \u00B10 or y is \u00B1Infinity, or return \u00B1Infinity as y is \u00B10.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n // If any number is NaN, return NaN.\r\n function maxOrMin(args, n) {\r\n var k, y,\r\n i = 1,\r\n x = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n y = new BigNumber(args[i]);\r\n if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on \u00B1Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = mathfloor(n / pows10[d - j - 1] % 10);\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is \u00B1Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and \u00B1Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, \u00B1Infinity, \u00B10 or \u00B11, or n is \u00B1Infinity, NaN or \u00B10.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to \u00B1Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to \u00B1Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to \u00B10: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = \u00B1Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return \u00B10, else return \u00B1Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, \u00B1Infinity or \u00B10?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return \u00B1Infinity if either is \u00B1Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return \u00B10 if either is \u00B10.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) {\r\n zc = xc;\r\n xc = yc;\r\n yc = zc;\r\n i = xcL;\r\n xcL = ycL;\r\n ycL = i;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return \u00B1Infinity if either \u00B1Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n b = a;\r\n }\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is \u00B1Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) {\r\n i = g1;\r\n g1 = g2;\r\n g2 = i;\r\n len -= i;\r\n }\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10 && alphabetHasNormalDecimalDigits) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n P[Symbol.toStringTag] = 'BigNumber';\r\n\r\n // Node.js v10.12.0+\r\n P[Symbol.for('nodejs.util.inspect.custom')] = P.valueOf;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n}\r\n\r\n\r\n// PRIVATE HELPER FUNCTIONS\r\n\r\n// These functions don't need access to variables,\r\n// e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\nfunction bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n}\r\n\r\n\r\n// Return a coefficient array as a string of base 10 digits.\r\nfunction coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n}\r\n\r\n\r\n// Compare the value of BigNumbers x and y.\r\nfunction compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n}\r\n\r\n\r\n/*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\nfunction intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n}\r\n\r\n\r\n// Assumes finite n.\r\nfunction isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n}\r\n\r\n\r\nfunction toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n}\r\n\r\n\r\nfunction toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n}\r\n\r\n\r\n// EXPORT\r\n\r\n\r\nexport var BigNumber = clone();\r\n\r\nexport default BigNumber;\r\n", "import BigNumber from \"bignumber.js\";\nwindow.BigNumber = BigNumber;\n", "import { Buffer } from \"buffer\";\nwindow.Buffer = Buffer;\n", "import _ from \"lodash\";\nwindow._ = _;\n", "import List from \"list.js\";\nwindow.List = List;\n", "// https://github.com/maxogden/websocket-stream/blob/48dc3ddf943e5ada668c31ccd94e9186f02fafbd/ws-fallback.js\n\nvar ws = null\n\nif (typeof WebSocket !== 'undefined') {\n ws = WebSocket\n} else if (typeof MozWebSocket !== 'undefined') {\n ws = MozWebSocket\n} else if (typeof global !== 'undefined') {\n ws = global.WebSocket || global.MozWebSocket\n} else if (typeof window !== 'undefined') {\n ws = window.WebSocket || window.MozWebSocket\n} else if (typeof self !== 'undefined') {\n ws = self.WebSocket || self.MozWebSocket\n}\n\nexport default ws\n", "// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};", "import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;", "import EventEmitter from './index.js'\n\nexport { EventEmitter }\nexport default EventEmitter\n", "import type { InjectedAccount, InjectedAccounts, Unsubcall } from '@polkadot/extension-inject/types'\n\nexport class Accounts implements InjectedAccounts {\n activeAccounts: InjectedAccount[]\n sub: { [key in string]: (accounts: InjectedAccount[]) => void } = {}\n constructor() {\n this.activeAccounts = []\n }\n private _triggerSubs = () => {\n Object.values(this.sub).forEach((cb) => cb(this.activeAccounts))\n }\n addAccount = (account: InjectedAccount): void => {\n this.activeAccounts.push(account)\n this._triggerSubs()\n }\n updateActiveAccounts = (activeAccounts: InjectedAccount[]): void => {\n this.activeAccounts = activeAccounts\n this._triggerSubs()\n }\n // TODO: what does anyType do?\n get = (anyType?: boolean): Promise => {\n return new Promise((resolve, reject) => {\n resolve(this.activeAccounts)\n })\n }\n\n subscribe = (cb: (accounts: InjectedAccount[]) => unknown): Unsubcall => {\n const id = Date.now().toString()\n this.sub[id] = cb\n // Debounce first response to allow the subscriber to set up\n setTimeout(() => {\n this._triggerSubs()\n }, 100)\n return (): void => {\n delete this.sub[id]\n }\n }\n}\n", "import { BaseApp, TransactionToSign } from '@nightlylabs/nightly-connect-base'\nimport type { Signer as SignerInterface, SignerResult } from '@polkadot/api/types'\nimport type { SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types'\n\nexport class Signer implements SignerInterface {\n base: BaseApp\n constructor(base: BaseApp) {\n this.base = base\n }\n\n signRaw = async (payload: SignerPayloadRaw): Promise => {\n const transactionToSign: TransactionToSign = {\n transaction: JSON.stringify(payload),\n metadata: JSON.stringify({\n network: this.base.initializeData.network\n })\n }\n const signedTxs = await this.base.signTransactions([transactionToSign])\n const result = JSON.parse(signedTxs[0].transaction) as SignerResult\n return result\n }\n signPayload = async (payload: SignerPayloadJSON): Promise => {\n const transactionToSign: TransactionToSign = {\n transaction: JSON.stringify(payload),\n metadata: JSON.stringify({\n network: this.base.initializeData.network\n })\n }\n const signedTxs = await this.base.signTransactions([transactionToSign])\n const result = JSON.parse(signedTxs[0].transaction) as SignerResult\n return result\n }\n // Ignore update\n}\n", "import {\n AppBaseInitialize,\n BaseApp,\n DeeplinkConnect,\n getWalletsMetadata\n} from '@nightlylabs/nightly-connect-base'\nimport { InjectedAccount, InjectedExtension } from '@polkadot/extension-inject/types'\nimport { EventEmitter } from 'eventemitter3'\nimport { UserDisconnectedEvent } from '../../../bindings/UserDisconnectedEvent'\nimport { WalletMetadata } from '../../../bindings/WalletMetadata'\nimport { Accounts } from './Accounts'\nimport { Signer } from './Signer'\n\nexport type AppPolkadotInitialize = AppBaseInitialize\ninterface PolkadotAppEvents {\n userConnected: (e: InjectedAccount[]) => void\n userDisconnected: (e: UserDisconnectedEvent) => void\n serverDisconnected: () => void\n}\nexport class AppPolkadot extends EventEmitter implements InjectedExtension {\n sessionId: string\n initData: AppPolkadotInitialize\n // Polkadot specific\n name = 'Nightly Connect'\n version = '0.0.1'\n accounts: Accounts\n // metadata?: InjectedMetadata\n // provider?: InjectedProvider\n signer: Signer\n constructor(base: BaseApp, initData: AppPolkadotInitialize) {\n super()\n this.initData = initData\n base.on('userConnected', (e) => {\n if (e.metadata) {\n const accounts = JSON.parse(e.metadata) as InjectedAccount[]\n this.accounts.updateActiveAccounts(accounts)\n this.emit('userConnected', accounts)\n } else {\n const accounts = e.publicKeys.map((pk) => ({ address: pk })) as InjectedAccount[]\n this.accounts.updateActiveAccounts(accounts)\n this.emit('userConnected', accounts)\n }\n })\n base.on('userDisconnected', (e) => {\n this.emit('userDisconnected', e)\n })\n base.on('serverDisconnected', async () => {\n // We need this because of power saving mode on mobile\n await this.tryReconnect()\n })\n this.accounts = new Accounts()\n if (base.hasBeenRestored && base.connectedPublicKeys) {\n // If the base has been restored, we can get the accounts from the metadata\n // Polkadot specific\n if (base.clientMetadata) {\n const accounts = JSON.parse(base.clientMetadata) as InjectedAccount[]\n this.accounts.updateActiveAccounts(accounts)\n } else {\n // Fall back to the public keys\n const accounts = base.connectedPublicKeys.map((pk) => ({\n address: pk\n })) as InjectedAccount[]\n this.accounts.updateActiveAccounts(accounts)\n }\n }\n\n this.signer = new Signer(base)\n this.sessionId = base.sessionId\n }\n private tryReconnect = async () => {\n try {\n const base = await BaseApp.build({ ...this.initData })\n // On reconnect, if the base has not been restored, emit serverDisconnected\n if (!base.hasBeenRestored) {\n this.emit('serverDisconnected')\n return\n }\n // If user was connected, emit userConnected\n if (base.connectedPublicKeys.length > 0) {\n if (base.clientMetadata) {\n const accounts = JSON.parse(base.clientMetadata) as InjectedAccount[]\n this.accounts.updateActiveAccounts(accounts)\n this.emit('userConnected', accounts)\n } else {\n const accounts = base.connectedPublicKeys.map((pk) => ({\n address: pk\n })) as InjectedAccount[]\n this.accounts.updateActiveAccounts(accounts)\n this.emit('userConnected', accounts)\n }\n }\n base.on('userConnected', (e) => {\n if (e.metadata) {\n const accounts = JSON.parse(e.metadata) as InjectedAccount[]\n this.accounts.updateActiveAccounts(accounts)\n this.emit('userConnected', accounts)\n } else {\n const accounts = e.publicKeys.map((pk) => ({ address: pk })) as InjectedAccount[]\n this.accounts.updateActiveAccounts(accounts)\n this.emit('userConnected', accounts)\n }\n })\n base.on('userDisconnected', (e) => {\n this.emit('userDisconnected', e)\n })\n base.on('serverDisconnected', async () => {\n await this.tryReconnect()\n })\n // If there is a deeplink, reconnect to it\n if (this.signer.base.deeplink) {\n base.connectDeeplink(this.signer.base.deeplink)\n }\n this.signer.base = base\n return\n } catch (_) {\n this.emit('serverDisconnected')\n }\n }\n public hasBeenRestored = () => {\n return this.signer.base.hasBeenRestored\n }\n\n public static getWalletsMetadata = async (url?: string): Promise => {\n return getWalletsMetadata(url, 'polkadot')\n }\n\n public static build = async (initData: AppPolkadotInitialize): Promise => {\n const base = await BaseApp.build(initData)\n return new AppPolkadot(base, initData)\n }\n\n connectDeeplink = async (data: DeeplinkConnect) => {\n this.signer.base.connectDeeplink(data)\n }\n}\n", "import { ContentType, RequestContent } from '@nightlylabs/nightly-connect-base'\nimport { SignerPayloadRaw, SignerPayloadJSON } from '@polkadot/types/types'\nimport {\n SignTransactionsPolkadotRequest,\n SignMessagesPolkadotRequest,\n CustomPolkadotRequest,\n PolkadotRequest\n} from './requestTypes'\n\nexport const parseRequest = (request: RequestContent, sessionId: string): PolkadotRequest => {\n switch (request.content.type) {\n case ContentType.SignTransactions: {\n const signTransactionsRequest: SignTransactionsPolkadotRequest = {\n type: ContentType.SignTransactions,\n requestId: request.requestId,\n sessionId: sessionId,\n transactions: request.content.transactions.map(\n (tx) => JSON.parse(tx.transaction) as SignerPayloadRaw | SignerPayloadJSON\n ),\n network: request.content.transactions[0]?.metadata\n ? JSON.parse(request.content.transactions[0]?.metadata).network\n : undefined\n }\n return signTransactionsRequest\n }\n case ContentType.SignMessages: {\n const signMessagesRequest: SignMessagesPolkadotRequest = {\n type: ContentType.SignMessages,\n requestId: request.requestId,\n sessionId: sessionId,\n messages: request.content.messages,\n network: request.content.messages[0]?.metadata\n ? JSON.parse(request.content.messages[0]?.metadata).network\n : undefined\n }\n return signMessagesRequest\n }\n case ContentType.Custom: {\n const customRequest: CustomPolkadotRequest = {\n type: ContentType.Custom,\n content: request.content.content,\n requestId: request.requestId,\n sessionId: sessionId\n }\n return customRequest\n }\n }\n}\n", "import {\n BaseClient,\n ClientBaseInitialize,\n Connect as ConnectBase,\n SignMessagesEvent\n} from '@nightlylabs/nightly-connect-base'\nimport { InjectedAccount } from '@polkadot/extension-inject/types'\nimport { SignerPayloadJSON, SignerPayloadRaw, SignerResult } from '@polkadot/types/types'\nimport { EventEmitter } from 'eventemitter3'\nimport { AppDisconnectedEvent } from '../../../bindings/AppDisconnectedEvent'\nimport { GetInfoResponse } from '../../../bindings/GetInfoResponse'\nimport { Network } from '../../../bindings/Network'\nimport { parseRequest } from './utils'\nimport { PolkadotRequest } from './requestTypes'\n\nexport interface SignPolkadotTransactionEvent {\n requestId: string\n transactions: Array\n sessionId: string\n network?: string\n}\n\nexport type SignPolkadotMessageEvent = SignMessagesEvent\nexport interface ClientPolkadotEvents {\n signTransactions: (e: SignPolkadotTransactionEvent) => void\n appDisconnected: (e: AppDisconnectedEvent) => void\n}\nexport class ClientPolkadot extends EventEmitter {\n baseClient: BaseClient\n sessionId: string | undefined = undefined\n network: Network\n private constructor(baseClient: BaseClient, network: Network) {\n super()\n this.network = network\n baseClient.on('signTransactions', (e) => {\n const event: SignPolkadotTransactionEvent = {\n sessionId: e.sessionId,\n requestId: e.responseId,\n transactions: e.transactions.map(\n (transaction) =>\n JSON.parse(transaction.transaction) as SignerPayloadRaw | SignerPayloadJSON\n ),\n network: e.transactions[0]?.metadata\n ? JSON.parse(e.transactions[0]?.metadata).network\n : undefined\n }\n this.emit('signTransactions', event)\n })\n baseClient.on('appDisconnected', (e) => {\n this.emit('appDisconnected', e)\n })\n this.baseClient = baseClient\n }\n public static build = async (\n sessionId: string,\n initData: ClientBaseInitialize,\n network: Network\n ): Promise<{\n client: ClientPolkadot\n data: GetInfoResponse\n }> => {\n // Add prefix to client id\n const baseClient = await BaseClient.build({\n ...initData,\n clientId: network + '-' + initData.clientId\n })\n const data = await baseClient.getInfo(sessionId)\n const client = new ClientPolkadot(baseClient, network)\n return { client, data }\n }\n public static create = async (initData: ClientBaseInitialize, network: Network) => {\n // Add prefix to client id\n const baseClient = await BaseClient.build({\n ...initData,\n clientId: network + '-' + initData.clientId\n })\n const client = new ClientPolkadot(baseClient, network)\n return client\n }\n public getInfo = async (sessionId: string): Promise => {\n const response = await this.baseClient.getInfo(sessionId)\n return response\n }\n public connect = async (connect: Connect) => {\n const connectMsg: ConnectBase = {\n ...connect,\n publicKeys: connect.walletsMetadata.map((wallet) => wallet.address),\n metadata: JSON.stringify(connect.walletsMetadata)\n }\n await this.baseClient.connect(connectMsg)\n this.sessionId = connect.sessionId\n }\n public getPendingRequests = async (sessionId?: string): Promise => {\n const sessionIdToUse = sessionId || this.sessionId\n //Assert session id is defined\n if (sessionIdToUse === undefined) {\n throw new Error('Session id is undefined')\n }\n const requests = await this.baseClient.getPendingRequests(sessionIdToUse)\n return requests.map((request) => parseRequest(request, sessionIdToUse))\n }\n\n public resolveSignTransaction = async ({\n requestId,\n signedTransactions,\n sessionId\n }: ResolveSignPolkadotTransactions) => {\n const serializedTxs = signedTransactions.map((tx) => {\n return { network: this.network, transaction: tx }\n })\n const sessionIdToUse = sessionId || this.sessionId\n //Assert session id is defined\n if (sessionIdToUse === undefined) {\n throw new Error('Session id is undefined')\n }\n await this.baseClient.resolveSignTransactions({\n requestId: requestId,\n signedTransactions: serializedTxs.map((tx) => {\n return { ...tx, transaction: JSON.stringify(tx.transaction) }\n }),\n sessionId: sessionIdToUse\n })\n }\n public rejectRequest = async ({ requestId, reason, sessionId }: RejectRequest) => {\n const sessionIdToUse = sessionId || this.sessionId\n //Assert session id is defined\n if (sessionIdToUse === undefined) {\n throw new Error('Session id is undefined')\n }\n await this.baseClient.reject({ requestId: requestId, reason, sessionId: sessionIdToUse })\n }\n public getSessions = async (): Promise => {\n return await this.baseClient.getSessions()\n }\n public dropSessions = async (sessionsToDrop: string[]): Promise => {\n return await this.baseClient.dropSessions(sessionsToDrop)\n }\n}\nexport type Connect = ConnectBase & {\n walletsMetadata: InjectedAccount[]\n}\nexport interface RejectRequest {\n requestId: string\n reason?: string\n sessionId?: string\n}\nexport interface ResolveSignPolkadotTransactions {\n requestId: string\n signedTransactions: SignerResult[]\n sessionId?: string\n}\n", "import { HttpBaseClient, HttpBaseClientInitialize } from '@nightlylabs/nightly-connect-base'\nimport { HttpConnectSessionRequest } from '../../../bindings/HttpConnectSessionRequest'\nimport { HttpGetPendingRequestsRequest } from '../../../bindings/HttpGetPendingRequestsRequest'\nimport { HttpGetPendingRequestRequest } from '../../../bindings/HttpGetPendingRequestRequest'\nimport { HttpGetSessionInfoResponse } from '../../../bindings/HttpGetSessionInfoResponse'\nimport { SignerResult } from '@polkadot/types/types'\nimport { InjectedAccount } from '@polkadot/extension-inject/types'\nimport { Network } from '../../../bindings/Network'\nimport { parseRequest } from './utils'\n\nexport class HttpClientPolkadot {\n baseClient: HttpBaseClient\n clientId: string | undefined = undefined\n public constructor({ clientId, timeout, url }: HttpBaseClientInitialize) {\n this.clientId = clientId\n this.baseClient = new HttpBaseClient({ clientId, timeout, url })\n }\n public getInfo = async (sessionId: string): Promise => {\n const response = await this.baseClient.getInfo(sessionId)\n return response\n }\n public connect = async (connect: HttpConnect) => {\n await this.baseClient.connect(connect)\n }\n public getPendingRequests = async (request: Omit) => {\n const requests = await this.baseClient.getPendingRequests(request)\n return requests.map((rq) => parseRequest(rq, request.sessionId))\n }\n public getPendingRequest = async (request: Omit) => {\n const rq = await this.baseClient.getPendingRequest(request)\n return parseRequest(rq, request.sessionId)\n }\n public resolveSignTransaction = async ({\n requestId,\n signedTransactions,\n sessionId,\n network\n }: ResolveSignPolkadotTransactions) => {\n const serializedTxs = signedTransactions.map((tx) => {\n return { network: network, transaction: tx }\n })\n\n await this.baseClient.resolveSignTransactions({\n requestId: requestId,\n signedTransactions: serializedTxs.map((tx) => {\n return { ...tx, transaction: JSON.stringify(tx.transaction) }\n }),\n sessionId: sessionId\n })\n }\n\n public rejectRequest = async ({ requestId, reason, sessionId }: RejectRequest) => {\n await this.baseClient.reject({ requestId: requestId, reason, sessionId: sessionId })\n }\n}\nexport type HttpConnect = Omit & {\n walletsMetadata: InjectedAccount[]\n}\nexport interface RejectRequest {\n requestId: string\n sessionId: string\n reason?: string\n}\nexport interface ResolveSignPolkadotTransactions {\n requestId: string\n signedTransactions: SignerResult[]\n sessionId: string\n network: Network\n}\n", "import { getSessionIdLocalStorageKey } from '@nightlylabs/nightly-connect-base'\nimport { ILocalStorage, getStorage } from 'isomorphic-localstorage'\nimport { ConnectionType } from './types'\n\nlet _localStorage: ILocalStorage | null = null\n\ntype WalletInfo = {\n walletName: string\n walletType: ConnectionType\n}\n\nexport const getLocalStorage = () => {\n if (_localStorage === null) {\n _localStorage = getStorage('./nightly-connect-session')\n }\n\n return _localStorage\n}\n\n// recent wallet from standard\nexport const NIGHTLY_CONNECT_RECENT_WALLET = 'NIGHTLY_CONNECT_RECENT_WALLET_'\nexport const persistRecentWalletForNetwork = (network: string, walletInfo: WalletInfo) => {\n const storage = getLocalStorage()\n storage.setItem(NIGHTLY_CONNECT_RECENT_WALLET + network, JSON.stringify(walletInfo))\n}\n\nexport const getRecentWalletForNetwork = (network: string) => {\n const storage = getLocalStorage()\n const item = storage.getItem(NIGHTLY_CONNECT_RECENT_WALLET + network)\n if (!item) return null\n try {\n return JSON.parse(item) as WalletInfo\n } catch (error) {\n console.warn('Error parsing recent wallet from local storage', error)\n return null\n }\n}\n\nexport const clearRecentWalletForNetwork = (network: string) => {\n const storage = getLocalStorage()\n storage.removeItem(NIGHTLY_CONNECT_RECENT_WALLET + network)\n}\n\n// clearing last nightly connect session id\n\nexport const clearSessionIdForNetwork = (network: string) => {\n const storage = getLocalStorage()\n storage.removeItem(getSessionIdLocalStorageKey(network))\n}\n", "import { triggerDeeplink } from '@nightlylabs/nightly-connect-base'\n\nexport const isMobileBrowser = () =>\n /Android|iPhone|iPad|iPod|Opera Mini/i.test(navigator.userAgent)\n\nexport const triggerConnect = (path: string, sessionId: string, relay: string) => {\n triggerDeeplink({\n path,\n deeplinkParams: { sessionId, relay }\n })\n}\n\nexport const sleep = (timeout: number) =>\n new Promise((resolve) => {\n setTimeout(() => {\n resolve()\n }, timeout)\n })\n", "import { type AppBaseInitialize } from '@nightlylabs/nightly-connect-base'\nimport { type Deeplink } from '@nightlylabs/nightly-connect-base/dist/types/bindings/Deeplink'\nimport { type Wallet } from '@wallet-standard/core'\nimport { type Images } from '../../../bindings/Images'\nimport { WalletMetadata } from '../../../bindings/WalletMetadata'\nimport { type WalletType } from '../../../bindings/WalletType'\nexport { type WalletMetadata } from '../../../bindings/WalletMetadata'\n\nexport interface Adapter {\n connect: () => Promise\n}\nexport type AppInitData = Omit\n\nexport interface MetadataWallet {\n slug: string\n name: string\n icon: string\n deeplink: Deeplink | null\n link: string\n walletType: WalletType\n}\n\nexport interface IWalletListItem\n extends Pick<\n WalletMetadata,\n 'name' | 'slug' | 'walletType' | 'mobile' | 'desktop' | 'image' | 'homepage'\n > {\n recent?: boolean\n detected?: boolean\n standardWallet?: Wallet\n}\n\nexport interface ISelectedWallet {\n name: string\n homepage: string\n walletType: WalletType\n image: Images\n}\n\nexport interface NetworkData {\n name: string\n icon: string\n}\n\nexport enum ConnectionType {\n Nightly = 'Nightly',\n WalletStandard = 'WalletStandard'\n}\n\nexport interface ConnectionOptions {\n disableModal?: boolean // default: false\n initOnConnect?: boolean // default: false\n disableEagerConnect?: boolean // default: false\n}\nexport const defaultConnectionOptions: ConnectionOptions = {\n disableModal: false,\n initOnConnect: false,\n disableEagerConnect: false\n}\n", "export const logoBase64 = `data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Warstwa_2_00000061439313231298367920000001687573686820727225_' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 1146.3 1146.3' style='enable-background:new 0 0 1146.3 1146.3;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%236067F9;%7D .st1%7Bfill:%23F7F7F7;%7D%0A%3C/style%3E%3Cpath class='st0' d='M573.2,1146.3L573.2,1146.3C256.6,1146.3,0,889.7,0,573.2v0C0,256.6,256.6,0,573.1,0h0 c316.5,0,573.1,256.6,573.1,573.1v0C1146.3,889.7,889.7,1146.3,573.2,1146.3z'/%3E%3Cg%3E%3Cg%3E%3Cpath class='st1' d='M765.3,349.4c-36.1,50.5-81.4,85.4-134.9,108.8c-18.6-5.1-37.6-7.8-56.4-7.6c-0.6,0-1.1,0-1.7,0 c-18.2,0-36.6,2.7-54.6,7.6c-53.4-23.4-98.7-58.4-134.9-108.8c-11,27.5-53,122.2-2.5,254.7c0,0-16.1,69.1,13.5,128.5 c0,0,42.9-19.5,77,7.9c35.7,29,24.3,56.8,49.4,80.7c21.6,22,53.8,22,53.8,22s32.2,0,53.8-22c25.1-23.9,13.8-51.7,49.4-80.7 c34.1-27.4,77-7.9,77-7.9c29.6-59.4,13.5-128.5,13.5-128.5C818.2,471.6,776.3,376.9,765.3,349.4z M407.2,585.7 c-27.5-56.3-35-133.7-17.6-194.8c22.9,57.9,54,84,91.1,111.5C464.9,535,435.4,565.8,407.2,585.7z M486.2,685 c-21.6-9.5-26.2-28.4-26.2-28.4c29.5-18.5,72.8-4.4,74.2,39.6C511.3,682.3,503.8,692.7,486.2,685z M574.1,840.8 c-15.5,0-28-11.1-28-24.7s12.6-24.7,28-24.7c15.5,0,28,11.1,28,24.7S589.5,840.8,574.1,840.8z M662,685 c-17.6,7.7-25.1-2.7-48,11.1c1.4-43.9,44.7-58.1,74.2-39.6C688.2,656.5,683.5,675.5,662,685z M740.9,585.7 c-28.2-19.9-57.7-50.7-73.5-83.3c37.1-27.5,68.2-53.6,91.1-111.5C775.9,452,768.4,529.4,740.9,585.7z'/%3E%3C/g%3E%3Cg%3E%3Cg%3E%3Cpath class='st1' d='M1002.1,524.8c-2.4-2.6-15.8-16.7-37.6-17.3c-24-0.7-38.9,15.5-41,17.8c-8.5-62.9-34.1-122.3-74.2-172.5 c-59-73.8-143.1-120.2-236.9-130.6c-93.8-10.5-186.1,16.2-259.9,75.2c-52.7,42.2-92,97.8-113.7,161c-3,8.6-5.6,17.5-7.9,26.3 c-4.1,15.9-7.1,32.3-9,48.7l-0.1,0.9c-2.4,21.4-21.8,36.9-43.2,34.5c-21.1-2.4-36.6-21.5-34.6-42.6V526c0-0.1,0-0.2,0-0.4v-0.4 c0-0.3,0.1-0.6,0.1-0.9v-0.1c2-17.7,5.1-35.3,9.3-52.5c2.3-9.6,5-19.2,8-28.8c8.8-27.8,20.5-54.9,34.9-80.5 c27.3-48.7,63.3-91.1,107.1-126.1s93.1-60.8,146.6-76.7c39.9-11.9,80.8-17.8,122.2-17.8c16.1,0,32.3,0.9,48.5,2.7 c57.9,6.5,112.8,24.1,163.2,52.4C832.6,224.2,875,260.3,910,304c35,43.8,60.8,93.1,76.7,146.6 C994.2,474.9,999.2,499.8,1002.1,524.8z'/%3E%3C/g%3E%3Cg%3E%3Cpath class='st1' d='M1002.2,620.1c0,0.3-0.1,0.6-0.1,0.9l-0.1,0.4c0,0.1,0,0.3,0,0.4v0.3c-2,17.7-5.1,35.3-9.3,52.5 c-2.3,9.7-5,19.4-8,28.8c-8.8,27.8-20.5,54.9-34.9,80.5C922.5,832.6,886.5,875,842.7,910s-93.1,60.8-146.6,76.7 c-55.4,16.5-112.9,21.6-170.8,15.1s-112.8-24.1-163.2-52.4C313.4,922.1,271,886.1,236,842.3s-60.8-93.1-76.7-146.6 c-7.2-24.3-12.3-49.2-15.1-74.2c2.9,3.2,15,15.4,34.6,17.1c25.4,2.1,42-15.4,44.1-17.6c8.5,62.9,34.1,122.3,74.2,172.5 c59,73.8,143.1,120.1,236.9,130.6c13.3,1.5,26.6,2.2,39.9,2.2c79.8,0,156.8-26.8,220-77.4c52.7-42.2,92-97.8,113.7-161 c3-8.6,5.6-17.5,7.9-26.3c4.1-15.9,7.1-32.3,9-48.7l0.1-0.9c1.1-10.4,6.3-19.7,14.4-26.2c8.2-6.5,18.3-9.5,28.7-8.3 C988.8,579.7,1004.3,598.8,1002.2,620.1z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E`\n", "import {\n type XMLOptions,\n type NightlySelector,\n WalletSelectorItem\n} from '@nightlylabs/wallet-selector-modal'\nimport { type IWalletListItem, type NetworkData } from './types'\n\nexport class NightlyConnectSelectorModal {\n _modal: NightlySelector | undefined\n\n _anchor: HTMLElement\n _networkData: NetworkData\n _relay: string\n _walletsList: IWalletListItem[] = []\n\n _open = false\n\n onOpen: (() => void) | undefined\n onClose: (() => void) | undefined\n\n constructor(\n walletsList: IWalletListItem[],\n relay: string,\n networkData: NetworkData,\n anchorRef?: HTMLElement | null,\n variablesOverride?: object,\n stylesOverride?: string,\n qrConfigOverride?: Partial\n ) {\n this.walletsList = walletsList\n this._relay = relay\n this._networkData = networkData\n this._anchor = anchorRef ?? document.body\n this.createSelectorElement(variablesOverride, stylesOverride, qrConfigOverride)\n }\n\n get walletsList() {\n return this._walletsList\n }\n\n get qrCode() {\n return this._modal?.qrCode\n }\n\n set walletsList(list: IWalletListItem[]) {\n this._walletsList = list\n if (this._modal) {\n this._modal.selectorItems = list.map((item) => ({\n ...item,\n icon: item.image.default,\n link: item.homepage\n })) as WalletSelectorItem[]\n }\n }\n\n set sessionId(id: string) {\n if (this._modal && id) this._modal.sessionId = id\n }\n\n set timeoutError(error: string) {\n if (this._modal && error) this._modal.timeoutError = error\n }\n\n createSelectorElement = (\n variablesOverride?: object,\n stylesOverride?: string,\n qrConfigOverride?: Partial\n ) => {\n import('@nightlylabs/wallet-selector-modal').then(({ getNightlySelectorElement }) => {\n this._modal = getNightlySelectorElement(variablesOverride, stylesOverride, qrConfigOverride)\n this._modal.onClose = this.onCloseModal\n\n this._modal.relay = this._relay\n this._modal.chainIcon = this._networkData.icon\n this._modal.chainName = this._networkData.name\n this._modal.selectorItems = this.walletsList.map((item) => ({\n ...item,\n icon: item.image.default,\n link: item.homepage\n })) as WalletSelectorItem[]\n })\n }\n\n setStandardWalletConnectProgress = (isConnectingToStandardWallet: boolean) => {\n if (this._modal) {\n this._modal.connecting = isConnectingToStandardWallet\n }\n }\n\n public openModal = (\n sessionId: string | undefined,\n onSelectListWallet: (name: string) => void\n ) => {\n if (this._modal && this._open === false) {\n this._modal.onWalletClick = onSelectListWallet\n this._modal.sessionId = sessionId ?? ''\n this._anchor.appendChild(this._modal)\n this._open = true\n this.onOpen?.()\n return true\n }\n return false\n }\n\n public onCloseModal = () => {\n if (this._modal && this._open === true) {\n this._anchor.removeChild(this._modal)\n this._open = false\n this.onClose?.()\n }\n }\n\n public closeModal = () => {\n if (this._modal && this._open === true) {\n this._modal.handleClose()\n }\n }\n}\n", null, null, null, null, "// Copyright 2017-2023 @polkadot/x-global authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport { packageInfo } from \"./packageInfo.js\";\n\n// Ensure that we are able to run this without any @types/node definitions\n// and without having lib: ['dom'] in our TypeScript configuration\n// (may not be available in all environments, e.g. Deno springs to mind)\n\nfunction evaluateThis(fn) {\n return fn('return this');\n}\nexport const xglobal = typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : evaluateThis(Function);\nexport function extractGlobal(name, fallback) {\n // Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea\n // (as of now) as to why this looks like an \"any\" when we do cast it to a T\n //\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof xglobal[name] === 'undefined' ? fallback : xglobal[name];\n}\nexport function exposeGlobal(name, fallback) {\n if (typeof xglobal[name] === 'undefined') {\n xglobal[name] = fallback;\n }\n}", "// Copyright 2017-2023 @polkadot/x-textencoder authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// This is very limited, only handling Ascii values\nexport class TextDecoder {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,no-useless-constructor\n constructor(_) {\n // nothing\n }\n decode(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(value[i]);\n }\n return result;\n }\n}", "// Copyright 2017-2023 @polkadot/x-textencoder authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { extractGlobal } from '@polkadot/x-global';\nimport { TextDecoder as Fallback } from \"./fallback.js\";\nexport { packageInfo } from \"./packageInfo.js\";\nexport const TextDecoder = extractGlobal('TextDecoder', Fallback);", "// Copyright 2017-2023 @polkadot/x-global authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport { packageInfo } from \"./packageInfo.js\";\n\n// Ensure that we are able to run this without any @types/node definitions\n// and without having lib: ['dom'] in our TypeScript configuration\n// (may not be available in all environments, e.g. Deno springs to mind)\n\nfunction evaluateThis(fn) {\n return fn('return this');\n}\nexport const xglobal = typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : evaluateThis(Function);\nexport function extractGlobal(name, fallback) {\n // Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea\n // (as of now) as to why this looks like an \"any\" when we do cast it to a T\n //\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof xglobal[name] === 'undefined' ? fallback : xglobal[name];\n}\nexport function exposeGlobal(name, fallback) {\n if (typeof xglobal[name] === 'undefined') {\n xglobal[name] = fallback;\n }\n}", "// Copyright 2017-2023 @polkadot/x-textencoder authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// This is very limited, only handling Ascii values\nexport class TextEncoder {\n encode(value) {\n const u8a = new Uint8Array(value.length);\n for (let i = 0; i < value.length; i++) {\n u8a[i] = value.charCodeAt(i);\n }\n return u8a;\n }\n}", "// Copyright 2017-2023 @polkadot/x-textencoder authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { extractGlobal } from '@polkadot/x-global';\nimport { TextEncoder as Fallback } from \"./fallback.js\";\nexport { packageInfo } from \"./packageInfo.js\";\nexport const TextEncoder = extractGlobal('TextEncoder', Fallback);", "// Copyright 2017-2023 @polkadot/x-global authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport { packageInfo } from \"./packageInfo.js\";\n\n// Ensure that we are able to run this without any @types/node definitions\n// and without having lib: ['dom'] in our TypeScript configuration\n// (may not be available in all environments, e.g. Deno springs to mind)\n\nfunction evaluateThis(fn) {\n return fn('return this');\n}\nexport const xglobal = typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : evaluateThis(Function);\nexport function extractGlobal(name, fallback) {\n // Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea\n // (as of now) as to why this looks like an \"any\" when we do cast it to a T\n //\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof xglobal[name] === 'undefined' ? fallback : xglobal[name];\n}\nexport function exposeGlobal(name, fallback) {\n if (typeof xglobal[name] === 'undefined') {\n xglobal[name] = fallback;\n }\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n/**\n * @name isFunction\n * @summary Tests for a `function`.\n * @description\n * Checks to see if the input value is a JavaScript function.\n * @example\n *
\n *\n * ```javascript\n * import { isFunction } from '@polkadot/util';\n *\n * isFunction(() => false); // => true\n * ```\n */\nexport function isFunction(value) {\n return typeof value === 'function';\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name arrayChunk\n * @summary Split T[] into T[][] based on the defind size\n * @description\n * Returns a set ao arrays based on the chunksize\n * @example\n *
\n *\n * ```javascript\n * import { arrayChunk } from '@polkadot/util';\n *\n * arrayChunk([1, 2, 3, 4, 5]); // [[1, 2], [3, 4], [5]]\n * ```\n */\nexport function arrayChunk(array, chunkSize) {\n const outputSize = Math.ceil(array.length / chunkSize);\n\n // noop for the single-split case\n if (outputSize === 1) {\n return [array];\n }\n const output = Array(outputSize);\n for (let i = 0; i < outputSize; i++) {\n const offset = i * chunkSize;\n output[i] = array.slice(offset, offset + chunkSize);\n }\n return output;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// This is supposed to be a faster concat...\n// https://dev.to/uilicious/javascript-array-push-is-945x-faster-than-array-concat-1oki\n\n/**\n * @name arrayFlatten\n * @summary Merge T[][] into T[]\n * @description\n * Returns a new array with all arrays merged into one\n * @example\n *
\n *\n * ```javascript\n * import { arrayFlatten } from '@polkadot/util';\n *\n * arrayFlatten([[1, 2], [3, 4], [5]]); // [1, 2, 3, 4, 5]\n * ```\n */\nexport function arrayFlatten(arrays) {\n // noop for the empty & single-entry case\n if (arrays.length === 0) {\n return [];\n } else if (arrays.length === 1) {\n return arrays[0];\n }\n\n // pre-allocate based on the combined size\n let size = 0;\n for (let i = 0; i < arrays.length; i++) {\n size += arrays[i].length;\n }\n const output = new Array(size);\n let i = -1;\n for (let j = 0; j < arrays.length; j++) {\n const a = arrays[j];\n\n // instead of pushing, we just set the entries\n for (let e = 0; e < a.length; e++) {\n output[++i] = a[e];\n }\n }\n return output;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isFunction } from \"./is/function.js\";\n/**\n * @name assert\n * @summary Checks for a valid test, if not Error is thrown.\n * @description\n * Checks that `test` is a truthy value. If value is falsy (`null`, `undefined`, `false`, ...), it throws an Error with the supplied `message`. When `test` passes, `true` is returned.\n * @example\n *
\n *\n * ```javascript\n * const { assert } from '@polkadot/util';\n *\n * assert(true, 'True should be true'); // passes\n * assert(false, 'False should not be true'); // Error thrown\n * assert(false, () => 'message'); // Error with 'message'\n * ```\n */\nexport function assert(condition, message) {\n if (!condition) {\n throw new Error(isFunction(message) ? message() : message);\n }\n}\n\n/**\n * @name assertReturn\n * @description Returns when the value is not undefined/null, otherwise throws assertion error\n */\nexport function assertReturn(value, message) {\n assert(value !== undefined && value !== null, message);\n return value;\n}\n\n/**\n * @name assertUnreachable\n * @description An assertion helper that ensures all codepaths are followed\n */\nexport function assertUnreachable(x) {\n throw new Error(`This codepath should be unreachable. Unhandled input: ${x}`);\n}", "// Copyright 2017-2023 @polkadot/x-bigint authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { xglobal } from '@polkadot/x-global';\nexport { packageInfo } from \"./packageInfo.js\";\nexport const BigInt = typeof xglobal.BigInt === 'function' && typeof xglobal.BigInt.asIntN === 'function' ? xglobal.BigInt : () => Number.NaN;", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BigInt } from '@polkadot/x-bigint';\n\n/**\n * @name _0n\n * @summary BigInt constant for 0.\n */\nexport const _0n = /*#__PURE__*/BigInt(0);\n\n/**\n * @name _1n\n * @summary BigInt constant for 1.\n */\nexport const _1n = /*#__PURE__*/BigInt(1);\n\n/**\n * @name _2n\n * @summary BigInt constant for 2.\n */\nexport const _2n = /*#__PURE__*/BigInt(2);\n\n/**\n * @name _3n\n * @summary BigInt constant for 3.\n */\nexport const _3n = /*#__PURE__*/BigInt(3);\n\n/**\n * @name _4n\n * @summary BigInt constant for 4.\n */\nexport const _4n = /*#__PURE__*/BigInt(4);\n\n/**\n * @name _5n\n * @summary BigInt constant for 5.\n */\nexport const _5n = /*#__PURE__*/BigInt(5);\n\n/**\n * @name _6n\n * @summary BigInt constant for 6.\n */\nexport const _6n = /*#__PURE__*/BigInt(6);\n\n/**\n * @name _7n\n * @summary BigInt constant for 7.\n */\nexport const _7n = /*#__PURE__*/BigInt(7);\n\n/**\n * @name _8n\n * @summary BigInt constant for 8.\n */\nexport const _8n = /*#__PURE__*/BigInt(8);\n\n/**\n * @name _9n\n * @summary BigInt constant for 9.\n */\nexport const _9n = /*#__PURE__*/BigInt(9);\n\n/**\n * @name _10n\n * @summary BigInt constant for 10.\n */\nexport const _10n = /*#__PURE__*/BigInt(10);\n\n/**\n * @name _100n\n * @summary BigInt constant for 100.\n */\nexport const _100n = /*#__PURE__*/BigInt(100);\n\n/**\n * @name _1000n\n * @summary BigInt constant for 1000.\n */\nexport const _1000n = /*#__PURE__*/BigInt(1000);\n\n/**\n * @name _1Mn\n * @summary BigInt constant for 1,000,000 (million).\n */\nexport const _1Mn = /*#__PURE__*/BigInt(1000000);\n\n/**\n* @name _1Bn\n* @summary BigInt constant for 1,000,000,000 (billion).\n*/\nexport const _1Bn = /*#__PURE__*/BigInt(1000000000);\n\n/**\n* @name _1Qn\n* @summary BigInt constant for 1,000,000,000,000,000,000 (quitillion).\n*/\nexport const _1Qn = _1Bn * _1Bn;\n\n/**\n* @name _2pow53n\n* @summary BigInt constant for MAX_SAFE_INTEGER\n*/\nexport const _2pow53n = /*#__PURE__*/BigInt(Number.MAX_SAFE_INTEGER);\n\n/**\n * @name _sqrt2pow53n\n * @summary BigInt constant for Math.sqrt(MAX_SAFE_INTEGER)\n */\nexport const _sqrt2pow53n = /*#__PURE__*/BigInt(94906265);", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nconst CHR = '0123456789abcdef';\nconst U8 = new Uint8Array(256);\nconst U16 = new Uint8Array(256 * 256);\nfor (let i = 0; i < CHR.length; i++) {\n U8[CHR[i].charCodeAt(0) | 0] = i | 0;\n if (i > 9) {\n U8[CHR[i].toUpperCase().charCodeAt(0) | 0] = i | 0;\n }\n}\nfor (let i = 0; i < 256; i++) {\n const s = i << 8;\n for (let j = 0; j < 256; j++) {\n U16[s | j] = U8[i] << 4 | U8[j];\n }\n}\n\n/**\n * @name hexToU8a\n * @summary Creates a Uint8Array object from a hex string.\n * @description\n * `null` inputs returns an empty `Uint8Array` result. Hex input values return the actual bytes value converted to a Uint8Array. Anything that is not a hex string (including the `0x` prefix) throws an error.\n * @example\n *
\n *\n * ```javascript\n * import { hexToU8a } from '@polkadot/util';\n *\n * hexToU8a('0x80001f'); // Uint8Array([0x80, 0x00, 0x1f])\n * hexToU8a('0x80001f', 32); // Uint8Array([0x00, 0x80, 0x00, 0x1f])\n * ```\n */\nexport function hexToU8a(value, bitLength = -1) {\n if (!value) {\n return new Uint8Array();\n }\n let s = value.startsWith('0x') ? 2 : 0;\n const decLength = Math.ceil((value.length - s) / 2);\n const endLength = Math.ceil(bitLength === -1 ? decLength : bitLength / 8);\n const result = new Uint8Array(endLength);\n const offset = endLength > decLength ? endLength - decLength : 0;\n for (let i = offset; i < endLength; i++, s += 2) {\n // The big factor here is actually the string lookups. If we do\n // HEX_TO_U16[value.substring()] we get an 10x slowdown. In the\n // same vein using charCodeAt (as opposed to value[s] or value.charAt(s)) is\n // also the faster operation by at least 2x with the character map above\n result[i] = U16[value.charCodeAt(s) << 8 | value.charCodeAt(s + 1)];\n }\n return result;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport BN from 'bn.js';\nexport { BN };", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BN } from \"../bn/bn.js\";\n\n/**\n * @name isBn\n * @summary Tests for a `BN` object instance.\n * @description\n * Checks to see if the input object is an instance of `BN` (bn.js).\n * @example\n *
\n *\n * ```javascript\n * import BN from 'bn.js';\n * import { isBn } from '@polkadot/util';\n *\n * console.log('isBn', isBn(new BN(1))); // => true\n * ```\n */\nexport function isBn(value) {\n return BN.isBN(value);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport const REGEX_HEX_PREFIXED = /^0x[\\da-fA-F]+$/;\nexport const REGEX_HEX_NOPREFIX = /^[\\da-fA-F]+$/;\n\n/**\n * @name isHex\n * @summary Tests for a hex string.\n * @description\n * Checks to see if the input value is a `0x` prefixed hex string. Optionally (`bitLength` !== -1) checks to see if the bitLength is correct.\n * @example\n *
\n *\n * ```javascript\n * import { isHex } from '@polkadot/util';\n *\n * isHex('0x1234'); // => true\n * isHex('0x1234', 8); // => false\n * ```\n */\nexport function isHex(value, bitLength = -1, ignoreLength) {\n return typeof value === 'string' && (value === '0x' || REGEX_HEX_PREFIXED.test(value)) && (bitLength === -1 ? ignoreLength || value.length % 2 === 0 : value.length === 2 + Math.ceil(bitLength / 4));\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name isObject\n * @summary Tests for an `object`.\n * @description\n * Checks to see if the input value is a JavaScript object.\n * @example\n *
\n *\n * ```javascript\n * import { isObject } from '@polkadot/util';\n *\n * isObject({}); // => true\n * isObject('something'); // => false\n * ```\n */\nexport function isObject(value) {\n return !!value && typeof value === 'object';\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isFunction } from \"./function.js\";\nimport { isObject } from \"./object.js\";\nexport function isOn(...fns) {\n return value => (isObject(value) || isFunction(value)) && fns.every(f => isFunction(value[f]));\n}\nexport function isOnFunction(...fns) {\n return value => isFunction(value) && fns.every(f => isFunction(value[f]));\n}\nexport function isOnObject(...fns) {\n return value => isObject(value) && fns.every(f => isFunction(value[f]));\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isOn } from \"./helpers.js\";\nexport const isToBigInt = /*#__PURE__*/isOn('toBigInt');", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isOn } from \"./helpers.js\";\nexport const isToBn = /*#__PURE__*/isOn('toBn');", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/** @internal */\nexport function createCmp(cmp) {\n return (...items) => {\n if (items.length === 0) {\n throw new Error('Must provide one or more arguments');\n }\n let result = items[0];\n for (let i = 1; i < items.length; i++) {\n if (cmp(items[i], result)) {\n result = items[i];\n }\n }\n return result;\n };\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BigInt } from '@polkadot/x-bigint';\nimport { xglobal } from '@polkadot/x-global';\n\n// Since we run in very different environments, we have to ensure we have all\n// the types used here for detection (some of these may require Node definitions,\n// which are not available in Deno/browser)\n\n/** true if the environment has proper BigInt support */\nexport const hasBigInt = typeof BigInt === 'function' && typeof BigInt.asIntN === 'function';\n\n/** true if the environment is CJS */\nexport const hasCjs = typeof require === 'function' && typeof module !== 'undefined';\n\n/** true if the environment has __dirname available */\nexport const hasDirname = typeof __dirname !== 'undefined';\n\n/** true if the environment is ESM */\nexport const hasEsm = !hasCjs;\n\n/** true if the environment has WebAssembly available */\nexport const hasWasm = typeof WebAssembly !== 'undefined';\n\n// NOTE We check the following on globalThis, avoiding specific polyfill detection\n// that some bundlers such as parcel would add (this is a check, not a use)\n\n/** true if the environment has support for Buffer (typically Node.js) */\nexport const hasBuffer = typeof xglobal.Buffer === 'function' && typeof xglobal.Buffer.isBuffer === 'function';\n\n/** true if the environment has process available (typically Node.js) */\nexport const hasProcess = typeof xglobal.process === 'object';", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { xglobal } from '@polkadot/x-global';\nimport { hasBuffer } from \"../has.js\";\nimport { isFunction } from \"./function.js\";\n\n// We define these interfaces to not have the Buffer type\n// (doing this removes the need for node types being available)\n\n/**\n * @name isBuffer\n * @summary Tests for a `Buffer` object instance.\n * @description\n * Checks to see if the input object is an instance of `Buffer`.\n * @example\n *
\n *\n * ```javascript\n * import { isBuffer } from '@polkadot/util';\n *\n * console.log('isBuffer', isBuffer(Buffer.from([]))); // => true\n * ```\n */\nexport function isBuffer(value) {\n // we do check a function first, since it is slightly faster than isBuffer itself\n return hasBuffer && isFunction(value && value.readDoubleLE) && xglobal.Buffer.isBuffer(value);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name isU8a\n * @summary Tests for a `Uint8Array` object instance.\n * @description\n * Checks to see if the input object is an instance of `Uint8Array`.\n * @example\n *
\n *\n * ```javascript\n * import { isUint8Array } from '@polkadot/util';\n *\n * console.log('isU8a', isU8a([])); // => false\n * ```\n */\nexport function isU8a(value) {\n // here we defer the instanceof check which is actually slightly\n // slower than just checking the constrctor (direct instances)\n return (value && value.constructor) === Uint8Array || value instanceof Uint8Array;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { TextEncoder } from '@polkadot/x-textencoder';\nconst encoder = new TextEncoder();\n\n/**\n * @name stringToU8a\n * @summary Creates a Uint8Array object from a utf-8 string.\n * @description\n * String input values return the actual encoded `UInt8Array`. `null` or `undefined` values returns an empty encoded array.\n * @example\n *
\n *\n * ```javascript\n * import { stringToU8a } from '@polkadot/util';\n *\n * stringToU8a('hello'); // [0x68, 0x65, 0x6c, 0x6c, 0x6f]\n * ```\n */\nexport function stringToU8a(value) {\n return value ? encoder.encode(value.toString()) : new Uint8Array();\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { hexToU8a } from \"../hex/toU8a.js\";\nimport { isBuffer } from \"../is/buffer.js\";\nimport { isHex } from \"../is/hex.js\";\nimport { isU8a } from \"../is/u8a.js\";\nimport { stringToU8a } from \"../string/toU8a.js\";\n\n/**\n * @name u8aToU8a\n * @summary Creates a Uint8Array value from a Uint8Array, Buffer, string or hex input.\n * @description\n * `null` or `undefined` inputs returns a `[]` result, Uint8Array values returns the value, hex strings returns a Uint8Array representation.\n * @example\n *
\n *\n * ```javascript\n * import { u8aToU8a } from '@polkadot/util';\n *\n * u8aToU8a(new Uint8Array([0x12, 0x34]); // => Uint8Array([0x12, 0x34])\n * u8aToU8a(0x1234); // => Uint8Array([0x12, 0x34])\n * ```\n */\nexport function u8aToU8a(value) {\n return isU8a(value)\n // NOTE isBuffer needs to go here since it actually extends\n // Uint8Array on Node.js environments, so all Buffer are Uint8Array,\n // but Uint8Array is not Buffer\n ? isBuffer(value) ? new Uint8Array(value) : value : isHex(value) ? hexToU8a(value) : Array.isArray(value) ? new Uint8Array(value) : stringToU8a(value);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aToU8a } from \"./toU8a.js\";\n\n/**\n * @name u8aConcat\n * @summary Creates a concatenated Uint8Array from the inputs.\n * @description\n * Concatenates the input arrays into a single `UInt8Array`.\n * @example\n *
\n *\n * ```javascript\n * import { { u8aConcat } from '@polkadot/util';\n *\n * u8aConcat(\n * new Uint8Array([1, 2, 3]),\n * new Uint8Array([4, 5, 6])\n * ); // [1, 2, 3, 4, 5, 6]\n * ```\n */\nexport function u8aConcat(...list) {\n const u8as = new Array(list.length);\n let length = 0;\n for (let i = 0; i < list.length; i++) {\n u8as[i] = u8aToU8a(list[i]);\n length += u8as[i].length;\n }\n return u8aConcatStrict(u8as, length);\n}\n\n/**\n * @name u8aConcatStrict\n * @description A strict version of [[u8aConcat]], accepting only Uint8Array inputs\n */\nexport function u8aConcatStrict(u8as, length = 0) {\n let offset = 0;\n if (!length) {\n for (let i = 0; i < u8as.length; i++) {\n length += u8as[i].length;\n }\n }\n const result = new Uint8Array(length);\n for (let i = 0; i < u8as.length; i++) {\n result.set(u8as[i], offset);\n offset += u8as[i].length;\n }\n return result;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aToU8a } from \"./toU8a.js\";\n\n/**\n * @name u8aEq\n * @summary Compares two Uint8Arrays for equality.\n * @description\n * For `UInt8Array` (or hex string) input values true if there is a match.\n * @example\n *
\n *\n * ```javascript\n * import { u8aEq } from '@polkadot/util';\n *\n * u8aEq(new Uint8Array([0x68, 0x65]), new Uint8Array([0x68, 0x65])); // true\n * ```\n */\nexport function u8aEq(a, b) {\n const u8aa = u8aToU8a(a);\n const u8ab = u8aToU8a(b);\n if (u8aa.length === u8ab.length) {\n const dvA = new DataView(u8aa.buffer, u8aa.byteOffset);\n const dvB = new DataView(u8ab.buffer, u8ab.byteOffset);\n const mod = u8aa.length % 4 | 0;\n const length = u8aa.length - mod | 0;\n for (let i = 0; i < length; i += 4) {\n if (dvA.getUint32(i) !== dvB.getUint32(i)) {\n return false;\n }\n }\n for (let i = length; i < u8aa.length; i++) {\n if (u8aa[i] !== u8ab[i]) {\n return false;\n }\n }\n return true;\n }\n return false;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name u8aToFloat\n * @description Converts a Uint8Array value into the float (either 32 or 64-bit)\n * representation.\n */\nexport function u8aToFloat(value, {\n bitLength = 32,\n isLe = true\n} = {}) {\n if (bitLength !== 32 && bitLength !== 64) {\n throw new Error('Invalid bitLength provided, expected 32 or 64');\n } else if (value.length < bitLength / 8) {\n throw new Error(`Invalid input buffer provided, expected at least ${bitLength / 8} bytes, found ${value.length}`);\n }\n const dv = new DataView(value.buffer, value.byteOffset);\n return bitLength === 32 ? dv.getFloat32(0, isLe) : dv.getFloat64(0, isLe);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BN } from \"../bn/bn.js\";\n\n/**\n * @name u8aToBn\n * @summary Creates a BN from a Uint8Array object.\n * @description\n * `UInt8Array` input values return the actual BN. `null` or `undefined` values returns an `0x0` value.\n * @param value The value to convert\n * @param options Options to pass while converting\n * @param options.isLe Convert using Little Endian (default)\n * @param options.isNegative Convert using two's complement\n * @example\n *
\n *\n * ```javascript\n * import { u8aToBn } from '@polkadot/util';\n *\n * u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f\n * ```\n */\nexport function u8aToBn(value, {\n isLe = true,\n isNegative = false\n} = {}) {\n const count = value.length;\n\n // shortcut for <= u48 values - in this case the manual conversion\n // here seems to be more efficient than passing the full array\n if (count <= 6) {\n if (isNegative) {\n let result = 0;\n if (isLe) {\n // Most common case i{8, 16, 32} default LE SCALE-encoded\n // For <= 32, we also optimize the xor to a single op\n // (see the comments around unrolling in the next section)\n switch (count) {\n case 0:\n return new BN(0);\n case 1:\n result = value[0] ^ 0x000000ff;\n break;\n case 2:\n result = value[0] + (value[1] << 8) ^ 0x0000ffff;\n break;\n case 3:\n result = value[0] + (value[1] << 8) + (value[2] << 16) ^ 0x00ffffff;\n break;\n case 4:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n result = value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff;\n break;\n case 5:\n result = (value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff) + (value[4] ^ 0xff) * 0x100000000;\n break;\n default:\n // 6\n result = (value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff) + (value[4] + (value[5] << 8) ^ 0x0000ffff) * 0x100000000;\n break;\n }\n } else {\n for (let i = 0; i < count; i++) {\n result = result * 0x100 + (value[i] ^ 0xff);\n }\n }\n return count ? new BN(result * -1 - 1) : new BN(0);\n } else if (isLe) {\n // Most common case - u{8, 16, 32} default LE SCALE-encoded\n //\n // There are some slight benefits in unrolling this specific loop,\n // however it comes with diminishing returns since here the actual\n // `new BN` does seem to take up the bulk of the time\n switch (count) {\n case 0:\n return new BN(0);\n case 1:\n return new BN(value[0]);\n case 2:\n return new BN(value[0] + (value[1] << 8));\n case 3:\n return new BN(value[0] + (value[1] << 8) + (value[2] << 16));\n case 4:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return new BN(value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000);\n case 5:\n return new BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8)) * 0x1000000);\n default:\n // 6\n return new BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8) + (value[5] << 16)) * 0x1000000);\n }\n } else {\n let result = 0;\n for (let i = 0; i < count; i++) {\n result = result * 0x100 + value[i];\n }\n return new BN(result);\n }\n }\n return isNegative ? new BN(value, isLe ? 'le' : 'be').fromTwos(value.length * 8) : new BN(value, isLe ? 'le' : 'be');\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nconst U8 = new Array(256);\nconst U16 = new Array(256 * 256);\nfor (let n = 0; n < 256; n++) {\n U8[n] = n.toString(16).padStart(2, '0');\n}\nfor (let i = 0; i < 256; i++) {\n const s = i << 8;\n for (let j = 0; j < 256; j++) {\n U16[s | j] = U8[i] + U8[j];\n }\n}\n\n/** @internal */\nfunction hex(value, result) {\n const mod = value.length % 2 | 0;\n const length = value.length - mod | 0;\n for (let i = 0; i < length; i += 2) {\n result += U16[value[i] << 8 | value[i + 1]];\n }\n if (mod) {\n result += U8[value[length] | 0];\n }\n return result;\n}\n\n/**\n * @name u8aToHex\n * @summary Creates a hex string from a Uint8Array object.\n * @description\n * `UInt8Array` input values return the actual hex string. `null` or `undefined` values returns an `0x` string.\n * @example\n *
\n *\n * ```javascript\n * import { u8aToHex } from '@polkadot/util';\n *\n * u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f\n * ```\n */\nexport function u8aToHex(value, bitLength = -1, isPrefixed = true) {\n // this is not 100% correct sinmce we support isPrefixed = false....\n const empty = isPrefixed ? '0x' : '';\n if (!value || !value.length) {\n return empty;\n } else if (bitLength > 0) {\n const length = Math.ceil(bitLength / 8);\n if (value.length > length) {\n return `${hex(value.subarray(0, length / 2), empty)}\u2026${hex(value.subarray(value.length - length / 2), '')}`;\n }\n }\n return hex(value, empty);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name u8aToNumber\n * @summary Creates a number from a Uint8Array object.\n */\nexport function u8aToNumber(value, {\n isNegative = false\n} = {}) {\n const count = value.length;\n if (isNegative) {\n let result = 0;\n switch (count) {\n case 0:\n return 0;\n case 1:\n result = value[0] ^ 0x000000ff;\n break;\n case 2:\n result = value[0] + (value[1] << 8) ^ 0x0000ffff;\n break;\n case 3:\n result = value[0] + (value[1] << 8) + (value[2] << 16) ^ 0x00ffffff;\n break;\n case 4:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n result = value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff;\n break;\n case 5:\n result = (value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff) + (value[4] ^ 0xff) * 0x100000000;\n break;\n case 6:\n result = (value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff) + (value[4] + (value[5] << 8) ^ 0x0000ffff) * 0x100000000;\n break;\n default:\n throw new Error('Value more than 48-bits cannot be reliably converted');\n }\n return result * -1 - 1;\n }\n switch (count) {\n case 0:\n return 0;\n case 1:\n return value[0];\n case 2:\n return value[0] + (value[1] << 8);\n case 3:\n return value[0] + (value[1] << 8) + (value[2] << 16);\n case 4:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000;\n case 5:\n return value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8)) * 0x1000000;\n case 6:\n return value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8) + (value[5] << 16)) * 0x1000000;\n default:\n throw new Error('Value more than 48-bits cannot be reliably converted');\n }\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { TextDecoder } from '@polkadot/x-textdecoder';\nconst decoder = new TextDecoder('utf-8');\n\n/**\n * @name u8aToString\n * @summary Creates a utf-8 string from a Uint8Array object.\n * @description\n * `UInt8Array` input values return the actual decoded utf-8 string. `null` or `undefined` values returns an empty string.\n * @example\n *
\n *\n * ```javascript\n * import { u8aToString } from '@polkadot/util';\n *\n * u8aToString(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f])); // hello\n * ```\n */\nexport function u8aToString(value) {\n return value ? decoder.decode(value) : '';\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BN } from \"./bn.js\";\n\n/**\n * @name BN_ZERO\n * @summary BN constant for 0.\n */\nexport const BN_ZERO = /*#__PURE__*/new BN(0);\n\n/**\n * @name BN_ONE\n * @summary BN constant for 1.\n */\nexport const BN_ONE = /*#__PURE__*/new BN(1);\n\n/**\n * @name BN_TWO\n * @summary BN constant for 2.\n */\nexport const BN_TWO = /*#__PURE__*/new BN(2);\n\n/**\n * @name BN_THREE\n * @summary BN constant for 3.\n */\nexport const BN_THREE = /*#__PURE__*/new BN(3);\n\n/**\n * @name BN_FOUR\n * @summary BN constant for 4.\n */\nexport const BN_FOUR = /*#__PURE__*/new BN(4);\n\n/**\n * @name BN_FIVE\n * @summary BN constant for 5.\n */\nexport const BN_FIVE = /*#__PURE__*/new BN(5);\n\n/**\n * @name BN_SIX\n * @summary BN constant for 6.\n */\nexport const BN_SIX = /*#__PURE__*/new BN(6);\n\n/**\n * @name BN_SEVEN\n * @summary BN constant for 7.\n */\nexport const BN_SEVEN = /*#__PURE__*/new BN(7);\n\n/**\n * @name BN_EIGHT\n * @summary BN constant for 8.\n */\nexport const BN_EIGHT = /*#__PURE__*/new BN(8);\n\n/**\n * @name BN_NINE\n * @summary BN constant for 9.\n */\nexport const BN_NINE = /*#__PURE__*/new BN(9);\n\n/**\n * @name BN_TEN\n * @summary BN constant for 10.\n */\nexport const BN_TEN = /*#__PURE__*/new BN(10);\n\n/**\n * @name BN_HUNDRED\n * @summary BN constant for 100.\n */\nexport const BN_HUNDRED = /*#__PURE__*/new BN(100);\n\n/**\n * @name BN_THOUSAND\n * @summary BN constant for 1,000.\n */\nexport const BN_THOUSAND = /*#__PURE__*/new BN(1000);\n\n/**\n * @name BN_MILLION\n * @summary BN constant for 1,000,000.\n */\nexport const BN_MILLION = /*#__PURE__*/new BN(1000000);\n\n/**\n * @name BN_BILLION\n * @summary BN constant for 1,000,000,000.\n */\nexport const BN_BILLION = /*#__PURE__*/new BN(1000000000);\n\n/**\n * @name BN_QUINTILL\n * @summary BN constant for 1,000,000,000,000,000,000.\n */\nexport const BN_QUINTILL = BN_BILLION.mul(BN_BILLION);\n\n/**\n * @name BN_MAX_INTEGER\n * @summary BN constant for MAX_SAFE_INTEGER\n */\nexport const BN_MAX_INTEGER = /*#__PURE__*/new BN(Number.MAX_SAFE_INTEGER);\n\n/**\n * @name BN_SQRT_MAX_INTEGER\n * @summary BN constant for Math.sqrt(MAX_SAFE_INTEGER)\n */\nexport const BN_SQRT_MAX_INTEGER = /*#__PURE__*/new BN(94906265);", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { REGEX_HEX_NOPREFIX, REGEX_HEX_PREFIXED } from \"../is/hex.js\";\n\n/**\n * @name hexStripPrefix\n * @summary Strips any leading `0x` prefix.\n * @description\n * Tests for the existence of a `0x` prefix, and returns the value without the prefix. Un-prefixed values are returned as-is.\n * @example\n *
\n *\n * ```javascript\n * import { hexStripPrefix } from '@polkadot/util';\n *\n * console.log('stripped', hexStripPrefix('0x1234')); // => 1234\n * ```\n */\nexport function hexStripPrefix(value) {\n if (!value || value === '0x') {\n return '';\n } else if (REGEX_HEX_PREFIXED.test(value)) {\n return value.substring(2);\n } else if (REGEX_HEX_NOPREFIX.test(value)) {\n return value;\n }\n throw new Error(`Expected hex value to convert, found '${value}'`);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BN } from \"../bn/bn.js\";\nimport { hexStripPrefix } from \"./stripPrefix.js\";\n\n/**\n * @name hexToBn\n * @summary Creates a BN.js object from a hex string.\n * @description\n * `null` inputs returns a `BN(0)` result. Hex input values return the actual value converted to a BN. Anything that is not a hex string (including the `0x` prefix) throws an error.\n * @param _value The value to convert\n * @param _options Options to pass while converting\n * @param _options.isLe Convert using Little Endian\n * @param _options.isNegative Convert using two's complement\n * @example\n *
\n *\n * ```javascript\n * import { hexToBn } from '@polkadot/util';\n *\n * hexToBn('0x123480001f'); // => BN(0x123480001f)\n * ```\n */\nexport function hexToBn(value, {\n isLe = false,\n isNegative = false\n} = {}) {\n if (!value || value === '0x') {\n return new BN(0);\n }\n const stripped = hexStripPrefix(value);\n const bn = new BN(stripped, 16, isLe ? 'le' : 'be');\n\n // fromTwos takes as parameter the number of bits, which is the hex length\n // multiplied by 4 (2 bytes being 8 bits)\n return isNegative ? bn.fromTwos(stripped.length * 4) : bn;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { createCmp } from \"../bi/helpers.js\";\n/**\n * @name bnMax\n * @summary Finds and returns the highest value in an array of BNs.\n * @example\n *
\n *\n * ```javascript\n * import BN from 'bn.js';\n * import { bnMax } from '@polkadot/util';\n *\n * bnMax([new BN(1), new BN(3), new BN(2)]).toString(); // => '3'\n * ```\n */\nexport const bnMax = /*#__PURE__*/createCmp((a, b) => a.gt(b));\n\n/**\n * @name bnMin\n * @summary Finds and returns the smallest value in an array of BNs.\n * @example\n *
\n *\n * ```javascript\n * import BN from 'bn.js';\n * import { bnMin } from '@polkadot/util';\n *\n * bnMin([new BN(1), new BN(3), new BN(2)]).toString(); // => '1'\n * ```\n */\nexport const bnMin = /*#__PURE__*/createCmp((a, b) => a.lt(b));", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name isBigInt\n * @summary Tests for a `BigInt` object instance.\n * @description\n * Checks to see if the input object is an instance of `BigInt`\n * @example\n *
\n *\n * ```javascript\n * import { isBigInt } from '@polkadot/util';\n *\n * console.log('isBigInt', isBigInt(123_456n)); // => true\n * ```\n */\nexport function isBigInt(value) {\n return typeof value === 'bigint';\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { hexToBn } from \"../hex/toBn.js\";\nimport { isBigInt } from \"../is/bigInt.js\";\nimport { isHex } from \"../is/hex.js\";\nimport { isToBigInt } from \"../is/toBigInt.js\";\nimport { isToBn } from \"../is/toBn.js\";\nimport { BN } from \"./bn.js\";\n\n/**\n * @name bnToBn\n * @summary Creates a BN value from a BN, bigint, string (base 10 or hex) or number input.\n * @description\n * `null` inputs returns a `0x0` result, BN values returns the value, numbers returns a BN representation.\n * @example\n *
\n *\n * ```javascript\n * import BN from 'bn.js';\n * import { bnToBn } from '@polkadot/util';\n *\n * bnToBn(0x1234); // => BN(0x1234)\n * bnToBn(new BN(0x1234)); // => BN(0x1234)\n * ```\n */\nexport function bnToBn(value) {\n return value ? BN.isBN(value) ? value : isHex(value) ? hexToBn(value.toString()) : isBigInt(value) ? new BN(value.toString()) : isToBn(value) ? value.toBn() : isToBigInt(value) ? new BN(value.toBigInt().toString()) : new BN(value) : new BN(0);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BN } from \"./bn.js\";\nimport { BN_MAX_INTEGER, BN_ONE, BN_SQRT_MAX_INTEGER } from \"./consts.js\";\nimport { bnToBn } from \"./toBn.js\";\n\n/**\n * @name bnSqrt\n * @summary Calculates the integer square root of a BN\n * @example\n *
\n *\n * ```javascript\n * import BN from 'bn.js';\n * import { bnSqrt } from '@polkadot/util';\n *\n * bnSqrt(new BN(16)).toString(); // => '4'\n * ```\n */\nexport function bnSqrt(value) {\n const n = bnToBn(value);\n if (n.isNeg()) {\n throw new Error('square root of negative numbers is not supported');\n }\n\n // https://stackoverflow.com/questions/53683995/javascript-big-integer-square-root/\n // shortcut <= 2^53 - 1 to use the JS utils\n if (n.lte(BN_MAX_INTEGER)) {\n // ~~ More performant version of Math.floor\n return new BN(~~Math.sqrt(n.toNumber()));\n }\n\n // Use sqrt(MAX_SAFE_INTEGER) as starting point. since we already know the\n // output will be larger than this, we expect this to be a safe start\n let x0 = BN_SQRT_MAX_INTEGER.clone();\n while (true) {\n const x1 = n.div(x0).iadd(x0).ishrn(1);\n if (x0.eq(x1) || x0.eq(x1.sub(BN_ONE))) {\n return x0;\n }\n x0 = x1;\n }\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bnToBn } from \"./toBn.js\";\nconst DEFAULT_OPTS = {\n bitLength: -1,\n isLe: true,\n isNegative: false\n};\n\n/**\n * @name bnToU8a\n * @summary Creates a Uint8Array object from a BN.\n * @description\n * `null`/`undefined`/`NaN` inputs returns an empty `Uint8Array` result. `BN` input values return the actual bytes value converted to a `Uint8Array`. Optionally convert using little-endian format if `isLE` is set.\n * @example\n *
\n *\n * ```javascript\n * import { bnToU8a } from '@polkadot/util';\n *\n * bnToU8a(new BN(0x1234)); // => [0x12, 0x34]\n * ```\n */\nexport function bnToU8a(value, {\n bitLength = -1,\n isLe = true,\n isNegative = false\n} = DEFAULT_OPTS) {\n const valueBn = bnToBn(value);\n const byteLength = bitLength === -1 ? Math.ceil(valueBn.bitLength() / 8) : Math.ceil((bitLength || 0) / 8);\n if (!value) {\n return bitLength === -1 ? new Uint8Array(1) : new Uint8Array(byteLength);\n }\n const output = new Uint8Array(byteLength);\n const bn = isNegative ? valueBn.toTwos(byteLength * 8) : valueBn;\n output.set(bn.toArray(isLe ? 'le' : 'be', byteLength), 0);\n return output;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aToHex } from \"../u8a/index.js\";\nimport { bnToU8a } from \"./toU8a.js\";\n\n/**\n * @name bnToHex\n * @summary Creates a hex value from a BN.js bignumber object.\n * @description\n * `null` inputs returns a `0x` result, BN values return the actual value as a `0x` prefixed hex value. Anything that is not a BN object throws an error. With `bitLength` set, it fixes the number to the specified length.\n * @example\n *
\n *\n * ```javascript\n * import BN from 'bn.js';\n * import { bnToHex } from '@polkadot/util';\n *\n * bnToHex(new BN(0x123456)); // => '0x123456'\n * ```\n */\nexport function bnToHex(value, {\n bitLength = -1,\n isLe = false,\n isNegative = false\n} = {}) {\n return u8aToHex(bnToU8a(value, {\n bitLength,\n isLe,\n isNegative\n }));\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BN, BN_ONE, BN_TWO, bnToBn, bnToU8a } from \"../bn/index.js\";\nimport { u8aConcatStrict } from \"../u8a/index.js\";\nconst MAX_U8 = BN_TWO.pow(new BN(8 - 2)).isub(BN_ONE);\nconst MAX_U16 = BN_TWO.pow(new BN(16 - 2)).isub(BN_ONE);\nconst MAX_U32 = BN_TWO.pow(new BN(32 - 2)).isub(BN_ONE);\nconst BL_16 = {\n bitLength: 16\n};\nconst BL_32 = {\n bitLength: 32\n};\n\n/**\n * @name compactToU8a\n * @description Encodes a number into a compact representation\n * @example\n *
\n *\n * ```javascript\n * import { compactToU8a } from '@polkadot/util';\n *\n * console.log(compactToU8a(511, 32)); // Uint8Array([0b11111101, 0b00000111])\n * ```\n */\nexport function compactToU8a(value) {\n const bn = bnToBn(value);\n if (bn.lte(MAX_U8)) {\n return new Uint8Array([bn.toNumber() << 2]);\n } else if (bn.lte(MAX_U16)) {\n return bnToU8a(bn.shln(2).iadd(BN_ONE), BL_16);\n } else if (bn.lte(MAX_U32)) {\n return bnToU8a(bn.shln(2).iadd(BN_TWO), BL_32);\n }\n const u8a = bnToU8a(bn);\n let length = u8a.length;\n\n // adjust to the minimum number of bytes\n while (u8a[length - 1] === 0) {\n length--;\n }\n if (length < 4) {\n throw new Error('Invalid length, previous checks match anything less than 2^30');\n }\n return u8aConcatStrict([\n // subtract 4 as minimum (also catered for in decoding)\n new Uint8Array([(length - 4 << 2) + 0b11]), u8a.subarray(0, length)]);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aConcatStrict } from \"../u8a/index.js\";\nimport { compactToU8a } from \"./toU8a.js\";\n\n/**\n * @name compactAddLength\n * @description Adds a length prefix to the input value\n * @example\n *
\n *\n * ```javascript\n * import { compactAddLength } from '@polkadot/util';\n *\n * console.log(compactAddLength(new Uint8Array([0xde, 0xad, 0xbe, 0xef]))); // Uint8Array([4 << 2, 0xde, 0xad, 0xbe, 0xef])\n * ```\n */\nexport function compactAddLength(input) {\n return u8aConcatStrict([compactToU8a(input.length), input]);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BN } from \"../bn/index.js\";\nimport { u8aToBn, u8aToU8a } from \"../u8a/index.js\";\n\n/**\n * @name compactFromU8a\n * @description Retrives the offset and encoded length from a compact-prefixed value\n * @example\n *
\n *\n * ```javascript\n * import { compactFromU8a } from '@polkadot/util';\n *\n * const [offset, length] = compactFromU8a(new Uint8Array([254, 255, 3, 0]));\n *\n * console.log('value offset=', offset, 'length=', length); // 4, 0xffff\n * ```\n */\nexport function compactFromU8a(input) {\n const u8a = u8aToU8a(input);\n\n // The u8a is manually converted here for 1, 2 & 4 lengths, it is 2x faster\n // than doing an additional call to u8aToBn (as with variable length)\n switch (u8a[0] & 0b11) {\n case 0b00:\n return [1, new BN(u8a[0] >>> 2)];\n case 0b01:\n return [2, new BN(u8a[0] + (u8a[1] << 8) >>> 2)];\n case 0b10:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return [4, new BN(u8a[0] + (u8a[1] << 8) + (u8a[2] << 16) + u8a[3] * 0x1000000 >>> 2)];\n\n // 0b11\n default:\n {\n // add 5 to shifted (4 for base length, 1 for this byte)\n const offset = (u8a[0] >>> 2) + 5;\n\n // we unroll the loop\n switch (offset) {\n // there still could be 4 bytes data, similar to 0b10 above (with offsets)\n case 5:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return [5, new BN(u8a[1] + (u8a[2] << 8) + (u8a[3] << 16) + u8a[4] * 0x1000000)];\n case 6:\n return [6, new BN(u8a[1] + (u8a[2] << 8) + (u8a[3] << 16) + (u8a[4] + (u8a[5] << 8)) * 0x1000000)];\n\n // 6 bytes data is the maximum, 48 bits (56 would overflow)\n case 7:\n return [7, new BN(u8a[1] + (u8a[2] << 8) + (u8a[3] << 16) + (u8a[4] + (u8a[5] << 8) + (u8a[6] << 16)) * 0x1000000)];\n\n // for anything else, use the non-unrolled version\n default:\n return [offset, u8aToBn(u8a.subarray(1, offset))];\n }\n }\n }\n}\n\n/**\n * @name compactFromU8aLim\n * @description A limited version of [[compactFromU8a]], accepting only Uint8Array inputs for values <= 48 bits\n */\nexport function compactFromU8aLim(u8a) {\n // The u8a is manually converted here for 1, 2 & 4 lengths, it is 2x faster\n // than doing an additional call to u8aToBn (as with variable length)\n switch (u8a[0] & 0b11) {\n case 0b00:\n return [1, u8a[0] >>> 2];\n case 0b01:\n return [2, u8a[0] + (u8a[1] << 8) >>> 2];\n case 0b10:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return [4, u8a[0] + (u8a[1] << 8) + (u8a[2] << 16) + u8a[3] * 0x1000000 >>> 2];\n\n // 0b11\n default:\n {\n // add 5 to shifted (4 for base length, 1 for this byte)\n // we unroll the loop\n switch ((u8a[0] >>> 2) + 5) {\n // there still could be 4 bytes data, similar to 0b10 above (with offsets)\n case 5:\n return [5, u8a[1] + (u8a[2] << 8) + (u8a[3] << 16) + u8a[4] * 0x1000000];\n case 6:\n return [6, u8a[1] + (u8a[2] << 8) + (u8a[3] << 16) + (u8a[4] + (u8a[5] << 8)) * 0x1000000];\n\n // 6 bytes data is the maximum, 48 bits (56 would overflow)\n case 7:\n return [7, u8a[1] + (u8a[2] << 8) + (u8a[3] << 16) + (u8a[4] + (u8a[5] << 8) + (u8a[6] << 16)) * 0x1000000];\n\n // for anything else, we are above the actual MAX_SAFE_INTEGER - bail out\n default:\n throw new Error('Compact input is > Number.MAX_SAFE_INTEGER');\n }\n }\n }\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { compactFromU8a } from \"./fromU8a.js\";\n\n/**\n * @name compactStripLength\n * @description Removes the length prefix, returning both the total length (including the value + compact encoding) and the decoded value with the correct length\n * @example\n *
\n *\n * ```javascript\n * import { compactStripLength } from '@polkadot/util';\n *\n * console.log(compactStripLength(new Uint8Array([2 << 2, 0xde, 0xad]))); // [2, Uint8Array[0xde, 0xad]]\n * ```\n */\nexport function compactStripLength(input) {\n const [offset, length] = compactFromU8a(input);\n const total = offset + length.toNumber();\n return [total, input.subarray(offset, total)];\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n/**\n * @name floatToU8a\n * @description Converts a float into a U8a representation (While we don't use BE in SCALE\n * we still allow for either representation, although, as elsewhere, isLe is default)\n */\nexport function floatToU8a(value = 0.0, {\n bitLength = 32,\n isLe = true\n} = {}) {\n if (bitLength !== 32 && bitLength !== 64) {\n throw new Error('Invalid bitLength provided, expected 32 or 64');\n }\n const result = new Uint8Array(bitLength / 8);\n const dv = new DataView(result.buffer, result.byteOffset);\n if (bitLength === 32) {\n dv.setFloat32(0, Number(value), isLe);\n } else {\n dv.setFloat64(0, Number(value), isLe);\n }\n return result;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name isBoolean\n * @summary Tests for a boolean value.\n * @description\n * Checks to see if the input value is a JavaScript boolean.\n * @example\n *
\n *\n * ```javascript\n * import { isBoolean } from '@polkadot/util';\n *\n * isBoolean(false); // => true\n * ```\n */\nexport function isBoolean(value) {\n return typeof value === 'boolean';\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// eslint-disable-next-line prefer-regex-literals\nconst NUMBER_REGEX = new RegExp('(\\\\d+?)(?=(\\\\d{3})+(?!\\\\d)|$)', 'g');\n\n/**\n * @name formatDecimal\n * @description Formats a number into string format with thousand separators\n */\nexport function formatDecimal(value, separator = ',') {\n // We can do this by adjusting the regx, however for the sake of clarity\n // we rather strip and re-add the negative sign in the output\n const isNegative = value[0].startsWith('-');\n const matched = isNegative ? value.substring(1).match(NUMBER_REGEX) : value.match(NUMBER_REGEX);\n return matched ? `${isNegative ? '-' : ''}${matched.join(separator)}` : value;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Get the decimal and thousand separator of a locale\n * @param locale\n * @returns {decimal: string, thousand: string}\n */\nexport function getSeparator(locale) {\n return {\n decimal: 0.1.toLocaleString(locale).substring(1, 2),\n thousand: 1000 .toLocaleString(locale).substring(1, 2)\n };\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/** @internal */\nexport const SI_MID = 8;\n\n/** @internal */\nexport const SI = [{\n power: -24,\n text: 'yocto',\n value: 'y'\n}, {\n power: -21,\n text: 'zepto',\n value: 'z'\n}, {\n power: -18,\n text: 'atto',\n value: 'a'\n}, {\n power: -15,\n text: 'femto',\n value: 'f'\n}, {\n power: -12,\n text: 'pico',\n value: 'p'\n}, {\n power: -9,\n text: 'nano',\n value: 'n'\n}, {\n power: -6,\n text: 'micro',\n value: '\u00B5'\n}, {\n power: -3,\n text: 'milli',\n value: 'm'\n}, {\n power: 0,\n text: 'Unit',\n value: '-'\n},\n// position 8\n{\n power: 3,\n text: 'Kilo',\n value: 'k'\n}, {\n power: 6,\n text: 'Mill',\n value: 'M'\n},\n// Mega, M\n{\n power: 9,\n text: 'Bill',\n value: 'B'\n},\n// Giga, G\n{\n power: 12,\n text: 'Tril',\n value: 'T'\n},\n// Tera, T\n{\n power: 15,\n text: 'Peta',\n value: 'P'\n}, {\n power: 18,\n text: 'Exa',\n value: 'E'\n}, {\n power: 21,\n text: 'Zeta',\n value: 'Z'\n}, {\n power: 24,\n text: 'Yotta',\n value: 'Y'\n}];\n\n// Given a SI type (e.g. k, m, Y) find the SI definition\n/** @internal */\nexport function findSi(type) {\n // use a loop here, better RN support (which doesn't have [].find)\n for (let i = 0; i < SI.length; i++) {\n if (SI[i].value === type) {\n return SI[i];\n }\n }\n return SI[SI_MID];\n}\n\n/** @internal */\nexport function calcSi(text, decimals, forceUnit) {\n if (forceUnit) {\n return findSi(forceUnit);\n }\n const siDefIndex = SI_MID - 1 + Math.ceil((text.length - decimals) / 3);\n return SI[siDefIndex] || SI[siDefIndex < 0 ? 0 : SI.length - 1];\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bnToBn } from \"../bn/toBn.js\";\nimport { isBoolean } from \"../is/boolean.js\";\nimport { formatDecimal } from \"./formatDecimal.js\";\nimport { getSeparator } from \"./getSeparator.js\";\nimport { calcSi, findSi, SI, SI_MID } from \"./si.js\";\nconst DEFAULT_DECIMALS = 0;\nconst DEFAULT_UNIT = SI[SI_MID].text;\nlet defaultDecimals = DEFAULT_DECIMALS;\nlet defaultUnit = DEFAULT_UNIT;\n\n// Formats a string/number with . notation\nfunction _formatBalance(input, {\n decimals = defaultDecimals,\n forceUnit,\n locale = 'en',\n withAll = false,\n withSi = true,\n withSiFull = false,\n withUnit = true,\n withZero = true\n} = {}) {\n // we only work with string inputs here - convert anything\n // into the string-only value\n let text = bnToBn(input).toString();\n if (text.length === 0 || text === '0') {\n return '0';\n }\n\n // strip the negative sign so we can work with clean groupings, re-add this in the\n // end when we return the result (from here on we work with positive numbers)\n let sign = '';\n if (text[0].startsWith('-')) {\n sign = '-';\n text = text.substring(1);\n }\n\n // We start at midpoint (8) minus 1 - this means that values display as\n // 123.4567 instead of 0.1234 k (so we always have the most relevant).\n const si = calcSi(text, decimals, forceUnit);\n const mid = text.length - (decimals + si.power);\n const pre = mid <= 0 ? '0' : text.substring(0, mid);\n\n // get the post from the midpoint onward and then first add max decimals\n // before trimming to the correct (calculated) amount of decimals again\n let post = text.padStart(mid < 0 ? decimals : 1, '0').substring(mid < 0 ? 0 : mid).padEnd(withAll ? Math.max(decimals, 4) : 4, '0').substring(0, withAll ? Math.max(4, decimals + si.power) : 4);\n\n // remove all trailing 0's (if required via flag)\n if (!withZero) {\n let end = post.length - 1;\n\n // This looks inefficient, however it is better to do the checks and\n // only make one final slice than it is to do it in multiples\n do {\n if (post[end] === '0') {\n end--;\n }\n } while (post[end] === '0');\n post = post.substring(0, end + 1);\n }\n\n // the display unit\n const unit = isBoolean(withUnit) ? SI[SI_MID].text : withUnit;\n\n // format the units for display based on the flags\n const units = withSi || withSiFull ? si.value === '-' ? withUnit ? ` ${unit}` : '' : ` ${withSiFull ? `${si.text}${withUnit ? ' ' : ''}` : si.value}${withUnit ? unit : ''}` : '';\n const {\n decimal,\n thousand\n } = getSeparator(locale);\n return `${sign}${formatDecimal(pre, thousand)}${post && `${decimal}${post}`}${units}`;\n}\nexport const formatBalance = _formatBalance;\nformatBalance.calcSi = (text, decimals = defaultDecimals) => calcSi(text, decimals);\nformatBalance.findSi = findSi;\nformatBalance.getDefaults = () => {\n return {\n decimals: defaultDecimals,\n unit: defaultUnit\n };\n};\n\n// get allowable options to display in a dropdown\nformatBalance.getOptions = (decimals = defaultDecimals) => {\n return SI.filter(({\n power\n }) => power < 0 ? decimals + power >= 0 : true);\n};\n\n// Sets the default decimals to use for formatting (ui-wide)\nformatBalance.setDefaults = ({\n decimals,\n unit\n}) => {\n defaultDecimals = decimals === undefined ? defaultDecimals : Array.isArray(decimals) ? decimals[0] : decimals;\n defaultUnit = unit === undefined ? defaultUnit : Array.isArray(unit) ? unit[0] : unit;\n SI[SI_MID].text = defaultUnit;\n};", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/** @internal */\nfunction zeroPad(value) {\n return value.toString().padStart(2, '0');\n}\n\n/**\n * @name formatDate\n * @description Formats a date in CCYY-MM-DD HH:MM:SS format\n */\nexport function formatDate(date) {\n const year = date.getFullYear().toString();\n const month = zeroPad(date.getMonth() + 1);\n const day = zeroPad(date.getDate());\n const hour = zeroPad(date.getHours());\n const minute = zeroPad(date.getMinutes());\n const second = zeroPad(date.getSeconds());\n return `${year}-${month}-${day} ${hour}:${minute}:${second}`;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bnToBn } from \"../bn/toBn.js\";\nimport { formatDecimal } from \"./formatDecimal.js\";\nimport { getSeparator } from \"./getSeparator.js\";\n/**\n * @name formatNumber\n * @description Formats a number into string format with thousand separators\n */\nexport function formatNumber(value, {\n locale = 'en'\n} = {}) {\n const {\n thousand\n } = getSeparator(locale);\n return formatDecimal(bnToBn(value).toString(), thousand);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name isString\n * @summary Tests for a string.\n * @description\n * Checks to see if the input value is a JavaScript string.\n * @example\n *
\n *\n * ```javascript\n * import { isString } from '@polkadot/util';\n *\n * console.log('isString', isString('test')); // => true\n * ```\n */\nexport function isString(value) {\n return typeof value === 'string' || value instanceof String;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aToU8a } from \"../u8a/toU8a.js\";\nimport { isHex } from \"./hex.js\";\nimport { isString } from \"./string.js\";\n\n/** @internal */\nfunction isAsciiStr(str) {\n const count = str.length | 0;\n for (let i = 0; i < count; i++) {\n const b = str.charCodeAt(i);\n\n // check is inlined here, it is faster than making a call\n if (b < 32 || b > 126) {\n return false;\n }\n }\n return true;\n}\n\n/** @internal */\nfunction isAsciiBytes(u8a) {\n const count = u8a.length | 0;\n for (let i = 0; i < count; i++) {\n const b = u8a[i] | 0;\n\n // check is inlined here, it is faster than making a call\n if (b < 32 || b > 126) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @name isAscii\n * @summary Tests if the input is printable ASCII\n * @description\n * Checks to see if the input string or Uint8Array is printable ASCII, 32-127 + formatters\n */\nexport function isAscii(value) {\n return isString(value) ? isHex(value) ? isAsciiBytes(u8aToU8a(value)) : isAsciiStr(value) : value ? isAsciiBytes(value) : false;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isOnFunction } from \"./helpers.js\";\n\n/**\n * @name isClass\n * Tests if the supplied agrument is a Class\n */\nexport const isClass = /*#__PURE__*/isOnFunction('isPrototypeOf', 'hasOwnProperty');", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isClass } from \"./class.js\";\n\n/**\n * @name isChildClass\n * @summary Tests if the child extends the parent Class\n * @description\n * Checks to see if the child Class extends the parent Class\n * @example\n *
\n *\n * ```javascript\n * import { isChildClass } from '@polkadot/util';\n *\n * console.log('isChildClass', isChildClass(BN, BN); // => true\n * console.log('isChildClass', isChildClass(BN, Uint8Array); // => false\n * ```\n */\nexport function isChildClass(Parent, Child) {\n // https://stackoverflow.com/questions/30993434/check-if-a-constructor-inherits-another-in-es6/30993664\n return isClass(Child) && isClass(Parent)\n // eslint-disable-next-line no-prototype-builtins\n ? Parent === Child || Parent.isPrototypeOf(Child) : false;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isOnObject } from \"./helpers.js\";\nconst checkCodec = /*#__PURE__*/isOnObject('toHex', 'toU8a');\nconst checkRegistry = /*#__PURE__*/isOnObject('get');\nexport function isCodec(value) {\n return checkCodec(value) && checkRegistry(value.registry);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isOnObject } from \"./helpers.js\";\n/**\n * @name isCompact\n * @summary Tests for SCALE-Compact-like object instance.\n */\nexport const isCompact = /*#__PURE__*/isOnObject('toBigInt', 'toBn', 'toNumber', 'unwrap');", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isBigInt } from \"./is/bigInt.js\";\n\n/** @internal */\nfunction replacer(_, v) {\n return isBigInt(v) ? v.toString() : v;\n}\n\n/**\n * @name stringify\n * @summary Performs a JSON.stringify, with BigInt handling\n * @description A wrapper for JSON.stringify that handles BigInt values transparently, converting them to string. No differences from the native JSON.stringify function otherwise.\n */\nexport function stringify(value, space) {\n return JSON.stringify(value, replacer, space);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name isNull\n * @summary Tests for a `null` values.\n * @description\n * Checks to see if the input value is `null`.\n * @example\n *
\n *\n * ```javascript\n * import { isNull } from '@polkadot/util';\n *\n * console.log('isNull', isNull(null)); // => true\n * ```\n */\nexport function isNull(value) {\n return value === null;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name isNumber\n * @summary Tests for a JavaScript number.\n * @description\n * Checks to see if the input value is a valid number.\n * @example\n *
\n *\n * ```javascript\n * import { isNumber } from '@polkadot/util';\n *\n * console.log('isNumber', isNumber(1234)); // => true\n * ```\n */\nexport function isNumber(value) {\n return typeof value === 'number';\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name isUndefined\n * @summary Tests for a `undefined` values.\n * @description\n * Checks to see if the input value is `undefined`.\n * @example\n *
\n *\n * ```javascript\n * import { isUndefined } from '@polkadot/util';\n *\n * console.log('isUndefined', isUndefined(void(0))); // => true\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isUndefined(value) {\n return value === undefined;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// Adapted from https://github.com/JulienPalard/is_utf8/blob/master/is_utf8.c\n\nimport { u8aToU8a } from \"../u8a/toU8a.js\";\nimport { isString } from \"./string.js\";\n\n/**\n * @name isUtf8\n * @summary Tests if the input is valid Utf8\n * @description\n * Checks to see if the input string or Uint8Array is valid Utf8\n */\nexport function isUtf8(value) {\n if (!value) {\n return isString(value);\n }\n const u8a = u8aToU8a(value);\n const len = u8a.length;\n let i = 0;\n while (i < len) {\n if (u8a[i] <= 0x7F) /* 00..7F */{\n i += 1;\n } else if (u8a[i] >= 0xC2 && u8a[i] <= 0xDF) /* C2..DF 80..BF */{\n if (i + 1 < len) /* Expect a 2nd byte */{\n if (u8a[i + 1] < 0x80 || u8a[i + 1] > 0xBF) {\n // *message = \"After a first byte between C2 and DF, expecting a 2nd byte between 80 and BF\";\n // *faulty_bytes = 2;\n return false;\n }\n } else {\n // *message = \"After a first byte between C2 and DF, expecting a 2nd byte.\";\n // *faulty_bytes = 1;\n return false;\n }\n i += 2;\n } else if (u8a[i] === 0xE0) /* E0 A0..BF 80..BF */{\n if (i + 2 < len) /* Expect a 2nd and 3rd byte */{\n if (u8a[i + 1] < 0xA0 || u8a[i + 1] > 0xBF) {\n // *message = \"After a first byte of E0, expecting a 2nd byte between A0 and BF.\";\n // *faulty_bytes = 2;\n return false;\n }\n if (u8a[i + 2] < 0x80 || u8a[i + 2] > 0xBF) {\n // *message = \"After a first byte of E0, expecting a 3nd byte between 80 and BF.\";\n // *faulty_bytes = 3;\n return false;\n }\n } else {\n // *message = \"After a first byte of E0, expecting two following bytes.\";\n // *faulty_bytes = 1;\n return false;\n }\n i += 3;\n } else if (u8a[i] >= 0xE1 && u8a[i] <= 0xEC) /* E1..EC 80..BF 80..BF */{\n if (i + 2 < len) /* Expect a 2nd and 3rd byte */{\n if (u8a[i + 1] < 0x80 || u8a[i + 1] > 0xBF) {\n // *message = \"After a first byte between E1 and EC, expecting the 2nd byte between 80 and BF.\";\n // *faulty_bytes = 2;\n return false;\n }\n if (u8a[i + 2] < 0x80 || u8a[i + 2] > 0xBF) {\n // *message = \"After a first byte between E1 and EC, expecting the 3rd byte between 80 and BF.\";\n // *faulty_bytes = 3;\n return false;\n }\n } else {\n // *message = \"After a first byte between E1 and EC, expecting two following bytes.\";\n // *faulty_bytes = 1;\n return false;\n }\n i += 3;\n } else if (u8a[i] === 0xED) /* ED 80..9F 80..BF */{\n if (i + 2 < len) /* Expect a 2nd and 3rd byte */{\n if (u8a[i + 1] < 0x80 || u8a[i + 1] > 0x9F) {\n // *message = \"After a first byte of ED, expecting 2nd byte between 80 and 9F.\";\n // *faulty_bytes = 2;\n return false;\n }\n if (u8a[i + 2] < 0x80 || u8a[i + 2] > 0xBF) {\n // *message = \"After a first byte of ED, expecting 3rd byte between 80 and BF.\";\n // *faulty_bytes = 3;\n return false;\n }\n } else {\n // *message = \"After a first byte of ED, expecting two following bytes.\";\n // *faulty_bytes = 1;\n return false;\n }\n i += 3;\n } else if (u8a[i] >= 0xEE && u8a[i] <= 0xEF) /* EE..EF 80..BF 80..BF */{\n if (i + 2 < len) /* Expect a 2nd and 3rd byte */{\n if (u8a[i + 1] < 0x80 || u8a[i + 1] > 0xBF) {\n // *message = \"After a first byte between EE and EF, expecting 2nd byte between 80 and BF.\";\n // *faulty_bytes = 2;\n return false;\n }\n if (u8a[i + 2] < 0x80 || u8a[i + 2] > 0xBF) {\n // *message = \"After a first byte between EE and EF, expecting 3rd byte between 80 and BF.\";\n // *faulty_bytes = 3;\n return false;\n }\n } else {\n // *message = \"After a first byte between EE and EF, two following bytes.\";\n // *faulty_bytes = 1;\n return false;\n }\n i += 3;\n } else if (u8a[i] === 0xF0) /* F0 90..BF 80..BF 80..BF */{\n if (i + 3 < len) /* Expect a 2nd, 3rd 3th byte */{\n if (u8a[i + 1] < 0x90 || u8a[i + 1] > 0xBF) {\n // *message = \"After a first byte of F0, expecting 2nd byte between 90 and BF.\";\n // *faulty_bytes = 2;\n return false;\n }\n if (u8a[i + 2] < 0x80 || u8a[i + 2] > 0xBF) {\n // *message = \"After a first byte of F0, expecting 3rd byte between 80 and BF.\";\n // *faulty_bytes = 3;\n return false;\n }\n if (u8a[i + 3] < 0x80 || u8a[i + 3] > 0xBF) {\n // *message = \"After a first byte of F0, expecting 4th byte between 80 and BF.\";\n // *faulty_bytes = 4;\n return false;\n }\n } else {\n // *message = \"After a first byte of F0, expecting three following bytes.\";\n // *faulty_bytes = 1;\n return false;\n }\n i += 4;\n } else if (u8a[i] >= 0xF1 && u8a[i] <= 0xF3) /* F1..F3 80..BF 80..BF 80..BF */{\n if (i + 3 < len) /* Expect a 2nd, 3rd 3th byte */{\n if (u8a[i + 1] < 0x80 || u8a[i + 1] > 0xBF) {\n // *message = \"After a first byte of F1, F2, or F3, expecting a 2nd byte between 80 and BF.\";\n // *faulty_bytes = 2;\n return false;\n }\n if (u8a[i + 2] < 0x80 || u8a[i + 2] > 0xBF) {\n // *message = \"After a first byte of F1, F2, or F3, expecting a 3rd byte between 80 and BF.\";\n // *faulty_bytes = 3;\n return false;\n }\n if (u8a[i + 3] < 0x80 || u8a[i + 3] > 0xBF) {\n // *message = \"After a first byte of F1, F2, or F3, expecting a 4th byte between 80 and BF.\";\n // *faulty_bytes = 4;\n return false;\n }\n } else {\n // *message = \"After a first byte of F1, F2, or F3, expecting three following bytes.\";\n // *faulty_bytes = 1;\n return false;\n }\n i += 4;\n } else if (u8a[i] === 0xF4) /* F4 80..8F 80..BF 80..BF */{\n if (i + 3 < len) /* Expect a 2nd, 3rd 3th byte */{\n if (u8a[i + 1] < 0x80 || u8a[i + 1] > 0x8F) {\n // *message = \"After a first byte of F4, expecting 2nd byte between 80 and 8F.\";\n // *faulty_bytes = 2;\n return false;\n }\n if (u8a[i + 2] < 0x80 || u8a[i + 2] > 0xBF) {\n // *message = \"After a first byte of F4, expecting 3rd byte between 80 and BF.\";\n // *faulty_bytes = 3;\n return false;\n }\n if (u8a[i + 3] < 0x80 || u8a[i + 3] > 0xBF) {\n // *message = \"After a first byte of F4, expecting 4th byte between 80 and BF.\";\n // *faulty_bytes = 4;\n return false;\n }\n } else {\n // *message = \"After a first byte of F4, expecting three following bytes.\";\n // *faulty_bytes = 1;\n return false;\n }\n i += 4;\n } else {\n // *message = \"Expecting bytes in the following ranges: 00..7F C2..F4.\";\n // *faulty_bytes = 1;\n return false;\n }\n }\n return true;\n}", "// Copyright 2017-2023 @polkadot/types authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name lazyMethod\n * @description\n * Creates a lazy, on-demand getter for the specific value. Upon get the value will be evaluated.\n */\nexport function lazyMethod(result, item, creator, getName, index = 0) {\n const name = getName ? getName(item, index) : item.toString();\n let value;\n Object.defineProperty(result, name, {\n // This allows for re-configuration with the embedded defineProperty below\n // and ensures that on tested browsers and Node, it _will_ be redefined\n // and thus short-circuited for future access\n configurable: true,\n enumerable: true,\n // Use a function here, we don't want to capture the outer this, i.e.\n // don't use arrow functions in this context since we have a this inside\n get: function () {\n // This check should _always_ be false and unneeded, since we override\n // with a value below ... however we ensure we are quire vigilant against\n // all environment failures, so we are rather be safe than sorry\n if (value === undefined) {\n value = creator(item, index, this);\n try {\n // re-define the property as a value, next time around this\n // getter will only return the computed value\n Object.defineProperty(this, name, {\n value\n });\n } catch {\n // ignore any errors, since this _should_ not happen due to\n // the \"configurable\" property above. But if it ever does\n // from here-on we will be the cached value the next time\n // around (with a very slight dip in performance)\n }\n }\n return value;\n }\n });\n}\n\n/**\n * @name lazyMethods\n * @description\n * Creates lazy, on-demand getters for the specific values.\n */\nexport function lazyMethods(result, items, creator, getName) {\n for (let i = 0; i < items.length; i++) {\n lazyMethod(result, items[i], creator, getName, i);\n }\n return result;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { xglobal } from '@polkadot/x-global';\nimport { formatDate } from \"./format/formatDate.js\";\nimport { isBn } from \"./is/bn.js\";\nimport { isBuffer } from \"./is/buffer.js\";\nimport { isFunction } from \"./is/function.js\";\nimport { isObject } from \"./is/object.js\";\nimport { isU8a } from \"./is/u8a.js\";\nimport { u8aToHex } from \"./u8a/toHex.js\";\nimport { u8aToU8a } from \"./u8a/toU8a.js\";\nimport { hasProcess } from \"./has.js\";\nconst logTo = {\n debug: 'log',\n error: 'error',\n log: 'log',\n warn: 'warn'\n};\nfunction formatOther(value) {\n if (value && isObject(value) && value.constructor === Object) {\n const result = {};\n for (const k of Object.keys(value)) {\n result[k] = loggerFormat(value[k]);\n }\n return result;\n }\n return value;\n}\nexport function loggerFormat(value) {\n if (Array.isArray(value)) {\n return value.map(loggerFormat);\n } else if (isBn(value)) {\n return value.toString();\n } else if (isU8a(value) || isBuffer(value)) {\n return u8aToHex(u8aToU8a(value));\n }\n return formatOther(value);\n}\nfunction formatWithLength(maxLength) {\n return v => {\n if (maxLength <= 0) {\n return v;\n }\n const r = `${v}`;\n return r.length < maxLength ? v : `${r.substring(0, maxLength)} ...`;\n };\n}\nfunction apply(log, type, values, maxSize = -1) {\n if (values.length === 1 && isFunction(values[0])) {\n const fnResult = values[0]();\n return apply(log, type, Array.isArray(fnResult) ? fnResult : [fnResult], maxSize);\n }\n console[logTo[log]](formatDate(new Date()), type, ...values.map(loggerFormat).map(formatWithLength(maxSize)));\n}\nfunction noop() {\n // noop\n}\nfunction isDebugOn(e, type) {\n return !!e && (e === '*' || type === e || e.endsWith('*') && type.startsWith(e.slice(0, -1)));\n}\nfunction isDebugOff(e, type) {\n return !!e && e.startsWith('-') && (type === e.slice(1) || e.endsWith('*') && type.startsWith(e.slice(1, -1)));\n}\nfunction getDebugFlag(env, type) {\n let flag = false;\n for (const e of env) {\n if (isDebugOn(e, type)) {\n flag = true;\n } else if (isDebugOff(e, type)) {\n flag = false;\n }\n }\n return flag;\n}\nfunction parseEnv(type) {\n const env = (hasProcess ? xglobal.process : {}).env || {};\n const maxSize = parseInt(env.DEBUG_MAX || '-1', 10);\n return [getDebugFlag((env.DEBUG || '').toLowerCase().split(','), type), isNaN(maxSize) ? -1 : maxSize];\n}\n\n/**\n * @name Logger\n * @summary Creates a consistent log interface for messages\n * @description\n * Returns a `Logger` that has `.log`, `.error`, `.warn` and `.debug` (controlled with environment `DEBUG=typeA,typeB`) methods. Logging is done with a consistent prefix (type of logger, date) followed by the actual message using the underlying console.\n * @example\n *
\n *\n * ```javascript\n * import { logger } from '@polkadot/util';\n *\n * const l = logger('test');\n * ```\n */\nexport function logger(_type) {\n const type = `${_type.toUpperCase()}:`.padStart(16);\n const [isDebug, maxSize] = parseEnv(_type.toLowerCase());\n return {\n debug: isDebug ? (...values) => apply('debug', type, values, maxSize) : noop,\n error: (...values) => apply('error', type, values),\n log: (...values) => apply('log', type, values),\n noop,\n warn: (...values) => apply('warn', type, values)\n };\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { stringify } from \"./stringify.js\";\nfunction defaultGetId() {\n return 'none';\n}\n\n/**\n * @name memoize\n * @description Memomize the function with a specific instanceId\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function memoize(fn, {\n getInstanceId = defaultGetId\n} = {}) {\n const cache = {};\n const memoized = (...args) => {\n const stringParams = stringify(args);\n const instanceId = getInstanceId();\n if (!cache[instanceId]) {\n cache[instanceId] = {};\n }\n if (cache[instanceId][stringParams] === undefined) {\n cache[instanceId][stringParams] = fn(...args);\n }\n return cache[instanceId][stringParams];\n };\n memoized.unmemoize = (...args) => {\n const stringParams = stringify(args);\n const instanceId = getInstanceId();\n if (cache[instanceId] && cache[instanceId][stringParams] !== undefined) {\n delete cache[instanceId][stringParams];\n }\n };\n return memoized;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name nextTick\n * @description Defer the operation to the queue for evaluation on the next tick\n */\nexport function nextTick(onExec, onError) {\n // While Promise.resolve().then(...) would defer to the nextTick, this\n // actually does not play as nicely in browsers like the setTimeout(...)\n // approach. So the safer, though less optimal approach is the one taken here\n setTimeout(() => {\n Promise.resolve().then(() => {\n onExec();\n }).catch(error => {\n if (onError) {\n onError(error);\n } else {\n console.error(error);\n }\n });\n }, 0);\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name objectClear\n * @summary Removes all the keys from the input object\n */\nexport function objectClear(value) {\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i++) {\n delete value[keys[i]];\n }\n return value;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name objectSpread\n * @summary Concats all sources into the destination\n */\nexport function objectSpread(dest, ...sources) {\n for (let i = 0; i < sources.length; i++) {\n const src = sources[i];\n if (src) {\n if (typeof src.entries === 'function') {\n for (const [key, value] of src.entries()) {\n dest[key] = value;\n }\n } else {\n Object.assign(dest, src);\n }\n }\n }\n return dest;\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name objectProperty\n * @summary Assign a get property on the input object\n */\nexport function objectProperty(that, key, getter, getName, index = 0) {\n const name = getName ? getName(key, index) : key;\n\n // There are 3 approaches here -\n // - Object.prototype.hasOwnProperty.call(that, key) - this only checks the current class, i.e\n // will retuirn false if the property is set in the parent class\n // - isUndefined(...) - this may yield a false positive when the property is there, but not set.\n // Additionally, on pre-defined getters it may make a call\n // - key in that - Does not need to be combined with either of the above and checks the full chain\n if (!(name in that)) {\n Object.defineProperty(that, name, {\n enumerable: true,\n // Unlike in lazy, we always call into the upper function, i.e. this method\n // does not cache old values (it is expected to be used for dynamic values)\n get: function () {\n return getter(key, index, this);\n }\n });\n }\n}\n\n/**\n * @name objectProperties\n * @summary Assign get properties on the input object\n */\nexport function objectProperties(that, keys, getter, getName) {\n for (let i = 0; i < keys.length; i++) {\n objectProperty(that, keys[i], getter, getName, i);\n }\n}", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport const CC_TO_UP = new Array(256);\nexport const CC_TO_LO = new Array(256);\nfor (let i = 0; i < CC_TO_UP.length; i++) {\n CC_TO_LO[i] = String.fromCharCode(i).toLowerCase();\n CC_TO_UP[i] = String.fromCharCode(i).toUpperCase();\n}\n\n/** @internal */\nfunction formatAllCaps(w) {\n return w.slice(0, w.length - 1).toLowerCase() + CC_TO_UP[w.charCodeAt(w.length - 1)];\n}\n\n/**\n * @internal\n *\n * Inspired by https://stackoverflow.com/a/2970667\n *\n * This is not as optimal as the original SO answer (we split into per-word),\n * however it does pass the tests (which the SO version doesn't) and is still\n * a major improvement over the original camelcase npm package -\n *\n * camelcase: 20.88 \u03BCs/op\n * this: 1.00 \u03BCs/op\n *\n * Caveat of this: only Ascii, but acceptable for the intended usecase\n */\nfunction converter(format) {\n return value => {\n const parts = value\n // replace all separators (including consequtive) with spaces\n .replace(/[-_., ]+/g, ' ')\n // we don't want leading or trailing spaces\n .trim()\n // split into words\n .split(' ');\n const count = parts.length;\n let result = '';\n for (let i = 0; i < count; i++) {\n const w = parts[i];\n\n // apply the formatting\n result += format(/^[\\dA-Z]+$/.test(w)\n // all full uppercase + letters are changed to lowercase\n ? w.toLowerCase()\n // all consecutive capitals + letters are changed to lowercase\n // e.g. UUID64 -> uuid64, while preserving splits, eg. NFTOrder -> nftOrder\n : w.replace(/^[\\dA-Z]{2,}[^a-z]/, formatAllCaps), i);\n }\n return result;\n };\n}\n\n/**\n * @name stringCamelCase\n * @summary Convert a dash/dot/underscore/space separated Ascii string/String to camelCase\n */\nexport const stringCamelCase = /*#__PURE__*/converter((w, i) =>\n// lowercase for first letter/first word, else uppercase first, rest unchanged\n(i ? CC_TO_UP[w.charCodeAt(0)] : CC_TO_LO[w.charCodeAt(0)]) + w.slice(1));\n\n/**\n * @name stringPascalCase\n * @summary Convert a dash/dot/underscore/space separated Ascii string/String to PascalCase\n */\nexport const stringPascalCase = /*#__PURE__*/converter(w =>\n// uppercase the first character, leave the rest unchanged\nCC_TO_UP[w.charCodeAt(0)] + w.slice(1));", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { CC_TO_LO, CC_TO_UP } from \"./camelCase.js\";\n\n/** @internal */\nfunction converter(map) {\n return value => value ? map[value.charCodeAt(0)] + value.slice(1) : '';\n}\n\n/**\n * @name stringLowerFirst\n * @summary Lowercase the first letter of a string\n * @description\n * Lowercase the first letter of a string\n * @example\n *
\n *\n * ```javascript\n * import { stringLowerFirst } from '@polkadot/util';\n *\n * stringLowerFirst('ABC'); // => 'aBC'\n * ```\n */\nexport const stringLowerFirst = /*#__PURE__*/converter(CC_TO_LO);\n\n/**\n * @name stringUpperFirst\n * @summary Uppercase the first letter of a string\n * @description\n * Lowercase the first letter of a string\n * @example\n *
\n *\n * ```javascript\n * import { stringUpperFirst } from '@polkadot/util';\n *\n * stringUpperFirst('abc'); // => 'Abc'\n * ```\n */\nexport const stringUpperFirst = /*#__PURE__*/converter(CC_TO_UP);", "// Copyright 2017-2023 @polkadot/util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aToHex } from \"../u8a/toHex.js\";\nimport { stringToU8a } from \"./toU8a.js\";\n\n/**\n * @name stringToHex\n * @summary Creates a hex string from a utf-8 string\n * @description\n * String input values return the actual encoded hex value.\n * @example\n *
\n *\n * ```javascript\n * import { stringToHex } from '@polkadot/util';\n *\n * stringToU8a('hello'); // 0x68656c6c6f\n * ```\n */\nexport function stringToHex(value) {\n return u8aToHex(stringToU8a(value));\n}", "// Copyright 2017-2023 @polkadot/api authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// Do not edit, auto-generated by @polkadot/dev\n\nexport const packageInfo = {\n name: '@polkadot/api',\n path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',\n type: 'esm',\n version: '9.14.2'\n};", "// Copyright 2017-2023 @polkadot/x-global authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport { packageInfo } from \"./packageInfo.js\";\n\n// Ensure that we are able to run this without any @types/node definitions\n// and without having lib: ['dom'] in our TypeScript configuration\n// (may not be available in all environments, e.g. Deno springs to mind)\n\nfunction evaluateThis(fn) {\n return fn('return this');\n}\nexport const xglobal = typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : evaluateThis(Function);\nexport function extractGlobal(name, fallback) {\n // Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea\n // (as of now) as to why this looks like an \"any\" when we do cast it to a T\n //\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof xglobal[name] === 'undefined' ? fallback : xglobal[name];\n}\nexport function exposeGlobal(name, fallback) {\n if (typeof xglobal[name] === 'undefined') {\n xglobal[name] = fallback;\n }\n}", "// Copyright 2017-2023 @polkadot/x-randomvalues authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { xglobal } from '@polkadot/x-global';\nexport { packageInfo } from \"./packageInfo.js\";\nexport function getRandomValues(arr) {\n // We use x-global here - this prevents packagers such as rollup\n // confusing this with the \"normal\" Node.js import and stubbing it\n // (and also aligns with eg. x-fetch, where x-global is used)\n return xglobal.crypto.getRandomValues(arr);\n}", "// Copyright 2017-2023 @polkadot/x-global authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport { packageInfo } from \"./packageInfo.js\";\n\n// Ensure that we are able to run this without any @types/node definitions\n// and without having lib: ['dom'] in our TypeScript configuration\n// (may not be available in all environments, e.g. Deno springs to mind)\n\nfunction evaluateThis(fn) {\n return fn('return this');\n}\nexport const xglobal = typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : evaluateThis(Function);\nexport function extractGlobal(name, fallback) {\n // Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea\n // (as of now) as to why this looks like an \"any\" when we do cast it to a T\n //\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof xglobal[name] === 'undefined' ? fallback : xglobal[name];\n}\nexport function exposeGlobal(name, fallback) {\n if (typeof xglobal[name] === 'undefined') {\n xglobal[name] = fallback;\n }\n}", "// Copyright 2017-2023 @polkadot/x-bigint authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { xglobal } from '@polkadot/x-global';\nexport { packageInfo } from \"./packageInfo.js\";\nexport const BigInt = typeof xglobal.BigInt === 'function' && typeof xglobal.BigInt.asIntN === 'function' ? xglobal.BigInt : () => Number.NaN;", "/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */\nimport * as nodeCrypto from 'crypto';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _3n = BigInt(3);\nconst _8n = BigInt(8);\nconst CURVE = Object.freeze({\n a: _0n,\n b: BigInt(7),\n P: BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f'),\n n: BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141'),\n h: _1n,\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n});\nconst divNearest = (a, b) => (a + b / _2n) / b;\nconst endo = {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar(k) {\n const { n } = CURVE;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000');\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalarEndo: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n};\nconst fieldLen = 32;\nconst groupLen = 32;\nconst hashLen = 32;\nconst compressedLen = fieldLen + 1;\nconst uncompressedLen = 2 * fieldLen + 1;\nexport { CURVE };\nfunction weierstrass(x) {\n const { a, b } = CURVE;\n const x2 = mod(x * x);\n const x3 = mod(x2 * x);\n return mod(x3 + a * x + b);\n}\nconst USE_ENDOMORPHISM = CURVE.a === _0n;\nclass ShaError extends Error {\n constructor(message) {\n super(message);\n }\n}\nfunction assertJacPoint(other) {\n if (!(other instanceof JacobianPoint))\n throw new TypeError('JacobianPoint expected');\n}\nclass JacobianPoint {\n constructor(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n static fromAffine(p) {\n if (!(p instanceof Point)) {\n throw new TypeError('JacobianPoint#fromAffine: expected Point');\n }\n if (p.equals(Point.ZERO))\n return JacobianPoint.ZERO;\n return new JacobianPoint(p.x, p.y, _1n);\n }\n static toAffineBatch(points) {\n const toInv = invertBatch(points.map((p) => p.z));\n return points.map((p, i) => p.toAffine(toInv[i]));\n }\n static normalizeZ(points) {\n return JacobianPoint.toAffineBatch(points).map(JacobianPoint.fromAffine);\n }\n equals(other) {\n assertJacPoint(other);\n const { x: X1, y: Y1, z: Z1 } = this;\n const { x: X2, y: Y2, z: Z2 } = other;\n const Z1Z1 = mod(Z1 * Z1);\n const Z2Z2 = mod(Z2 * Z2);\n const U1 = mod(X1 * Z2Z2);\n const U2 = mod(X2 * Z1Z1);\n const S1 = mod(mod(Y1 * Z2) * Z2Z2);\n const S2 = mod(mod(Y2 * Z1) * Z1Z1);\n return U1 === U2 && S1 === S2;\n }\n negate() {\n return new JacobianPoint(this.x, mod(-this.y), this.z);\n }\n double() {\n const { x: X1, y: Y1, z: Z1 } = this;\n const A = mod(X1 * X1);\n const B = mod(Y1 * Y1);\n const C = mod(B * B);\n const x1b = X1 + B;\n const D = mod(_2n * (mod(x1b * x1b) - A - C));\n const E = mod(_3n * A);\n const F = mod(E * E);\n const X3 = mod(F - _2n * D);\n const Y3 = mod(E * (D - X3) - _8n * C);\n const Z3 = mod(_2n * Y1 * Z1);\n return new JacobianPoint(X3, Y3, Z3);\n }\n add(other) {\n assertJacPoint(other);\n const { x: X1, y: Y1, z: Z1 } = this;\n const { x: X2, y: Y2, z: Z2 } = other;\n if (X2 === _0n || Y2 === _0n)\n return this;\n if (X1 === _0n || Y1 === _0n)\n return other;\n const Z1Z1 = mod(Z1 * Z1);\n const Z2Z2 = mod(Z2 * Z2);\n const U1 = mod(X1 * Z2Z2);\n const U2 = mod(X2 * Z1Z1);\n const S1 = mod(mod(Y1 * Z2) * Z2Z2);\n const S2 = mod(mod(Y2 * Z1) * Z1Z1);\n const H = mod(U2 - U1);\n const r = mod(S2 - S1);\n if (H === _0n) {\n if (r === _0n) {\n return this.double();\n }\n else {\n return JacobianPoint.ZERO;\n }\n }\n const HH = mod(H * H);\n const HHH = mod(H * HH);\n const V = mod(U1 * HH);\n const X3 = mod(r * r - HHH - _2n * V);\n const Y3 = mod(r * (V - X3) - S1 * HHH);\n const Z3 = mod(Z1 * Z2 * H);\n return new JacobianPoint(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n multiplyUnsafe(scalar) {\n const P0 = JacobianPoint.ZERO;\n if (typeof scalar === 'bigint' && scalar === _0n)\n return P0;\n let n = normalizeScalar(scalar);\n if (n === _1n)\n return this;\n if (!USE_ENDOMORPHISM) {\n let p = P0;\n let d = this;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n }\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = P0;\n let k2p = P0;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new JacobianPoint(mod(k2p.x * endo.beta), k2p.y, k2p.z);\n return k1p.add(k2p);\n }\n precomputeWindow(W) {\n const windows = USE_ENDOMORPHISM ? 128 / W + 1 : 256 / W + 1;\n const points = [];\n let p = this;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n for (let i = 1; i < 2 ** (W - 1); i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n }\n wNAF(n, affinePoint) {\n if (!affinePoint && this.equals(JacobianPoint.BASE))\n affinePoint = Point.BASE;\n const W = (affinePoint && affinePoint._WINDOW_SIZE) || 1;\n if (256 % W) {\n throw new Error('Point#wNAF: Invalid precomputation window, must be power of 2');\n }\n let precomputes = affinePoint && pointPrecomputes.get(affinePoint);\n if (!precomputes) {\n precomputes = this.precomputeWindow(W);\n if (affinePoint && W !== 1) {\n precomputes = JacobianPoint.normalizeZ(precomputes);\n pointPrecomputes.set(affinePoint, precomputes);\n }\n }\n let p = JacobianPoint.ZERO;\n let f = JacobianPoint.BASE;\n const windows = 1 + (USE_ENDOMORPHISM ? 128 / W : 256 / W);\n const windowSize = 2 ** (W - 1);\n const mask = BigInt(2 ** W - 1);\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n let wbits = Number(n & mask);\n n >>= shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1;\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n return { p, f };\n }\n multiply(scalar, affinePoint) {\n let n = normalizeScalar(scalar);\n let point;\n let fake;\n if (USE_ENDOMORPHISM) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1, affinePoint);\n let { p: k2p, f: f2p } = this.wNAF(k2, affinePoint);\n k1p = constTimeNegate(k1neg, k1p);\n k2p = constTimeNegate(k2neg, k2p);\n k2p = new JacobianPoint(mod(k2p.x * endo.beta), k2p.y, k2p.z);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n, affinePoint);\n point = p;\n fake = f;\n }\n return JacobianPoint.normalizeZ([point, fake])[0];\n }\n toAffine(invZ) {\n const { x, y, z } = this;\n const is0 = this.equals(JacobianPoint.ZERO);\n if (invZ == null)\n invZ = is0 ? _8n : invert(z);\n const iz1 = invZ;\n const iz2 = mod(iz1 * iz1);\n const iz3 = mod(iz2 * iz1);\n const ax = mod(x * iz2);\n const ay = mod(y * iz3);\n const zz = mod(z * iz1);\n if (is0)\n return Point.ZERO;\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return new Point(ax, ay);\n }\n}\nJacobianPoint.BASE = new JacobianPoint(CURVE.Gx, CURVE.Gy, _1n);\nJacobianPoint.ZERO = new JacobianPoint(_0n, _1n, _0n);\nfunction constTimeNegate(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n}\nconst pointPrecomputes = new WeakMap();\nexport class Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n hasEvenY() {\n return this.y % _2n === _0n;\n }\n static fromCompressedHex(bytes) {\n const isShort = bytes.length === 32;\n const x = bytesToNumber(isShort ? bytes : bytes.subarray(1));\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrass(x);\n let y = sqrtMod(y2);\n const isYOdd = (y & _1n) === _1n;\n if (isShort) {\n if (isYOdd)\n y = mod(-y);\n }\n else {\n const isFirstByteOdd = (bytes[0] & 1) === 1;\n if (isFirstByteOdd !== isYOdd)\n y = mod(-y);\n }\n const point = new Point(x, y);\n point.assertValidity();\n return point;\n }\n static fromUncompressedHex(bytes) {\n const x = bytesToNumber(bytes.subarray(1, fieldLen + 1));\n const y = bytesToNumber(bytes.subarray(fieldLen + 1, fieldLen * 2 + 1));\n const point = new Point(x, y);\n point.assertValidity();\n return point;\n }\n static fromHex(hex) {\n const bytes = ensureBytes(hex);\n const len = bytes.length;\n const header = bytes[0];\n if (len === fieldLen)\n return this.fromCompressedHex(bytes);\n if (len === compressedLen && (header === 0x02 || header === 0x03)) {\n return this.fromCompressedHex(bytes);\n }\n if (len === uncompressedLen && header === 0x04)\n return this.fromUncompressedHex(bytes);\n throw new Error(`Point.fromHex: received invalid point. Expected 32-${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes, not ${len}`);\n }\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normalizePrivateKey(privateKey));\n }\n static fromSignature(msgHash, signature, recovery) {\n const { r, s } = normalizeSignature(signature);\n if (![0, 1, 2, 3].includes(recovery))\n throw new Error('Cannot recover: invalid recovery bit');\n const h = truncateHash(ensureBytes(msgHash));\n const { n } = CURVE;\n const radj = recovery === 2 || recovery === 3 ? r + n : r;\n const rinv = invert(radj, n);\n const u1 = mod(-h * rinv, n);\n const u2 = mod(s * rinv, n);\n const prefix = recovery & 1 ? '03' : '02';\n const R = Point.fromHex(prefix + numTo32bStr(radj));\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2);\n if (!Q)\n throw new Error('Cannot recover signature: point at infinify');\n Q.assertValidity();\n return Q;\n }\n toRawBytes(isCompressed = false) {\n return hexToBytes(this.toHex(isCompressed));\n }\n toHex(isCompressed = false) {\n const x = numTo32bStr(this.x);\n if (isCompressed) {\n const prefix = this.hasEvenY() ? '02' : '03';\n return `${prefix}${x}`;\n }\n else {\n return `04${x}${numTo32bStr(this.y)}`;\n }\n }\n toHexX() {\n return this.toHex(true).slice(2);\n }\n toRawX() {\n return this.toRawBytes(true).slice(1);\n }\n assertValidity() {\n const msg = 'Point is not on elliptic curve';\n const { x, y } = this;\n if (!isValidFieldElement(x) || !isValidFieldElement(y))\n throw new Error(msg);\n const left = mod(y * y);\n const right = weierstrass(x);\n if (mod(left - right) !== _0n)\n throw new Error(msg);\n }\n equals(other) {\n return this.x === other.x && this.y === other.y;\n }\n negate() {\n return new Point(this.x, mod(-this.y));\n }\n double() {\n return JacobianPoint.fromAffine(this).double().toAffine();\n }\n add(other) {\n return JacobianPoint.fromAffine(this).add(JacobianPoint.fromAffine(other)).toAffine();\n }\n subtract(other) {\n return this.add(other.negate());\n }\n multiply(scalar) {\n return JacobianPoint.fromAffine(this).multiply(scalar, this).toAffine();\n }\n multiplyAndAddUnsafe(Q, a, b) {\n const P = JacobianPoint.fromAffine(this);\n const aP = a === _0n || a === _1n || this !== Point.BASE ? P.multiplyUnsafe(a) : P.multiply(a);\n const bQ = JacobianPoint.fromAffine(Q).multiplyUnsafe(b);\n const sum = aP.add(bQ);\n return sum.equals(JacobianPoint.ZERO) ? undefined : sum.toAffine();\n }\n}\nPoint.BASE = new Point(CURVE.Gx, CURVE.Gy);\nPoint.ZERO = new Point(_0n, _0n);\nfunction sliceDER(s) {\n return Number.parseInt(s[0], 16) >= 8 ? '00' + s : s;\n}\nfunction parseDERInt(data) {\n if (data.length < 2 || data[0] !== 0x02) {\n throw new Error(`Invalid signature integer tag: ${bytesToHex(data)}`);\n }\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len) {\n throw new Error(`Invalid signature integer: wrong length`);\n }\n if (res[0] === 0x00 && res[1] <= 0x7f) {\n throw new Error('Invalid signature integer: trailing length');\n }\n return { data: bytesToNumber(res), left: data.subarray(len + 2) };\n}\nfunction parseDERSignature(data) {\n if (data.length < 2 || data[0] != 0x30) {\n throw new Error(`Invalid signature tag: ${bytesToHex(data)}`);\n }\n if (data[1] !== data.length - 2) {\n throw new Error('Invalid signature: incorrect length');\n }\n const { data: r, left: sBytes } = parseDERInt(data.subarray(2));\n const { data: s, left: rBytesLeft } = parseDERInt(sBytes);\n if (rBytesLeft.length) {\n throw new Error(`Invalid signature: left bytes after parsing: ${bytesToHex(rBytesLeft)}`);\n }\n return { r, s };\n}\nexport class Signature {\n constructor(r, s) {\n this.r = r;\n this.s = s;\n this.assertValidity();\n }\n static fromCompact(hex) {\n const arr = hex instanceof Uint8Array;\n const name = 'Signature.fromCompact';\n if (typeof hex !== 'string' && !arr)\n throw new TypeError(`${name}: Expected string or Uint8Array`);\n const str = arr ? bytesToHex(hex) : hex;\n if (str.length !== 128)\n throw new Error(`${name}: Expected 64-byte hex`);\n return new Signature(hexToNumber(str.slice(0, 64)), hexToNumber(str.slice(64, 128)));\n }\n static fromDER(hex) {\n const arr = hex instanceof Uint8Array;\n if (typeof hex !== 'string' && !arr)\n throw new TypeError(`Signature.fromDER: Expected string or Uint8Array`);\n const { r, s } = parseDERSignature(arr ? hex : hexToBytes(hex));\n return new Signature(r, s);\n }\n static fromHex(hex) {\n return this.fromDER(hex);\n }\n assertValidity() {\n const { r, s } = this;\n if (!isWithinCurveOrder(r))\n throw new Error('Invalid Signature: r must be 0 < r < n');\n if (!isWithinCurveOrder(s))\n throw new Error('Invalid Signature: s must be 0 < s < n');\n }\n hasHighS() {\n const HALF = CURVE.n >> _1n;\n return this.s > HALF;\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, mod(-this.s, CURVE.n)) : this;\n }\n toDERRawBytes() {\n return hexToBytes(this.toDERHex());\n }\n toDERHex() {\n const sHex = sliceDER(numberToHexUnpadded(this.s));\n const rHex = sliceDER(numberToHexUnpadded(this.r));\n const sHexL = sHex.length / 2;\n const rHexL = rHex.length / 2;\n const sLen = numberToHexUnpadded(sHexL);\n const rLen = numberToHexUnpadded(rHexL);\n const length = numberToHexUnpadded(rHexL + sHexL + 4);\n return `30${length}02${rLen}${rHex}02${sLen}${sHex}`;\n }\n toRawBytes() {\n return this.toDERRawBytes();\n }\n toHex() {\n return this.toDERHex();\n }\n toCompactRawBytes() {\n return hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numTo32bStr(this.r) + numTo32bStr(this.s);\n }\n}\nfunction concatBytes(...arrays) {\n if (!arrays.every((b) => b instanceof Uint8Array))\n throw new Error('Uint8Array list expected');\n if (arrays.length === 1)\n return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\nfunction bytesToHex(uint8a) {\n if (!(uint8a instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\nconst POW_2_256 = BigInt('0x10000000000000000000000000000000000000000000000000000000000000000');\nfunction numTo32bStr(num) {\n if (typeof num !== 'bigint')\n throw new Error('Expected bigint');\n if (!(_0n <= num && num < POW_2_256))\n throw new Error('Expected number 0 <= n < 2^256');\n return num.toString(16).padStart(64, '0');\n}\nfunction numTo32b(num) {\n const b = hexToBytes(numTo32bStr(num));\n if (b.length !== 32)\n throw new Error('Error: expected 32 bytes');\n return b;\n}\nfunction numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nfunction hexToNumber(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToNumber: expected string, got ' + typeof hex);\n }\n return BigInt(`0x${hex}`);\n}\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2)\n throw new Error('hexToBytes: received invalid unpadded hex' + hex.length);\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\nfunction bytesToNumber(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nfunction ensureBytes(hex) {\n return hex instanceof Uint8Array ? Uint8Array.from(hex) : hexToBytes(hex);\n}\nfunction normalizeScalar(num) {\n if (typeof num === 'number' && Number.isSafeInteger(num) && num > 0)\n return BigInt(num);\n if (typeof num === 'bigint' && isWithinCurveOrder(num))\n return num;\n throw new TypeError('Expected valid private scalar: 0 < scalar < curve.n');\n}\nfunction mod(a, b = CURVE.P) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\nfunction pow2(x, power) {\n const { P } = CURVE;\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= P;\n }\n return res;\n}\nfunction sqrtMod(x) {\n const { P } = CURVE;\n const _6n = BigInt(6);\n const _11n = BigInt(11);\n const _22n = BigInt(22);\n const _23n = BigInt(23);\n const _44n = BigInt(44);\n const _88n = BigInt(88);\n const b2 = (x * x * x) % P;\n const b3 = (b2 * b2 * x) % P;\n const b6 = (pow2(b3, _3n) * b3) % P;\n const b9 = (pow2(b6, _3n) * b3) % P;\n const b11 = (pow2(b9, _2n) * b2) % P;\n const b22 = (pow2(b11, _11n) * b11) % P;\n const b44 = (pow2(b22, _22n) * b22) % P;\n const b88 = (pow2(b44, _44n) * b44) % P;\n const b176 = (pow2(b88, _88n) * b88) % P;\n const b220 = (pow2(b176, _44n) * b44) % P;\n const b223 = (pow2(b220, _3n) * b3) % P;\n const t1 = (pow2(b223, _23n) * b22) % P;\n const t2 = (pow2(t1, _6n) * b2) % P;\n const rt = pow2(t2, _2n);\n const xc = (rt * rt) % P;\n if (xc !== x)\n throw new Error('Cannot find square root');\n return rt;\n}\nfunction invert(number, modulo = CURVE.P) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n let a = mod(number, modulo);\n let b = modulo;\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\nfunction invertBatch(nums, p = CURVE.P) {\n const scratch = new Array(nums.length);\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (num === _0n)\n return acc;\n scratch[i] = acc;\n return mod(acc * num, p);\n }, _1n);\n const inverted = invert(lastMultiplied, p);\n nums.reduceRight((acc, num, i) => {\n if (num === _0n)\n return acc;\n scratch[i] = mod(acc * scratch[i], p);\n return mod(acc * num, p);\n }, inverted);\n return scratch;\n}\nfunction bits2int_2(bytes) {\n const delta = bytes.length * 8 - groupLen * 8;\n const num = bytesToNumber(bytes);\n return delta > 0 ? num >> BigInt(delta) : num;\n}\nfunction truncateHash(hash, truncateOnly = false) {\n const h = bits2int_2(hash);\n if (truncateOnly)\n return h;\n const { n } = CURVE;\n return h >= n ? h - n : h;\n}\nlet _sha256Sync;\nlet _hmacSha256Sync;\nclass HmacDrbg {\n constructor(hashLen, qByteLen) {\n this.hashLen = hashLen;\n this.qByteLen = qByteLen;\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n this.v = new Uint8Array(hashLen).fill(1);\n this.k = new Uint8Array(hashLen).fill(0);\n this.counter = 0;\n }\n hmac(...values) {\n return utils.hmacSha256(this.k, ...values);\n }\n hmacSync(...values) {\n return _hmacSha256Sync(this.k, ...values);\n }\n checkSync() {\n if (typeof _hmacSha256Sync !== 'function')\n throw new ShaError('hmacSha256Sync needs to be set');\n }\n incr() {\n if (this.counter >= 1000)\n throw new Error('Tried 1,000 k values for sign(), all were invalid');\n this.counter += 1;\n }\n async reseed(seed = new Uint8Array()) {\n this.k = await this.hmac(this.v, Uint8Array.from([0x00]), seed);\n this.v = await this.hmac(this.v);\n if (seed.length === 0)\n return;\n this.k = await this.hmac(this.v, Uint8Array.from([0x01]), seed);\n this.v = await this.hmac(this.v);\n }\n reseedSync(seed = new Uint8Array()) {\n this.checkSync();\n this.k = this.hmacSync(this.v, Uint8Array.from([0x00]), seed);\n this.v = this.hmacSync(this.v);\n if (seed.length === 0)\n return;\n this.k = this.hmacSync(this.v, Uint8Array.from([0x01]), seed);\n this.v = this.hmacSync(this.v);\n }\n async generate() {\n this.incr();\n let len = 0;\n const out = [];\n while (len < this.qByteLen) {\n this.v = await this.hmac(this.v);\n const sl = this.v.slice();\n out.push(sl);\n len += this.v.length;\n }\n return concatBytes(...out);\n }\n generateSync() {\n this.checkSync();\n this.incr();\n let len = 0;\n const out = [];\n while (len < this.qByteLen) {\n this.v = this.hmacSync(this.v);\n const sl = this.v.slice();\n out.push(sl);\n len += this.v.length;\n }\n return concatBytes(...out);\n }\n}\nfunction isWithinCurveOrder(num) {\n return _0n < num && num < CURVE.n;\n}\nfunction isValidFieldElement(num) {\n return _0n < num && num < CURVE.P;\n}\nfunction kmdToSig(kBytes, m, d, lowS = true) {\n const { n } = CURVE;\n const k = truncateHash(kBytes, true);\n if (!isWithinCurveOrder(k))\n return;\n const kinv = invert(k, n);\n const q = Point.BASE.multiply(k);\n const r = mod(q.x, n);\n if (r === _0n)\n return;\n const s = mod(kinv * mod(m + d * r, n), n);\n if (s === _0n)\n return;\n let sig = new Signature(r, s);\n let recovery = (q.x === sig.r ? 0 : 2) | Number(q.y & _1n);\n if (lowS && sig.hasHighS()) {\n sig = sig.normalizeS();\n recovery ^= 1;\n }\n return { sig, recovery };\n}\nfunction normalizePrivateKey(key) {\n let num;\n if (typeof key === 'bigint') {\n num = key;\n }\n else if (typeof key === 'number' && Number.isSafeInteger(key) && key > 0) {\n num = BigInt(key);\n }\n else if (typeof key === 'string') {\n if (key.length !== 2 * groupLen)\n throw new Error('Expected 32 bytes of private key');\n num = hexToNumber(key);\n }\n else if (key instanceof Uint8Array) {\n if (key.length !== groupLen)\n throw new Error('Expected 32 bytes of private key');\n num = bytesToNumber(key);\n }\n else {\n throw new TypeError('Expected valid private key');\n }\n if (!isWithinCurveOrder(num))\n throw new Error('Expected private key: 0 < key < n');\n return num;\n}\nfunction normalizePublicKey(publicKey) {\n if (publicKey instanceof Point) {\n publicKey.assertValidity();\n return publicKey;\n }\n else {\n return Point.fromHex(publicKey);\n }\n}\nfunction normalizeSignature(signature) {\n if (signature instanceof Signature) {\n signature.assertValidity();\n return signature;\n }\n try {\n return Signature.fromDER(signature);\n }\n catch (error) {\n return Signature.fromCompact(signature);\n }\n}\nexport function getPublicKey(privateKey, isCompressed = false) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n}\nexport function recoverPublicKey(msgHash, signature, recovery, isCompressed = false) {\n return Point.fromSignature(msgHash, signature, recovery).toRawBytes(isCompressed);\n}\nfunction isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === compressedLen * 2 || len === uncompressedLen * 2;\n if (item instanceof Point)\n return true;\n return false;\n}\nexport function getSharedSecret(privateA, publicB, isCompressed = false) {\n if (isProbPub(privateA))\n throw new TypeError('getSharedSecret: first arg must be private key');\n if (!isProbPub(publicB))\n throw new TypeError('getSharedSecret: second arg must be public key');\n const b = normalizePublicKey(publicB);\n b.assertValidity();\n return b.multiply(normalizePrivateKey(privateA)).toRawBytes(isCompressed);\n}\nfunction bits2int(bytes) {\n const slice = bytes.length > fieldLen ? bytes.slice(0, fieldLen) : bytes;\n return bytesToNumber(slice);\n}\nfunction bits2octets(bytes) {\n const z1 = bits2int(bytes);\n const z2 = mod(z1, CURVE.n);\n return int2octets(z2 < _0n ? z1 : z2);\n}\nfunction int2octets(num) {\n return numTo32b(num);\n}\nfunction initSigArgs(msgHash, privateKey, extraEntropy) {\n if (msgHash == null)\n throw new Error(`sign: expected valid message hash, not \"${msgHash}\"`);\n const h1 = ensureBytes(msgHash);\n const d = normalizePrivateKey(privateKey);\n const seedArgs = [int2octets(d), bits2octets(h1)];\n if (extraEntropy != null) {\n if (extraEntropy === true)\n extraEntropy = utils.randomBytes(fieldLen);\n const e = ensureBytes(extraEntropy);\n if (e.length !== fieldLen)\n throw new Error(`sign: Expected ${fieldLen} bytes of extra data`);\n seedArgs.push(e);\n }\n const seed = concatBytes(...seedArgs);\n const m = bits2int(h1);\n return { seed, m, d };\n}\nfunction finalizeSig(recSig, opts) {\n const { sig, recovery } = recSig;\n const { der, recovered } = Object.assign({ canonical: true, der: true }, opts);\n const hashed = der ? sig.toDERRawBytes() : sig.toCompactRawBytes();\n return recovered ? [hashed, recovery] : hashed;\n}\nasync function sign(msgHash, privKey, opts = {}) {\n const { seed, m, d } = initSigArgs(msgHash, privKey, opts.extraEntropy);\n const drbg = new HmacDrbg(hashLen, groupLen);\n await drbg.reseed(seed);\n let sig;\n while (!(sig = kmdToSig(await drbg.generate(), m, d, opts.canonical)))\n await drbg.reseed();\n return finalizeSig(sig, opts);\n}\nfunction signSync(msgHash, privKey, opts = {}) {\n const { seed, m, d } = initSigArgs(msgHash, privKey, opts.extraEntropy);\n const drbg = new HmacDrbg(hashLen, groupLen);\n drbg.reseedSync(seed);\n let sig;\n while (!(sig = kmdToSig(drbg.generateSync(), m, d, opts.canonical)))\n drbg.reseedSync();\n return finalizeSig(sig, opts);\n}\nexport { sign, signSync };\nconst vopts = { strict: true };\nexport function verify(signature, msgHash, publicKey, opts = vopts) {\n let sig;\n try {\n sig = normalizeSignature(signature);\n msgHash = ensureBytes(msgHash);\n }\n catch (error) {\n return false;\n }\n const { r, s } = sig;\n if (opts.strict && sig.hasHighS())\n return false;\n const h = truncateHash(msgHash);\n let P;\n try {\n P = normalizePublicKey(publicKey);\n }\n catch (error) {\n return false;\n }\n const { n } = CURVE;\n const sinv = invert(s, n);\n const u1 = mod(h * sinv, n);\n const u2 = mod(r * sinv, n);\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2);\n if (!R)\n return false;\n const v = mod(R.x, n);\n return v === r;\n}\nfunction schnorrChallengeFinalize(ch) {\n return mod(bytesToNumber(ch), CURVE.n);\n}\nclass SchnorrSignature {\n constructor(r, s) {\n this.r = r;\n this.s = s;\n this.assertValidity();\n }\n static fromHex(hex) {\n const bytes = ensureBytes(hex);\n if (bytes.length !== 64)\n throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${bytes.length}`);\n const r = bytesToNumber(bytes.subarray(0, 32));\n const s = bytesToNumber(bytes.subarray(32, 64));\n return new SchnorrSignature(r, s);\n }\n assertValidity() {\n const { r, s } = this;\n if (!isValidFieldElement(r) || !isWithinCurveOrder(s))\n throw new Error('Invalid signature');\n }\n toHex() {\n return numTo32bStr(this.r) + numTo32bStr(this.s);\n }\n toRawBytes() {\n return hexToBytes(this.toHex());\n }\n}\nfunction schnorrGetPublicKey(privateKey) {\n return Point.fromPrivateKey(privateKey).toRawX();\n}\nclass InternalSchnorrSignature {\n constructor(message, privateKey, auxRand = utils.randomBytes()) {\n if (message == null)\n throw new TypeError(`sign: Expected valid message, not \"${message}\"`);\n this.m = ensureBytes(message);\n const { x, scalar } = this.getScalar(normalizePrivateKey(privateKey));\n this.px = x;\n this.d = scalar;\n this.rand = ensureBytes(auxRand);\n if (this.rand.length !== 32)\n throw new TypeError('sign: Expected 32 bytes of aux randomness');\n }\n getScalar(priv) {\n const point = Point.fromPrivateKey(priv);\n const scalar = point.hasEvenY() ? priv : CURVE.n - priv;\n return { point, scalar, x: point.toRawX() };\n }\n initNonce(d, t0h) {\n return numTo32b(d ^ bytesToNumber(t0h));\n }\n finalizeNonce(k0h) {\n const k0 = mod(bytesToNumber(k0h), CURVE.n);\n if (k0 === _0n)\n throw new Error('sign: Creation of signature failed. k is zero');\n const { point: R, x: rx, scalar: k } = this.getScalar(k0);\n return { R, rx, k };\n }\n finalizeSig(R, k, e, d) {\n return new SchnorrSignature(R.x, mod(k + e * d, CURVE.n)).toRawBytes();\n }\n error() {\n throw new Error('sign: Invalid signature produced');\n }\n async calc() {\n const { m, d, px, rand } = this;\n const tag = utils.taggedHash;\n const t = this.initNonce(d, await tag(TAGS.aux, rand));\n const { R, rx, k } = this.finalizeNonce(await tag(TAGS.nonce, t, px, m));\n const e = schnorrChallengeFinalize(await tag(TAGS.challenge, rx, px, m));\n const sig = this.finalizeSig(R, k, e, d);\n if (!(await schnorrVerify(sig, m, px)))\n this.error();\n return sig;\n }\n calcSync() {\n const { m, d, px, rand } = this;\n const tag = utils.taggedHashSync;\n const t = this.initNonce(d, tag(TAGS.aux, rand));\n const { R, rx, k } = this.finalizeNonce(tag(TAGS.nonce, t, px, m));\n const e = schnorrChallengeFinalize(tag(TAGS.challenge, rx, px, m));\n const sig = this.finalizeSig(R, k, e, d);\n if (!schnorrVerifySync(sig, m, px))\n this.error();\n return sig;\n }\n}\nasync function schnorrSign(msg, privKey, auxRand) {\n return new InternalSchnorrSignature(msg, privKey, auxRand).calc();\n}\nfunction schnorrSignSync(msg, privKey, auxRand) {\n return new InternalSchnorrSignature(msg, privKey, auxRand).calcSync();\n}\nfunction initSchnorrVerify(signature, message, publicKey) {\n const raw = signature instanceof SchnorrSignature;\n const sig = raw ? signature : SchnorrSignature.fromHex(signature);\n if (raw)\n sig.assertValidity();\n return {\n ...sig,\n m: ensureBytes(message),\n P: normalizePublicKey(publicKey),\n };\n}\nfunction finalizeSchnorrVerify(r, P, s, e) {\n const R = Point.BASE.multiplyAndAddUnsafe(P, normalizePrivateKey(s), mod(-e, CURVE.n));\n if (!R || !R.hasEvenY() || R.x !== r)\n return false;\n return true;\n}\nasync function schnorrVerify(signature, message, publicKey) {\n try {\n const { r, s, m, P } = initSchnorrVerify(signature, message, publicKey);\n const e = schnorrChallengeFinalize(await utils.taggedHash(TAGS.challenge, numTo32b(r), P.toRawX(), m));\n return finalizeSchnorrVerify(r, P, s, e);\n }\n catch (error) {\n return false;\n }\n}\nfunction schnorrVerifySync(signature, message, publicKey) {\n try {\n const { r, s, m, P } = initSchnorrVerify(signature, message, publicKey);\n const e = schnorrChallengeFinalize(utils.taggedHashSync(TAGS.challenge, numTo32b(r), P.toRawX(), m));\n return finalizeSchnorrVerify(r, P, s, e);\n }\n catch (error) {\n if (error instanceof ShaError)\n throw error;\n return false;\n }\n}\nexport const schnorr = {\n Signature: SchnorrSignature,\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n signSync: schnorrSignSync,\n verifySync: schnorrVerifySync,\n};\nPoint.BASE._setWindowSize(8);\nconst crypto = {\n node: nodeCrypto,\n web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined,\n};\nconst TAGS = {\n challenge: 'BIP0340/challenge',\n aux: 'BIP0340/aux',\n nonce: 'BIP0340/nonce',\n};\nconst TAGGED_HASH_PREFIXES = {};\nexport const utils = {\n bytesToHex,\n hexToBytes,\n concatBytes,\n mod,\n invert,\n isValidPrivateKey(privateKey) {\n try {\n normalizePrivateKey(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n _bigintTo32Bytes: numTo32b,\n _normalizePrivateKey: normalizePrivateKey,\n hashToPrivateKey: (hash) => {\n hash = ensureBytes(hash);\n const minLen = groupLen + 8;\n if (hash.length < minLen || hash.length > 1024) {\n throw new Error(`Expected valid bytes of private key as per FIPS 186`);\n }\n const num = mod(bytesToNumber(hash), CURVE.n - _1n) + _1n;\n return numTo32b(num);\n },\n randomBytes: (bytesLength = 32) => {\n if (crypto.web) {\n return crypto.web.getRandomValues(new Uint8Array(bytesLength));\n }\n else if (crypto.node) {\n const { randomBytes } = crypto.node;\n return Uint8Array.from(randomBytes(bytesLength));\n }\n else {\n throw new Error(\"The environment doesn't have randomBytes function\");\n }\n },\n randomPrivateKey: () => utils.hashToPrivateKey(utils.randomBytes(groupLen + 8)),\n precompute(windowSize = 8, point = Point.BASE) {\n const cached = point === Point.BASE ? point : new Point(point.x, point.y);\n cached._setWindowSize(windowSize);\n cached.multiply(_3n);\n return cached;\n },\n sha256: async (...messages) => {\n if (crypto.web) {\n const buffer = await crypto.web.subtle.digest('SHA-256', concatBytes(...messages));\n return new Uint8Array(buffer);\n }\n else if (crypto.node) {\n const { createHash } = crypto.node;\n const hash = createHash('sha256');\n messages.forEach((m) => hash.update(m));\n return Uint8Array.from(hash.digest());\n }\n else {\n throw new Error(\"The environment doesn't have sha256 function\");\n }\n },\n hmacSha256: async (key, ...messages) => {\n if (crypto.web) {\n const ckey = await crypto.web.subtle.importKey('raw', key, { name: 'HMAC', hash: { name: 'SHA-256' } }, false, ['sign']);\n const message = concatBytes(...messages);\n const buffer = await crypto.web.subtle.sign('HMAC', ckey, message);\n return new Uint8Array(buffer);\n }\n else if (crypto.node) {\n const { createHmac } = crypto.node;\n const hash = createHmac('sha256', key);\n messages.forEach((m) => hash.update(m));\n return Uint8Array.from(hash.digest());\n }\n else {\n throw new Error(\"The environment doesn't have hmac-sha256 function\");\n }\n },\n sha256Sync: undefined,\n hmacSha256Sync: undefined,\n taggedHash: async (tag, ...messages) => {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = await utils.sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return utils.sha256(tagP, ...messages);\n },\n taggedHashSync: (tag, ...messages) => {\n if (typeof _sha256Sync !== 'function')\n throw new ShaError('sha256Sync is undefined, you need to set it');\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = _sha256Sync(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return _sha256Sync(tagP, ...messages);\n },\n _JacobianPoint: JacobianPoint,\n};\nObject.defineProperties(utils, {\n sha256Sync: {\n configurable: false,\n get() {\n return _sha256Sync;\n },\n set(val) {\n if (!_sha256Sync)\n _sha256Sync = val;\n },\n },\n hmacSha256Sync: {\n configurable: false,\n get() {\n return _hmacSha256Sync;\n },\n set(val) {\n if (!_hmacSha256Sync)\n _hmacSha256Sync = val;\n },\n },\n});\n", "// Copyright 2019-2022 @polkadot/wasm-bridge authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { getRandomValues } from '@polkadot/x-randomvalues';\nconst DEFAULT_CRYPTO = {\n getRandomValues\n};\nconst DEFAULT_SELF = {\n crypto: DEFAULT_CRYPTO\n};\n\n/**\n * @name Wbg\n * @description\n * This defines the internal interfaces that wasm-bindgen used to communicate\n * with the host layer. None of these functions are available to the user, rather\n * they are called internally from the WASM code itself.\n *\n * The interfaces here are exposed in the imports on the created WASM interfaces.\n *\n * Internally the implementation does a thin layer into the supplied bridge.\n */\nexport class Wbg {\n #bridge;\n constructor(bridge) {\n this.#bridge = bridge;\n }\n\n /** @internal */\n abort = () => {\n throw new Error('abort');\n };\n\n /** @internal */\n __wbindgen_is_undefined = idx => {\n return this.#bridge.getObject(idx) === undefined;\n };\n\n /** @internal */\n __wbindgen_throw = (ptr, len) => {\n throw new Error(this.#bridge.getString(ptr, len));\n };\n\n /** @internal */\n __wbg_self_1b7a39e3a92c949c = () => {\n return this.#bridge.addObject(DEFAULT_SELF);\n };\n\n /** @internal */\n __wbg_require_604837428532a733 = (ptr, len) => {\n throw new Error(`Unable to require ${this.#bridge.getString(ptr, len)}`);\n };\n\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n __wbg_crypto_968f1772287e2df0 = _idx => {\n return this.#bridge.addObject(DEFAULT_CRYPTO);\n };\n\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n __wbg_getRandomValues_a3d34b4fee3c2869 = _idx => {\n return this.#bridge.addObject(DEFAULT_CRYPTO.getRandomValues);\n };\n\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n __wbg_getRandomValues_f5e14ab7ac8e995d = (_arg0, ptr, len) => {\n DEFAULT_CRYPTO.getRandomValues(this.#bridge.getU8a(ptr, len));\n };\n\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n __wbg_randomFillSync_d5bd2d655fdf256a = (_idx, _ptr, _len) => {\n throw new Error('randomFillsync is not available');\n\n // getObject(idx).randomFillSync(getU8a(ptr, len));\n };\n\n /** @internal */\n __wbindgen_object_drop_ref = idx => {\n this.#bridge.takeObject(idx);\n };\n}", "// Copyright 2019-2022 @polkadot/wasm-bridge authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// A number of functions are \"unsafe\" and purposefully so - it is\n// assumed that where the bridge is used, it is correctly wrapped\n// in a safeguard (see withWasm in the wasm-crypto package) which\n// then ensures that the internal wasm instance here is available\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\nimport { stringToU8a, u8aToString } from '@polkadot/util';\nimport { Wbg } from \"./wbg.js\";\n\n/**\n * @name Bridge\n * @description\n * Creates a bridge between the JS and WASM environments.\n *\n * For any bridge it is passed an function white is then called internally at the\n * time of initialization. This affectively implements the layer between WASM and\n * the native environment, providing all the plumbing needed for the Wbg classes.\n */\nexport class Bridge {\n #cachegetInt32;\n #cachegetUint8;\n #createWasm;\n #heap;\n #heapNext;\n #wasm;\n #wasmError;\n #wasmPromise;\n #wbg;\n #type;\n constructor(createWasm) {\n this.#createWasm = createWasm;\n this.#cachegetInt32 = null;\n this.#cachegetUint8 = null;\n this.#heap = new Array(32).fill(undefined).concat(undefined, null, true, false);\n this.#heapNext = this.#heap.length;\n this.#type = 'none';\n this.#wasm = null;\n this.#wasmError = null;\n this.#wasmPromise = null;\n this.#wbg = {\n ...new Wbg(this)\n };\n }\n\n /** @description Returns the init error */\n get error() {\n return this.#wasmError;\n }\n\n /** @description Returns the init type */\n get type() {\n return this.#type;\n }\n\n /** @description Returns the created wasm interface */\n get wasm() {\n return this.#wasm;\n }\n\n /** @description Performs the wasm initialization */\n async init(createWasm) {\n if (!this.#wasmPromise || createWasm) {\n this.#wasmPromise = (createWasm || this.#createWasm)(this.#wbg);\n }\n const {\n error,\n type,\n wasm\n } = await this.#wasmPromise;\n this.#type = type;\n this.#wasm = wasm;\n this.#wasmError = error;\n return this.#wasm;\n }\n\n /**\n * @internal\n * @description Gets an object from the heap\n */\n getObject(idx) {\n return this.#heap[idx];\n }\n\n /**\n * @internal\n * @description Removes an object from the heap\n */\n dropObject(idx) {\n if (idx < 36) {\n return;\n }\n this.#heap[idx] = this.#heapNext;\n this.#heapNext = idx;\n }\n\n /**\n * @internal\n * @description Retrieves and removes an object to the heap\n */\n takeObject(idx) {\n const ret = this.getObject(idx);\n this.dropObject(idx);\n return ret;\n }\n\n /**\n * @internal\n * @description Adds an object to the heap\n */\n addObject(obj) {\n if (this.#heapNext === this.#heap.length) {\n this.#heap.push(this.#heap.length + 1);\n }\n const idx = this.#heapNext;\n this.#heapNext = this.#heap[idx];\n this.#heap[idx] = obj;\n return idx;\n }\n\n /**\n * @internal\n * @description Retrieve an Int32 in the WASM interface\n */\n getInt32() {\n if (this.#cachegetInt32 === null || this.#cachegetInt32.buffer !== this.#wasm.memory.buffer) {\n this.#cachegetInt32 = new Int32Array(this.#wasm.memory.buffer);\n }\n return this.#cachegetInt32;\n }\n\n /**\n * @internal\n * @description Retrieve an Uint8Array in the WASM interface\n */\n getUint8() {\n if (this.#cachegetUint8 === null || this.#cachegetUint8.buffer !== this.#wasm.memory.buffer) {\n this.#cachegetUint8 = new Uint8Array(this.#wasm.memory.buffer);\n }\n return this.#cachegetUint8;\n }\n\n /**\n * @internal\n * @description Retrieves an Uint8Array in the WASM interface\n */\n getU8a(ptr, len) {\n return this.getUint8().subarray(ptr / 1, ptr / 1 + len);\n }\n\n /**\n * @internal\n * @description Retrieves a string in the WASM interface\n */\n getString(ptr, len) {\n return u8aToString(this.getU8a(ptr, len));\n }\n\n /**\n * @internal\n * @description Allocates an Uint8Array in the WASM interface\n */\n allocU8a(arg) {\n const ptr = this.#wasm.__wbindgen_malloc(arg.length * 1);\n this.getUint8().set(arg, ptr / 1);\n return [ptr, arg.length];\n }\n\n /**\n * @internal\n * @description Allocates a string in the WASM interface\n */\n allocString(arg) {\n return this.allocU8a(stringToU8a(arg));\n }\n\n /**\n * @internal\n * @description Retrieves an Uint8Array from the WASM interface\n */\n resultU8a() {\n const r0 = this.getInt32()[8 / 4 + 0];\n const r1 = this.getInt32()[8 / 4 + 1];\n const ret = this.getU8a(r0, r1).slice();\n this.#wasm.__wbindgen_free(r0, r1 * 1);\n return ret;\n }\n\n /**\n * @internal\n * @description Retrieve a string from the WASM interface\n */\n resultString() {\n return u8aToString(this.resultU8a());\n }\n}", "// Copyright 2019-2022 @polkadot/wasm-bundle authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @name createWasmFn\n * @description\n * Create a WASM (or ASM.js) creator interface based on the supplied information.\n *\n * It will attempt to create a WASM interface first and if this fails or is not available in\n * the environment, will fallback to attempting to create an ASM.js interface.\n */\nexport function createWasmFn(root, wasmBytes, asmFn) {\n return async wbg => {\n const result = {\n error: null,\n type: 'none',\n wasm: null\n };\n try {\n if (!wasmBytes || !wasmBytes.length) {\n throw new Error('No WebAssembly provided for initialization');\n } else if (typeof WebAssembly !== 'object' || typeof WebAssembly.instantiate !== 'function') {\n throw new Error('WebAssembly is not available in your environment');\n }\n const source = await WebAssembly.instantiate(wasmBytes, {\n wbg\n });\n result.wasm = source.instance.exports;\n result.type = 'wasm';\n } catch (error) {\n // if we have a valid supplied asm.js, return that\n if (typeof asmFn === 'function') {\n result.wasm = asmFn(wbg);\n result.type = 'asm';\n } else {\n result.error = `FATAL: Unable to initialize @polkadot/wasm-${root}:: ${error.message}`;\n console.error(result.error);\n }\n }\n return result;\n };\n}", "// Copyright 2019-2022 @polkadot/wasm-util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// Use an array for our indexer - this is faster than using map access. In\n// this case we assume ASCII-only inputs, so we cannot overflow the array\nconst chr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst map = new Array(256);\n\n// We use charCodeAt for access here and in the decoder loop - this is faster\n// on lookups (array + numbers) and also faster than accessing the specific\n// character via data[i]\nfor (let i = 0; i < chr.length; i++) {\n map[chr.charCodeAt(i)] = i;\n}\n\n/**\n * @name base64Decode\n * @description\n * A base64Decoding function that operates in all environments. Unlike decoding\n * from Buffer (Node.js only) or atob (browser-only) this implementation is\n * slightly slower, but it is platform independent.\n *\n * For our usage, since we have access to the static final size (where used), we\n * decode to a specified output buffer. This also means we have applied a number\n * of optimizations based on this - checking output position instead of chars.\n */\nexport function base64Decode(data, out) {\n const len = out.length;\n let byte = 0;\n let bits = 0;\n let pos = -1;\n for (let i = 0; pos < len; i++) {\n // each character represents 6 bits\n byte = byte << 6 | map[data.charCodeAt(i)];\n\n // each byte needs to contain 8 bits\n if ((bits += 6) >= 8) {\n out[++pos] = byte >>> (bits -= 8) & 0xff;\n }\n }\n return out;\n}", "// Copyright 2019-2022 @polkadot/wasm-util authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// MIT License\n//\n// Copyright (c) 2020 Arjun Barrett\n//\n// Copied from https://github.com/101arrowz/fflate/blob/73c737941ec89d85cdf0ad39ee6f26c5fdc95fd7/src/index.ts\n// This only contains the unzlibSync function, no compression, no async, no workers\n//\n// These 2 issues are addressed as a short-term, stop-gap solution\n// - https://github.com/polkadot-js/api/issues/2963\n// - https://github.com/101arrowz/fflate/issues/17\n//\n// Only tweaks make here are some TS adjustments (we use strict null checks), the code is otherwise as-is with\n// only the single required function provided (compression is still being done in the build with fflate)\n\n/* eslint-disable */\n\n// inflate state\n\n// aliases for shorter compressed code (most minifers don't do this)\nconst u8 = Uint8Array,\n u16 = Uint16Array,\n u32 = Uint32Array;\n\n// code length index map\nconst clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n\n// fixed length extra bits\nconst fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */0, 0, /* impossible */0]);\n\n// fixed distance extra bits\n// see fleb note\nconst fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */0, 0]);\n\n// get base, reverse index map from extra bits\nconst freb = (eb, start) => {\n const b = new u16(31);\n for (let i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n const r = new u32(b[30]);\n for (let i = 1; i < 30; ++i) {\n for (let j = b[i]; j < b[i + 1]; ++j) {\n r[j] = j - b[i] << 5 | i;\n }\n }\n return [b, r];\n};\nconst [fl, revfl] = freb(fleb, 2);\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nconst [fd] = freb(fdeb, 0);\n\n// map of value to reverse (assuming 16 bits)\nconst rev = new u16(32768);\nfor (let i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n let x = (i & 0xAAAA) >>> 1 | (i & 0x5555) << 1;\n x = (x & 0xCCCC) >>> 2 | (x & 0x3333) << 2;\n x = (x & 0xF0F0) >>> 4 | (x & 0x0F0F) << 4;\n rev[i] = ((x & 0xFF00) >>> 8 | (x & 0x00FF) << 8) >>> 1;\n}\n\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nconst hMap = (cd, mb, r) => {\n const s = cd.length;\n // index\n let i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n const l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) ++l[cd[i] - 1];\n // u16 \"map\": index -> minimum code for bit length = index\n const le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = le[i - 1] + l[i - 1] << 1;\n }\n let co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n const rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n const sv = i << 4 | cd[i];\n // free bits\n const r = mb - cd[i];\n // start value\n let v = le[cd[i] - 1]++ << r;\n // m is end value\n for (const m = v | (1 << r) - 1; v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n } else {\n co = new u16(s);\n for (i = 0; i < s; ++i) co[i] = rev[le[cd[i] - 1]++] >>> 15 - cd[i];\n }\n return co;\n};\n\n// fixed length tree\nconst flt = new u8(288);\nfor (let i = 0; i < 144; ++i) flt[i] = 8;\nfor (let i = 144; i < 256; ++i) flt[i] = 9;\nfor (let i = 256; i < 280; ++i) flt[i] = 7;\nfor (let i = 280; i < 288; ++i) flt[i] = 8;\n// fixed distance tree\nconst fdt = new u8(32);\nfor (let i = 0; i < 32; ++i) fdt[i] = 5;\n\n// fixed length map\nconst flrm = hMap(flt, 9, 1);\n// fixed distance map\nconst fdrm = hMap(fdt, 5, 1);\n\n// read d, starting at bit p and mask with m\nconst bits = (d, p, m) => {\n const o = p >>> 3;\n return (d[o] | d[o + 1] << 8) >>> (p & 7) & m;\n};\n\n// read d, starting at bit p continuing for at least 16 bits\nconst bits16 = (d, p) => {\n const o = p >>> 3;\n return (d[o] | d[o + 1] << 8 | d[o + 2] << 16) >>> (p & 7);\n};\n\n// get end of byte\nconst shft = p => (p >>> 3) + (p & 7 && 1);\n\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nconst slc = (v, s, e) => {\n if (s == null || s < 0) s = 0;\n if (e == null || e > v.length) e = v.length;\n // can't use .constructor in case user-supplied\n const n = new (v instanceof u16 ? u16 : v instanceof u32 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n\n// find max of array\nconst max = a => {\n let m = a[0];\n for (let i = 1; i < a.length; ++i) {\n if (a[i] > m) m = a[i];\n }\n return m;\n};\n\n// expands raw DEFLATE data\nconst inflt = (dat, buf, st) => {\n const noSt = !st || st.i;\n if (!st) st = {};\n // source length\n const sl = dat.length;\n // have to estimate size\n const noBuf = !buf || !noSt;\n // Assumes roughly 33% compression ratio average\n if (!buf) buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n const cbuf = l => {\n let bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n const nbuf = new u8(Math.max(bl << 1, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n let final = st.f || 0,\n pos = st.p || 0,\n bt = st.b || 0,\n lm = st.l,\n dm = st.d,\n lbt = st.m,\n dbt = st.n;\n if (final && !lm) return buf;\n // total bits\n const tbts = sl << 3;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n st.f = final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n const type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n const s = shft(pos) + 4,\n l = dat[s - 4] | dat[s - 3] << 8,\n t = s + l;\n if (t > sl) {\n if (noSt) throw 'unexpected EOF';\n break;\n }\n // ensure size\n if (noBuf) cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t << 3;\n continue;\n } else if (type == 1) lm = flrm, dm = fdrm, lbt = 9, dbt = 5;else if (type == 2) {\n // literal lengths\n const hLit = bits(dat, pos, 31) + 257,\n hcLen = bits(dat, pos + 10, 15) + 4;\n const tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n const ldt = new u8(tl);\n // code length tree\n const clt = new u8(19);\n for (let i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n const clb = max(clt),\n clbmsk = (1 << clb) - 1;\n if (!noSt && pos + tl * (clb + 7) > tbts) break;\n // code lengths map\n const clm = hMap(clt, clb, 1);\n for (let i = 0; i < tl;) {\n const r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n const s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n } else {\n // copy count\n let c = 0,\n n = 0;\n if (s == 16) n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];else if (s == 17) n = 3 + bits(dat, pos, 7), pos += 3;else if (s == 18) n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--) ldt[i++] = c;\n }\n }\n // length tree distance tree\n const lt = ldt.subarray(0, hLit),\n dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n } else throw 'invalid block type';\n if (pos > tbts) throw 'unexpected EOF';\n }\n // Make sure the buffer can hold this + the largest possible addition\n // maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf) cbuf(bt + 131072);\n const lms = (1 << lbt) - 1,\n dms = (1 << dbt) - 1;\n const mxa = lbt + dbt + 18;\n while (noSt || pos + mxa < tbts) {\n // bits read, code\n const c = lm[bits16(dat, pos) & lms],\n sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) throw 'unexpected EOF';\n if (!c) throw 'invalid length/literal';\n if (sym < 256) buf[bt++] = sym;else if (sym == 256) {\n lm = undefined;\n break;\n } else {\n let add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n const i = sym - 257,\n b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n const d = dm[bits16(dat, pos) & dms],\n dsym = d >>> 4;\n if (!d) throw 'invalid distance';\n pos += d & 15;\n let dt = fd[dsym];\n if (dsym > 3) {\n const b = fdeb[dsym];\n dt += bits16(dat, pos) & (1 << b) - 1, pos += b;\n }\n if (pos > tbts) throw 'unexpected EOF';\n if (noBuf) cbuf(bt + 131072);\n const end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = pos, st.b = bt;\n if (lm) final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n\n// zlib valid\nconst zlv = d => {\n if ((d[0] & 15) != 8 || d[0] >>> 4 > 7 || (d[0] << 8 | d[1]) % 31) throw 'invalid zlib data';\n if (d[1] & 32) throw 'invalid zlib data: preset dictionaries not supported';\n};\n\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}", "// Copyright 2019-2022 @polkadot/wasm-crypto-wasm authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { base64Decode, unzlibSync } from '@polkadot/wasm-util';\nimport { bytes, lenIn, lenOut } from \"./cjs/bytes.js\";\nexport { packageInfo } from \"./packageInfo.js\";\n\n/**\n * @name wasmBytes\n * @description\n * The decoded WASM interface as exposed by this package.\n *\n * The build process will output into cjs/* into a compressed base64 format.\n * Upon loading the exposed bytes will be decoded and decompressed form this\n * specific format and returned.\n */\nexport const wasmBytes = /*#__PURE__*/unzlibSync(base64Decode(bytes, new Uint8Array(lenIn)), new Uint8Array(lenOut));", "// Copyright 2019-2022 @polkadot/wasm-crypto-init authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { createWasmFn } from '@polkadot/wasm-bridge';\nimport { wasmBytes } from '@polkadot/wasm-crypto-wasm';\nexport { packageInfo } from \"./packageInfo.js\";\n\n/**\n * @name createWasm\n * @description\n * Creates an interface using only WASM\n */\nexport const createWasm = /*#__PURE__*/createWasmFn('crypto', wasmBytes, null);", "// Copyright 2019-2022 @polkadot/wasm-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Bridge } from '@polkadot/wasm-bridge';\nimport { createWasm } from '@polkadot/wasm-crypto-init';\n\n/**\n * @name bridge\n * @description\n * The JS <-> WASM bridge that is in operation. For the specific package\n * it is a global, i.e. all operations happens on this specific bridge\n */\nexport const bridge = new Bridge(createWasm);\n\n/**\n * @name initBridge\n * @description\n * Creates a new bridge interface with the (optional) initialization function\n */\nexport async function initBridge(createWasm) {\n return bridge.init(createWasm);\n}", "// Copyright 2019-2022 @polkadot/wasm-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bridge, initBridge } from \"./init.js\";\nexport { packageInfo } from \"./packageInfo.js\";\nexport { bridge };\n\n// Removes the first parameter (expected as WasmCryptoInstance) and leaves the\n// rest of the parameters in-tack. This allows us to dynamically create a function\n// return from the withWasm helper\n\n/**\n * @internal\n * @description\n * This create an extenal interface function from the signature, all the while checking\n * the actual bridge wasm interface to ensure it has been initialized.\n *\n * This means that we can call it\n *\n * withWasm(wasm: WasmCryptoInstance, a: number, b: string) => Uint8Array\n *\n * and in this case it will create an interface function with the signarure\n *\n * (a: number, b: string) => Uint8Array\n */\nfunction withWasm(fn) {\n return (...params) => {\n if (!bridge.wasm) {\n throw new Error('The WASM interface has not been initialized. Ensure that you wait for the initialization Promise with waitReady() from @polkadot/wasm-crypto (or cryptoWaitReady() from @polkadot/util-crypto) before attempting to use WASM-only interfaces.');\n }\n return fn(bridge.wasm, ...params);\n };\n}\nexport const bip39Generate = /*#__PURE__*/withWasm((wasm, words) => {\n wasm.ext_bip39_generate(8, words);\n return bridge.resultString();\n});\nexport const bip39ToEntropy = /*#__PURE__*/withWasm((wasm, phrase) => {\n wasm.ext_bip39_to_entropy(8, ...bridge.allocString(phrase));\n return bridge.resultU8a();\n});\nexport const bip39ToMiniSecret = /*#__PURE__*/withWasm((wasm, phrase, password) => {\n wasm.ext_bip39_to_mini_secret(8, ...bridge.allocString(phrase), ...bridge.allocString(password));\n return bridge.resultU8a();\n});\nexport const bip39ToSeed = /*#__PURE__*/withWasm((wasm, phrase, password) => {\n wasm.ext_bip39_to_seed(8, ...bridge.allocString(phrase), ...bridge.allocString(password));\n return bridge.resultU8a();\n});\nexport const bip39Validate = /*#__PURE__*/withWasm((wasm, phrase) => {\n const ret = wasm.ext_bip39_validate(...bridge.allocString(phrase));\n return ret !== 0;\n});\nexport const ed25519KeypairFromSeed = /*#__PURE__*/withWasm((wasm, seed) => {\n wasm.ext_ed_from_seed(8, ...bridge.allocU8a(seed));\n return bridge.resultU8a();\n});\nexport const ed25519Sign = /*#__PURE__*/withWasm((wasm, pubkey, seckey, message) => {\n wasm.ext_ed_sign(8, ...bridge.allocU8a(pubkey), ...bridge.allocU8a(seckey), ...bridge.allocU8a(message));\n return bridge.resultU8a();\n});\nexport const ed25519Verify = /*#__PURE__*/withWasm((wasm, signature, message, pubkey) => {\n const ret = wasm.ext_ed_verify(...bridge.allocU8a(signature), ...bridge.allocU8a(message), ...bridge.allocU8a(pubkey));\n return ret !== 0;\n});\nexport const secp256k1FromSeed = /*#__PURE__*/withWasm((wasm, seckey) => {\n wasm.ext_secp_from_seed(8, ...bridge.allocU8a(seckey));\n return bridge.resultU8a();\n});\nexport const secp256k1Compress = /*#__PURE__*/withWasm((wasm, pubkey) => {\n wasm.ext_secp_pub_compress(8, ...bridge.allocU8a(pubkey));\n return bridge.resultU8a();\n});\nexport const secp256k1Expand = /*#__PURE__*/withWasm((wasm, pubkey) => {\n wasm.ext_secp_pub_expand(8, ...bridge.allocU8a(pubkey));\n return bridge.resultU8a();\n});\nexport const secp256k1Recover = /*#__PURE__*/withWasm((wasm, msgHash, sig, recovery) => {\n wasm.ext_secp_recover(8, ...bridge.allocU8a(msgHash), ...bridge.allocU8a(sig), recovery);\n return bridge.resultU8a();\n});\nexport const secp256k1Sign = /*#__PURE__*/withWasm((wasm, msgHash, seckey) => {\n wasm.ext_secp_sign(8, ...bridge.allocU8a(msgHash), ...bridge.allocU8a(seckey));\n return bridge.resultU8a();\n});\nexport const sr25519DeriveKeypairHard = /*#__PURE__*/withWasm((wasm, pair, cc) => {\n wasm.ext_sr_derive_keypair_hard(8, ...bridge.allocU8a(pair), ...bridge.allocU8a(cc));\n return bridge.resultU8a();\n});\nexport const sr25519DeriveKeypairSoft = /*#__PURE__*/withWasm((wasm, pair, cc) => {\n wasm.ext_sr_derive_keypair_soft(8, ...bridge.allocU8a(pair), ...bridge.allocU8a(cc));\n return bridge.resultU8a();\n});\nexport const sr25519DerivePublicSoft = /*#__PURE__*/withWasm((wasm, pubkey, cc) => {\n wasm.ext_sr_derive_public_soft(8, ...bridge.allocU8a(pubkey), ...bridge.allocU8a(cc));\n return bridge.resultU8a();\n});\nexport const sr25519KeypairFromSeed = /*#__PURE__*/withWasm((wasm, seed) => {\n wasm.ext_sr_from_seed(8, ...bridge.allocU8a(seed));\n return bridge.resultU8a();\n});\nexport const sr25519Sign = /*#__PURE__*/withWasm((wasm, pubkey, secret, message) => {\n wasm.ext_sr_sign(8, ...bridge.allocU8a(pubkey), ...bridge.allocU8a(secret), ...bridge.allocU8a(message));\n return bridge.resultU8a();\n});\nexport const sr25519Verify = /*#__PURE__*/withWasm((wasm, signature, message, pubkey) => {\n const ret = wasm.ext_sr_verify(...bridge.allocU8a(signature), ...bridge.allocU8a(message), ...bridge.allocU8a(pubkey));\n return ret !== 0;\n});\nexport const sr25519Agree = /*#__PURE__*/withWasm((wasm, pubkey, secret) => {\n wasm.ext_sr_agree(8, ...bridge.allocU8a(pubkey), ...bridge.allocU8a(secret));\n return bridge.resultU8a();\n});\nexport const vrfSign = /*#__PURE__*/withWasm((wasm, secret, context, message, extra) => {\n wasm.ext_vrf_sign(8, ...bridge.allocU8a(secret), ...bridge.allocU8a(context), ...bridge.allocU8a(message), ...bridge.allocU8a(extra));\n return bridge.resultU8a();\n});\nexport const vrfVerify = /*#__PURE__*/withWasm((wasm, pubkey, context, message, extra, outAndProof) => {\n const ret = wasm.ext_vrf_verify(...bridge.allocU8a(pubkey), ...bridge.allocU8a(context), ...bridge.allocU8a(message), ...bridge.allocU8a(extra), ...bridge.allocU8a(outAndProof));\n return ret !== 0;\n});\nexport const blake2b = /*#__PURE__*/withWasm((wasm, data, key, size) => {\n wasm.ext_blake2b(8, ...bridge.allocU8a(data), ...bridge.allocU8a(key), size);\n return bridge.resultU8a();\n});\nexport const hmacSha256 = /*#__PURE__*/withWasm((wasm, key, data) => {\n wasm.ext_hmac_sha256(8, ...bridge.allocU8a(key), ...bridge.allocU8a(data));\n return bridge.resultU8a();\n});\nexport const hmacSha512 = /*#__PURE__*/withWasm((wasm, key, data) => {\n wasm.ext_hmac_sha512(8, ...bridge.allocU8a(key), ...bridge.allocU8a(data));\n return bridge.resultU8a();\n});\nexport const keccak256 = /*#__PURE__*/withWasm((wasm, data) => {\n wasm.ext_keccak256(8, ...bridge.allocU8a(data));\n return bridge.resultU8a();\n});\nexport const keccak512 = /*#__PURE__*/withWasm((wasm, data) => {\n wasm.ext_keccak512(8, ...bridge.allocU8a(data));\n return bridge.resultU8a();\n});\nexport const pbkdf2 = /*#__PURE__*/withWasm((wasm, data, salt, rounds) => {\n wasm.ext_pbkdf2(8, ...bridge.allocU8a(data), ...bridge.allocU8a(salt), rounds);\n return bridge.resultU8a();\n});\nexport const scrypt = /*#__PURE__*/withWasm((wasm, password, salt, log2n, r, p) => {\n wasm.ext_scrypt(8, ...bridge.allocU8a(password), ...bridge.allocU8a(salt), log2n, r, p);\n return bridge.resultU8a();\n});\nexport const sha256 = /*#__PURE__*/withWasm((wasm, data) => {\n wasm.ext_sha256(8, ...bridge.allocU8a(data));\n return bridge.resultU8a();\n});\nexport const sha512 = /*#__PURE__*/withWasm((wasm, data) => {\n wasm.ext_sha512(8, ...bridge.allocU8a(data));\n return bridge.resultU8a();\n});\nexport const twox = /*#__PURE__*/withWasm((wasm, data, rounds) => {\n wasm.ext_twox(8, ...bridge.allocU8a(data), rounds);\n return bridge.resultU8a();\n});\nexport function isReady() {\n return !!bridge.wasm;\n}\nexport async function waitReady() {\n try {\n const wasm = await initBridge();\n return !!wasm;\n } catch {\n return false;\n }\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isReady, waitReady } from '@polkadot/wasm-crypto';\nexport const cryptoIsReady = isReady;\nexport function cryptoWaitReady() {\n return waitReady().then(() => {\n if (!isReady()) {\n throw new Error('Unable to initialize @polkadot/util-crypto');\n }\n return true;\n }).catch(() => false);\n}", "export function number(n: number) {\n if (!Number.isSafeInteger(n) || n < 0) throw new Error(`Wrong positive integer: ${n}`);\n}\n\nexport function bool(b: boolean) {\n if (typeof b !== 'boolean') throw new Error(`Expected boolean, not ${b}`);\n}\n\nexport function bytes(b: Uint8Array | undefined, ...lengths: number[]) {\n if (!(b instanceof Uint8Array)) throw new TypeError('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new TypeError(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\n\ntype Hash = {\n (data: Uint8Array): Uint8Array;\n blockLen: number;\n outputLen: number;\n create: any;\n};\nexport function hash(hash: Hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\n\nexport function exists(instance: any, checkFinished = true) {\n if (instance.destroyed) throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called');\n}\nexport function output(out: any, instance: any) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\n\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\n\nexport default assert;\n", "// Global symbol available in browsers only\ndeclare const self: Record | undefined;\nexport const crypto: { node?: any; web?: any } = {\n node: undefined,\n web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined,\n};\n", "/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n// The import here is via the package name. This is to ensure\n// that exports mapping/resolution does fall into place.\nimport { crypto } from '@noble/hashes/crypto';\n\n// prettier-ignore\nexport type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array |\n Uint16Array | Int16Array | Uint32Array | Int32Array;\n\n// Cast array to different type\nexport const u8 = (arr: TypedArray) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr: TypedArray) =>\n new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n\n// Cast array to view\nexport const createView = (arr: TypedArray) =>\n new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word: number, shift: number) => (word << (32 - shift)) | (word >>> shift);\n\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// There is almost no big endian hardware, but js typed arrays uses platform specific endianness.\n// So, just to be sure not to corrupt anything.\nif (!isLE) throw new Error('Non little-endian hardware is not supported');\n\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xde, 0xad, 0xbe, 0xef]))\n */\nexport function bytesToHex(uint8a: Uint8Array): string {\n // pre-caching improves the speed 6x\n if (!(uint8a instanceof Uint8Array)) throw new Error('Uint8Array expected');\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\n\n/**\n * @example hexToBytes('deadbeef')\n */\nexport function hexToBytes(hex: string): Uint8Array {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2) throw new Error('hexToBytes: received invalid unpadded hex');\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0) throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n\n// There is no setImmediate in browser and setTimeout is slow. However, call to async function will return Promise\n// which will be fullfiled only on next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => {};\n\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters: number, tick: number, cb: (i: number) => void) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick) continue;\n await nextTick();\n ts += diff;\n }\n}\n\n// Global symbols in both browsers and Node.js since v11\n// See https://github.com/microsoft/TypeScript/issues/31535\ndeclare const TextEncoder: any;\ndeclare const TextDecoder: any;\n\nexport function utf8ToBytes(str: string): Uint8Array {\n if (typeof str !== 'string') {\n throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\n\nexport type Input = Uint8Array | string;\nexport function toBytes(data: Input): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n if (!(data instanceof Uint8Array))\n throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);\n return data;\n}\n\n/**\n * Concats Uint8Array-s into one; like `Buffer.concat([buf1, buf2])`\n * @example concatBytes(buf1, buf2)\n */\nexport function concatBytes(...arrays: Uint8Array[]): Uint8Array {\n if (!arrays.every((a) => a instanceof Uint8Array)) throw new Error('Uint8Array list expected');\n if (arrays.length === 1) return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\n\n// For runtime check if class implements interface\nexport abstract class Hash> {\n abstract blockLen: number; // Bytes per block\n abstract outputLen: number; // Bytes in output\n abstract update(buf: Input): this;\n // Writes digest into buf\n abstract digestInto(buf: Uint8Array): void;\n abstract digest(): Uint8Array;\n // Cleanup internal state. Not '.clean' because instance is not usable after that.\n // Clean usually resets instance to initial state, but it is not possible for keyed hashes if key is consumed into state.\n // NOTE: if digest is not consumed by user, user need manually call '.destroy' if zeroing is required\n abstract destroy(): void;\n // Unsafe because doesn't check if \"to\" is correct. Can be used as clone() if no opts passed.\n // Why cloneInto instead of clone? Mostly performance (same as _digestInto), but also has nice property: it reuses instance\n // which means all internal buffers is overwritten, which also causes overwrite buffer which used for digest (in some cases).\n // We don't provide any guarantees about cleanup (it is impossible to!), so should be enough for now.\n abstract _cloneInto(to?: T): T;\n // Safe version that clones internal state\n clone(): T {\n return this._cloneInto();\n }\n}\n\n/**\n * XOF: streaming API to read digest in chunks.\n * Same as 'squeeze' in keccak/k12 and 'seek' in blake3, but more generic name.\n * When hash used in XOF mode it is up to user to call '.destroy' afterwards, since we cannot destroy state, next call can require more bytes.\n */\nexport type HashXOF> = Hash & {\n xof(bytes: number): Uint8Array; // Read 'bytes' bytes from digest stream\n xofInto(buf: Uint8Array): Uint8Array; // read buf.length bytes from digest stream into buf\n};\n\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj: any) =>\n Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\n\ntype EmptyObj = {};\nexport function checkOpts(\n defaults: T1,\n opts?: T2\n): T1 & T2 {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new TypeError('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged as T1 & T2;\n}\n\nexport type CHash = ReturnType;\n\nexport function wrapConstructor>(hashConstructor: () => Hash) {\n const hashC = (message: Input): Uint8Array => hashConstructor().update(toBytes(message)).digest();\n const tmp = hashConstructor();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashConstructor();\n return hashC;\n}\n\nexport function wrapConstructorWithOpts, T extends Object>(\n hashCons: (opts?: T) => Hash\n) {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts: T) => hashCons(opts);\n return hashC;\n}\n\n/**\n * Secure PRNG\n */\nexport function randomBytes(bytesLength = 32): Uint8Array {\n if (crypto.web) {\n return crypto.web.getRandomValues(new Uint8Array(bytesLength));\n } else if (crypto.node) {\n return new Uint8Array(crypto.node.randomBytes(bytesLength).buffer);\n } else {\n throw new Error(\"The environment doesn't have randomBytes function\");\n }\n}\n", "const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n: bigint, le = false) {\n if (le) return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\n\nexport function split(lst: bigint[], le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\n\nexport const toBig = (h: number, l: number) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h: number, l: number, s: number) => h >>> s;\nconst shrSL = (h: number, l: number, s: number) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h: number, l: number, s: number) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h: number, l: number, s: number) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h: number, l: number, s: number) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h: number, l: number, s: number) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h: number, l: number) => l;\nconst rotr32L = (h: number, l: number) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h: number, l: number, s: number) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h: number, l: number, s: number) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h: number, l: number, s: number) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h: number, l: number, s: number) => (h << (s - 32)) | (l >>> (64 - s));\n\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah: number, Al: number, Bh: number, Bl: number) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al: number, Bl: number, Cl: number) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low: number, Ah: number, Bh: number, Ch: number) =>\n (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al: number, Bl: number, Cl: number, Dl: number) =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number) =>\n (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al: number, Bl: number, Cl: number, Dl: number, El: number) =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) =>\n (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n", "/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nexport function assertNumber(n) {\n if (!Number.isSafeInteger(n))\n throw new Error(`Wrong integer: ${n}`);\n}\nfunction chain(...args) {\n const wrap = (a, b) => (c) => a(b(c));\n const encode = Array.from(args)\n .reverse()\n .reduce((acc, i) => (acc ? wrap(acc, i.encode) : i.encode), undefined);\n const decode = args.reduce((acc, i) => (acc ? wrap(acc, i.decode) : i.decode), undefined);\n return { encode, decode };\n}\nfunction alphabet(alphabet) {\n return {\n encode: (digits) => {\n if (!Array.isArray(digits) || (digits.length && typeof digits[0] !== 'number'))\n throw new Error('alphabet.encode input should be an array of numbers');\n return digits.map((i) => {\n assertNumber(i);\n if (i < 0 || i >= alphabet.length)\n throw new Error(`Digit index outside alphabet: ${i} (alphabet: ${alphabet.length})`);\n return alphabet[i];\n });\n },\n decode: (input) => {\n if (!Array.isArray(input) || (input.length && typeof input[0] !== 'string'))\n throw new Error('alphabet.decode input should be array of strings');\n return input.map((letter) => {\n if (typeof letter !== 'string')\n throw new Error(`alphabet.decode: not string element=${letter}`);\n const index = alphabet.indexOf(letter);\n if (index === -1)\n throw new Error(`Unknown letter: \"${letter}\". Allowed: ${alphabet}`);\n return index;\n });\n },\n };\n}\nfunction join(separator = '') {\n if (typeof separator !== 'string')\n throw new Error('join separator should be string');\n return {\n encode: (from) => {\n if (!Array.isArray(from) || (from.length && typeof from[0] !== 'string'))\n throw new Error('join.encode input should be array of strings');\n for (let i of from)\n if (typeof i !== 'string')\n throw new Error(`join.encode: non-string input=${i}`);\n return from.join(separator);\n },\n decode: (to) => {\n if (typeof to !== 'string')\n throw new Error('join.decode input should be string');\n return to.split(separator);\n },\n };\n}\nfunction padding(bits, chr = '=') {\n assertNumber(bits);\n if (typeof chr !== 'string')\n throw new Error('padding chr should be string');\n return {\n encode(data) {\n if (!Array.isArray(data) || (data.length && typeof data[0] !== 'string'))\n throw new Error('padding.encode input should be array of strings');\n for (let i of data)\n if (typeof i !== 'string')\n throw new Error(`padding.encode: non-string input=${i}`);\n while ((data.length * bits) % 8)\n data.push(chr);\n return data;\n },\n decode(input) {\n if (!Array.isArray(input) || (input.length && typeof input[0] !== 'string'))\n throw new Error('padding.encode input should be array of strings');\n for (let i of input)\n if (typeof i !== 'string')\n throw new Error(`padding.decode: non-string input=${i}`);\n let end = input.length;\n if ((end * bits) % 8)\n throw new Error('Invalid padding: string should have whole number of bytes');\n for (; end > 0 && input[end - 1] === chr; end--) {\n if (!(((end - 1) * bits) % 8))\n throw new Error('Invalid padding: string has too much padding');\n }\n return input.slice(0, end);\n },\n };\n}\nfunction normalize(fn) {\n if (typeof fn !== 'function')\n throw new Error('normalize fn should be function');\n return { encode: (from) => from, decode: (to) => fn(to) };\n}\nfunction convertRadix(data, from, to) {\n if (from < 2)\n throw new Error(`convertRadix: wrong from=${from}, base cannot be less than 2`);\n if (to < 2)\n throw new Error(`convertRadix: wrong to=${to}, base cannot be less than 2`);\n if (!Array.isArray(data))\n throw new Error('convertRadix: data should be array');\n if (!data.length)\n return [];\n let pos = 0;\n const res = [];\n const digits = Array.from(data);\n digits.forEach((d) => {\n assertNumber(d);\n if (d < 0 || d >= from)\n throw new Error(`Wrong integer: ${d}`);\n });\n while (true) {\n let carry = 0;\n let done = true;\n for (let i = pos; i < digits.length; i++) {\n const digit = digits[i];\n const digitBase = from * carry + digit;\n if (!Number.isSafeInteger(digitBase) ||\n (from * carry) / from !== carry ||\n digitBase - digit !== from * carry) {\n throw new Error('convertRadix: carry overflow');\n }\n carry = digitBase % to;\n digits[i] = Math.floor(digitBase / to);\n if (!Number.isSafeInteger(digits[i]) || digits[i] * to + carry !== digitBase)\n throw new Error('convertRadix: carry overflow');\n if (!done)\n continue;\n else if (!digits[i])\n pos = i;\n else\n done = false;\n }\n res.push(carry);\n if (done)\n break;\n }\n for (let i = 0; i < data.length - 1 && data[i] === 0; i++)\n res.push(0);\n return res.reverse();\n}\nconst gcd = (a, b) => (!b ? a : gcd(b, a % b));\nconst radix2carry = (from, to) => from + (to - gcd(from, to));\nfunction convertRadix2(data, from, to, padding) {\n if (!Array.isArray(data))\n throw new Error('convertRadix2: data should be array');\n if (from <= 0 || from > 32)\n throw new Error(`convertRadix2: wrong from=${from}`);\n if (to <= 0 || to > 32)\n throw new Error(`convertRadix2: wrong to=${to}`);\n if (radix2carry(from, to) > 32) {\n throw new Error(`convertRadix2: carry overflow from=${from} to=${to} carryBits=${radix2carry(from, to)}`);\n }\n let carry = 0;\n let pos = 0;\n const mask = 2 ** to - 1;\n const res = [];\n for (const n of data) {\n assertNumber(n);\n if (n >= 2 ** from)\n throw new Error(`convertRadix2: invalid data word=${n} from=${from}`);\n carry = (carry << from) | n;\n if (pos + from > 32)\n throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from}`);\n pos += from;\n for (; pos >= to; pos -= to)\n res.push(((carry >> (pos - to)) & mask) >>> 0);\n carry &= 2 ** pos - 1;\n }\n carry = (carry << (to - pos)) & mask;\n if (!padding && pos >= from)\n throw new Error('Excess padding');\n if (!padding && carry)\n throw new Error(`Non-zero padding: ${carry}`);\n if (padding && pos > 0)\n res.push(carry >>> 0);\n return res;\n}\nfunction radix(num) {\n assertNumber(num);\n return {\n encode: (bytes) => {\n if (!(bytes instanceof Uint8Array))\n throw new Error('radix.encode input should be Uint8Array');\n return convertRadix(Array.from(bytes), 2 ** 8, num);\n },\n decode: (digits) => {\n if (!Array.isArray(digits) || (digits.length && typeof digits[0] !== 'number'))\n throw new Error('radix.decode input should be array of strings');\n return Uint8Array.from(convertRadix(digits, num, 2 ** 8));\n },\n };\n}\nfunction radix2(bits, revPadding = false) {\n assertNumber(bits);\n if (bits <= 0 || bits > 32)\n throw new Error('radix2: bits should be in (0..32]');\n if (radix2carry(8, bits) > 32 || radix2carry(bits, 8) > 32)\n throw new Error('radix2: carry overflow');\n return {\n encode: (bytes) => {\n if (!(bytes instanceof Uint8Array))\n throw new Error('radix2.encode input should be Uint8Array');\n return convertRadix2(Array.from(bytes), 8, bits, !revPadding);\n },\n decode: (digits) => {\n if (!Array.isArray(digits) || (digits.length && typeof digits[0] !== 'number'))\n throw new Error('radix2.decode input should be array of strings');\n return Uint8Array.from(convertRadix2(digits, bits, 8, revPadding));\n },\n };\n}\nfunction unsafeWrapper(fn) {\n if (typeof fn !== 'function')\n throw new Error('unsafeWrapper fn should be function');\n return function (...args) {\n try {\n return fn.apply(null, args);\n }\n catch (e) { }\n };\n}\nfunction checksum(len, fn) {\n assertNumber(len);\n if (typeof fn !== 'function')\n throw new Error('checksum fn should be function');\n return {\n encode(data) {\n if (!(data instanceof Uint8Array))\n throw new Error('checksum.encode: input should be Uint8Array');\n const checksum = fn(data).slice(0, len);\n const res = new Uint8Array(data.length + len);\n res.set(data);\n res.set(checksum, data.length);\n return res;\n },\n decode(data) {\n if (!(data instanceof Uint8Array))\n throw new Error('checksum.decode: input should be Uint8Array');\n const payload = data.slice(0, -len);\n const newChecksum = fn(payload).slice(0, len);\n const oldChecksum = data.slice(-len);\n for (let i = 0; i < len; i++)\n if (newChecksum[i] !== oldChecksum[i])\n throw new Error('Invalid checksum');\n return payload;\n },\n };\n}\nexport const utils = { alphabet, chain, checksum, radix, radix2, join, padding };\nexport const base16 = chain(radix2(4), alphabet('0123456789ABCDEF'), join(''));\nexport const base32 = chain(radix2(5), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'), padding(5), join(''));\nexport const base32hex = chain(radix2(5), alphabet('0123456789ABCDEFGHIJKLMNOPQRSTUV'), padding(5), join(''));\nexport const base32crockford = chain(radix2(5), alphabet('0123456789ABCDEFGHJKMNPQRSTVWXYZ'), join(''), normalize((s) => s.toUpperCase().replace(/O/g, '0').replace(/[IL]/g, '1')));\nexport const base64 = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), padding(6), join(''));\nexport const base64url = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), padding(6), join(''));\nconst genBase58 = (abc) => chain(radix(58), alphabet(abc), join(''));\nexport const base58 = genBase58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');\nexport const base58flickr = genBase58('123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ');\nexport const base58xrp = genBase58('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz');\nconst XMR_BLOCK_LEN = [0, 2, 3, 5, 6, 7, 9, 10, 11];\nexport const base58xmr = {\n encode(data) {\n let res = '';\n for (let i = 0; i < data.length; i += 8) {\n const block = data.subarray(i, i + 8);\n res += base58.encode(block).padStart(XMR_BLOCK_LEN[block.length], '1');\n }\n return res;\n },\n decode(str) {\n let res = [];\n for (let i = 0; i < str.length; i += 11) {\n const slice = str.slice(i, i + 11);\n const blockLen = XMR_BLOCK_LEN.indexOf(slice.length);\n const block = base58.decode(slice);\n for (let j = 0; j < block.length - blockLen; j++) {\n if (block[j] !== 0)\n throw new Error('base58xmr: wrong padding');\n }\n res = res.concat(Array.from(block.slice(block.length - blockLen)));\n }\n return Uint8Array.from(res);\n },\n};\nexport const base58check = (sha256) => chain(checksum(4, (data) => sha256(sha256(data))), base58);\nconst BECH_ALPHABET = chain(alphabet('qpzry9x8gf2tvdw0s3jn54khce6mua7l'), join(''));\nconst POLYMOD_GENERATORS = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3];\nfunction bech32Polymod(pre) {\n const b = pre >> 25;\n let chk = (pre & 0x1ffffff) << 5;\n for (let i = 0; i < POLYMOD_GENERATORS.length; i++) {\n if (((b >> i) & 1) === 1)\n chk ^= POLYMOD_GENERATORS[i];\n }\n return chk;\n}\nfunction bechChecksum(prefix, words, encodingConst = 1) {\n const len = prefix.length;\n let chk = 1;\n for (let i = 0; i < len; i++) {\n const c = prefix.charCodeAt(i);\n if (c < 33 || c > 126)\n throw new Error(`Invalid prefix (${prefix})`);\n chk = bech32Polymod(chk) ^ (c >> 5);\n }\n chk = bech32Polymod(chk);\n for (let i = 0; i < len; i++)\n chk = bech32Polymod(chk) ^ (prefix.charCodeAt(i) & 0x1f);\n for (let v of words)\n chk = bech32Polymod(chk) ^ v;\n for (let i = 0; i < 6; i++)\n chk = bech32Polymod(chk);\n chk ^= encodingConst;\n return BECH_ALPHABET.encode(convertRadix2([chk % 2 ** 30], 30, 5, false));\n}\nfunction genBech32(encoding) {\n const ENCODING_CONST = encoding === 'bech32' ? 1 : 0x2bc830a3;\n const _words = radix2(5);\n const fromWords = _words.decode;\n const toWords = _words.encode;\n const fromWordsUnsafe = unsafeWrapper(fromWords);\n function encode(prefix, words, limit = 90) {\n if (typeof prefix !== 'string')\n throw new Error(`bech32.encode prefix should be string, not ${typeof prefix}`);\n if (!Array.isArray(words) || (words.length && typeof words[0] !== 'number'))\n throw new Error(`bech32.encode words should be array of numbers, not ${typeof words}`);\n const actualLength = prefix.length + 7 + words.length;\n if (limit !== false && actualLength > limit)\n throw new TypeError(`Length ${actualLength} exceeds limit ${limit}`);\n prefix = prefix.toLowerCase();\n return `${prefix}1${BECH_ALPHABET.encode(words)}${bechChecksum(prefix, words, ENCODING_CONST)}`;\n }\n function decode(str, limit = 90) {\n if (typeof str !== 'string')\n throw new Error(`bech32.decode input should be string, not ${typeof str}`);\n if (str.length < 8 || (limit !== false && str.length > limit))\n throw new TypeError(`Wrong string length: ${str.length} (${str}). Expected (8..${limit})`);\n const lowered = str.toLowerCase();\n if (str !== lowered && str !== str.toUpperCase())\n throw new Error(`String must be lowercase or uppercase`);\n str = lowered;\n const sepIndex = str.lastIndexOf('1');\n if (sepIndex === 0 || sepIndex === -1)\n throw new Error(`Letter \"1\" must be present between prefix and data only`);\n const prefix = str.slice(0, sepIndex);\n const _words = str.slice(sepIndex + 1);\n if (_words.length < 6)\n throw new Error('Data must be at least 6 characters long');\n const words = BECH_ALPHABET.decode(_words).slice(0, -6);\n const sum = bechChecksum(prefix, words, ENCODING_CONST);\n if (!_words.endsWith(sum))\n throw new Error(`Invalid checksum in ${str}: expected \"${sum}\"`);\n return { prefix, words };\n }\n const decodeUnsafe = unsafeWrapper(decode);\n function decodeToBytes(str) {\n const { prefix, words } = decode(str, false);\n return { prefix, words, bytes: fromWords(words) };\n }\n return { encode, decode, decodeToBytes, decodeUnsafe, fromWords, fromWordsUnsafe, toWords };\n}\nexport const bech32 = genBech32('bech32');\nexport const bech32m = genBech32('bech32m');\nexport const utf8 = {\n encode: (data) => new TextDecoder().decode(data),\n decode: (str) => new TextEncoder().encode(str),\n};\nexport const hex = chain(radix2(4), alphabet('0123456789abcdef'), join(''), normalize((s) => {\n if (typeof s !== 'string' || s.length % 2)\n throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);\n return s.toLowerCase();\n}));\nconst CODERS = {\n utf8, hex, base16, base32, base64, base64url, base58, base58xmr\n};\nconst coderTypeError = `Invalid encoding type. Available types: ${Object.keys(CODERS).join(', ')}`;\nexport const bytesToString = (type, bytes) => {\n if (typeof type !== 'string' || !CODERS.hasOwnProperty(type))\n throw new TypeError(coderTypeError);\n if (!(bytes instanceof Uint8Array))\n throw new TypeError('bytesToString() expects Uint8Array');\n return CODERS[type].encode(bytes);\n};\nexport const str = bytesToString;\nexport const stringToBytes = (type, str) => {\n if (!CODERS.hasOwnProperty(type))\n throw new TypeError(coderTypeError);\n if (typeof str !== 'string')\n throw new TypeError('stringToBytes() expects string');\n return CODERS[type].decode(str);\n};\nexport const bytes = stringToBytes;\n", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aToU8a } from '@polkadot/util';\n\n// re-export the type so *.d.ts files don't have ../src imports\n\n/** @internal */\nexport function createDecode({\n coder,\n ipfs\n}, validate) {\n return (value, ipfsCompat) => {\n validate(value, ipfsCompat);\n return coder.decode(ipfs && ipfsCompat ? value.substring(1) : value);\n };\n}\n\n/** @internal */\nexport function createEncode({\n coder,\n ipfs\n}) {\n return (value, ipfsCompat) => {\n const out = coder.encode(u8aToU8a(value));\n return ipfs && ipfsCompat ? `${ipfs}${out}` : out;\n };\n}\n\n/** @internal */\nexport function createIs(validate) {\n return (value, ipfsCompat) => {\n try {\n return validate(value, ipfsCompat);\n } catch (error) {\n return false;\n }\n };\n}\n\n/** @internal */\nexport function createValidate({\n chars,\n ipfs,\n type\n}) {\n return (value, ipfsCompat) => {\n if (!value || typeof value !== 'string') {\n throw new Error(`Expected non-null, non-empty ${type} string input`);\n }\n if (ipfs && ipfsCompat && value[0] !== ipfs) {\n throw new Error(`Expected ipfs-compatible ${type} to start with '${ipfs}'`);\n }\n for (let i = ipfsCompat ? 1 : 0; i < value.length; i++) {\n if (!(chars.includes(value[i]) || value[i] === '=' && (i === value.length - 1 || !chars.includes(value[i + 1])))) {\n throw new Error(`Invalid ${type} character \"${value[i]}\" (0x${value.charCodeAt(i).toString(16)}) at index ${i}`);\n }\n }\n return true;\n };\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { base58 } from '@scure/base';\nimport { createDecode, createEncode, createIs, createValidate } from \"../base32/helpers.js\";\nconst config = {\n chars: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz',\n coder: base58,\n ipfs: 'z',\n type: 'base58'\n};\n\n/**\n * @name base58Validate\n * @summary Validates a base58 value.\n * @description\n * Validates that the supplied value is valid base58, throwing exceptions if not\n */\nexport const base58Validate = /*#__PURE__*/createValidate(config);\n\n/**\n * @name base58Decode\n * @summary Decodes a base58 value.\n * @description\n * From the provided input, decode the base58 and return the result as an `Uint8Array`.\n */\nexport const base58Decode = /*#__PURE__*/createDecode(config, base58Validate);\n\n/**\n* @name base58Encode\n* @summary Creates a base58 value.\n* @description\n* From the provided input, create the base58 and return the result as a string.\n*/\nexport const base58Encode = /*#__PURE__*/createEncode(config);\n\n/**\n* @name isBase58\n* @description Checks if the input is in base58, returning true/false\n*/\nexport const isBase58 = /*#__PURE__*/createIs(base58Validate);", "import assert from './_assert.js';\nimport { Hash, Input, toBytes, u32 } from './utils.js';\n// prettier-ignore\nexport const SIGMA = new Uint8Array([\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,\n 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,\n 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,\n 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,\n 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,\n 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11,\n 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10,\n 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5,\n 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0,\n // For BLAKE2b, the two extra permutations for rounds 10 and 11 are SIGMA[10..11] = SIGMA[0..1].\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,\n]);\n\nexport type BlakeOpts = {\n dkLen?: number;\n key?: Input;\n salt?: Input;\n personalization?: Input;\n};\n\nexport abstract class BLAKE2> extends Hash {\n protected abstract compress(msg: Uint32Array, offset: number, isLast: boolean): void;\n protected abstract get(): number[];\n protected abstract set(...args: number[]): void;\n abstract destroy(): void;\n protected buffer: Uint8Array;\n protected buffer32: Uint32Array;\n protected length: number = 0;\n protected pos: number = 0;\n protected finished = false;\n protected destroyed = false;\n\n constructor(\n readonly blockLen: number,\n public outputLen: number,\n opts: BlakeOpts = {},\n keyLen: number,\n saltLen: number,\n persLen: number\n ) {\n super();\n assert.number(blockLen);\n assert.number(outputLen);\n assert.number(keyLen);\n if (outputLen < 0 || outputLen > keyLen)\n throw new Error('Blake2: outputLen bigger than keyLen');\n if (opts.key !== undefined && (opts.key.length < 1 || opts.key.length > keyLen))\n throw new Error(`Key should be up 1..${keyLen} byte long or undefined`);\n if (opts.salt !== undefined && opts.salt.length !== saltLen)\n throw new Error(`Salt should be ${saltLen} byte long or undefined`);\n if (opts.personalization !== undefined && opts.personalization.length !== persLen)\n throw new Error(`Personalization should be ${persLen} byte long or undefined`);\n this.buffer32 = u32((this.buffer = new Uint8Array(blockLen)));\n }\n update(data: Input) {\n assert.exists(this);\n // Main difference with other hashes: there is flag for last block,\n // so we cannot process current block before we know that there\n // is the next one. This significantly complicates logic and reduces ability\n // to do zero-copy processing\n const { blockLen, buffer, buffer32 } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n // If buffer is full and we still have input (don't process last block, same as blake2s)\n if (this.pos === blockLen) {\n this.compress(buffer32, 0, false);\n this.pos = 0;\n }\n const take = Math.min(blockLen - this.pos, len - pos);\n const dataOffset = data.byteOffset + pos;\n // full block && aligned to 4 bytes && not last in input\n if (take === blockLen && !(dataOffset % 4) && pos + take < len) {\n const data32 = new Uint32Array(data.buffer, dataOffset, Math.floor((len - pos) / 4));\n for (let pos32 = 0; pos + blockLen < len; pos32 += buffer32.length, pos += blockLen) {\n this.length += blockLen;\n this.compress(data32, pos32, false);\n }\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n this.length += take;\n pos += take;\n }\n return this;\n }\n digestInto(out: Uint8Array) {\n assert.exists(this);\n assert.output(out, this);\n const { pos, buffer32 } = this;\n this.finished = true;\n // Padding\n this.buffer.subarray(pos).fill(0);\n this.compress(buffer32, 0, true);\n const out32 = u32(out);\n this.get().forEach((v, i) => (out32[i] = v));\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to?: T): T {\n const { buffer, length, finished, destroyed, outputLen, pos } = this;\n to ||= new (this.constructor as any)({ dkLen: outputLen }) as T;\n to.set(...this.get());\n to.length = length;\n to.finished = finished;\n to.destroyed = destroyed;\n to.outputLen = outputLen;\n to.buffer.set(buffer);\n to.pos = pos;\n return to;\n }\n}\n", "import { BLAKE2, BlakeOpts, SIGMA } from './_blake2.js';\nimport u64 from './_u64.js';\nimport { toBytes, u32, wrapConstructorWithOpts } from './utils.js';\n\n// Same as SHA-512 but LE\n// prettier-ignore\nconst IV = new Uint32Array([\n 0xf3bcc908, 0x6a09e667, 0x84caa73b, 0xbb67ae85, 0xfe94f82b, 0x3c6ef372, 0x5f1d36f1, 0xa54ff53a,\n 0xade682d1, 0x510e527f, 0x2b3e6c1f, 0x9b05688c, 0xfb41bd6b, 0x1f83d9ab, 0x137e2179, 0x5be0cd19\n]);\n// Temporary buffer\nconst BUF = new Uint32Array(32);\n\n// Mixing function G splitted in two halfs\nfunction G1(a: number, b: number, c: number, d: number, msg: Uint32Array, x: number) {\n // NOTE: V is LE here\n const Xl = msg[x], Xh = msg[x + 1]; // prettier-ignore\n let Al = BUF[2 * a], Ah = BUF[2 * a + 1]; // prettier-ignore\n let Bl = BUF[2 * b], Bh = BUF[2 * b + 1]; // prettier-ignore\n let Cl = BUF[2 * c], Ch = BUF[2 * c + 1]; // prettier-ignore\n let Dl = BUF[2 * d], Dh = BUF[2 * d + 1]; // prettier-ignore\n // v[a] = (v[a] + v[b] + x) | 0;\n let ll = u64.add3L(Al, Bl, Xl);\n Ah = u64.add3H(ll, Ah, Bh, Xh);\n Al = ll | 0;\n // v[d] = rotr(v[d] ^ v[a], 32)\n ({ Dh, Dl } = { Dh: Dh ^ Ah, Dl: Dl ^ Al });\n ({ Dh, Dl } = { Dh: u64.rotr32H(Dh, Dl), Dl: u64.rotr32L(Dh, Dl) });\n // v[c] = (v[c] + v[d]) | 0;\n ({ h: Ch, l: Cl } = u64.add(Ch, Cl, Dh, Dl));\n // v[b] = rotr(v[b] ^ v[c], 24)\n ({ Bh, Bl } = { Bh: Bh ^ Ch, Bl: Bl ^ Cl });\n ({ Bh, Bl } = { Bh: u64.rotrSH(Bh, Bl, 24), Bl: u64.rotrSL(Bh, Bl, 24) });\n (BUF[2 * a] = Al), (BUF[2 * a + 1] = Ah);\n (BUF[2 * b] = Bl), (BUF[2 * b + 1] = Bh);\n (BUF[2 * c] = Cl), (BUF[2 * c + 1] = Ch);\n (BUF[2 * d] = Dl), (BUF[2 * d + 1] = Dh);\n}\n\nfunction G2(a: number, b: number, c: number, d: number, msg: Uint32Array, x: number) {\n // NOTE: V is LE here\n const Xl = msg[x], Xh = msg[x + 1]; // prettier-ignore\n let Al = BUF[2 * a], Ah = BUF[2 * a + 1]; // prettier-ignore\n let Bl = BUF[2 * b], Bh = BUF[2 * b + 1]; // prettier-ignore\n let Cl = BUF[2 * c], Ch = BUF[2 * c + 1]; // prettier-ignore\n let Dl = BUF[2 * d], Dh = BUF[2 * d + 1]; // prettier-ignore\n // v[a] = (v[a] + v[b] + x) | 0;\n let ll = u64.add3L(Al, Bl, Xl);\n Ah = u64.add3H(ll, Ah, Bh, Xh);\n Al = ll | 0;\n // v[d] = rotr(v[d] ^ v[a], 16)\n ({ Dh, Dl } = { Dh: Dh ^ Ah, Dl: Dl ^ Al });\n ({ Dh, Dl } = { Dh: u64.rotrSH(Dh, Dl, 16), Dl: u64.rotrSL(Dh, Dl, 16) });\n // v[c] = (v[c] + v[d]) | 0;\n ({ h: Ch, l: Cl } = u64.add(Ch, Cl, Dh, Dl));\n // v[b] = rotr(v[b] ^ v[c], 63)\n ({ Bh, Bl } = { Bh: Bh ^ Ch, Bl: Bl ^ Cl });\n ({ Bh, Bl } = { Bh: u64.rotrBH(Bh, Bl, 63), Bl: u64.rotrBL(Bh, Bl, 63) });\n (BUF[2 * a] = Al), (BUF[2 * a + 1] = Ah);\n (BUF[2 * b] = Bl), (BUF[2 * b + 1] = Bh);\n (BUF[2 * c] = Cl), (BUF[2 * c + 1] = Ch);\n (BUF[2 * d] = Dl), (BUF[2 * d + 1] = Dh);\n}\n\nclass BLAKE2b extends BLAKE2 {\n // Same as SHA-512, but LE\n private v0l = IV[0] | 0;\n private v0h = IV[1] | 0;\n private v1l = IV[2] | 0;\n private v1h = IV[3] | 0;\n private v2l = IV[4] | 0;\n private v2h = IV[5] | 0;\n private v3l = IV[6] | 0;\n private v3h = IV[7] | 0;\n private v4l = IV[8] | 0;\n private v4h = IV[9] | 0;\n private v5l = IV[10] | 0;\n private v5h = IV[11] | 0;\n private v6l = IV[12] | 0;\n private v6h = IV[13] | 0;\n private v7l = IV[14] | 0;\n private v7h = IV[15] | 0;\n\n constructor(opts: BlakeOpts = {}) {\n super(128, opts.dkLen === undefined ? 64 : opts.dkLen, opts, 64, 16, 16);\n const keyLength = opts.key ? opts.key.length : 0;\n this.v0l ^= this.outputLen | (keyLength << 8) | (0x01 << 16) | (0x01 << 24);\n if (opts.salt) {\n const salt = u32(toBytes(opts.salt));\n this.v4l ^= salt[0];\n this.v4h ^= salt[1];\n this.v5l ^= salt[2];\n this.v5h ^= salt[3];\n }\n if (opts.personalization) {\n const pers = u32(toBytes(opts.personalization));\n this.v6l ^= pers[0];\n this.v6h ^= pers[1];\n this.v7l ^= pers[2];\n this.v7h ^= pers[3];\n }\n if (opts.key) {\n // Pad to blockLen and update\n const tmp = new Uint8Array(this.blockLen);\n tmp.set(toBytes(opts.key));\n this.update(tmp);\n }\n }\n // prettier-ignore\n protected get(): [\n number, number, number, number, number, number, number, number,\n number, number, number, number, number, number, number, number\n ] {\n let {v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h} = this;\n return [v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h];\n }\n // prettier-ignore\n protected set(\n v0l: number, v0h: number, v1l: number, v1h: number,\n v2l: number, v2h: number, v3l: number, v3h: number,\n v4l: number, v4h: number, v5l: number, v5h: number,\n v6l: number, v6h: number, v7l: number, v7h: number\n ) {\n this.v0l = v0l | 0;\n this.v0h = v0h | 0;\n this.v1l = v1l | 0;\n this.v1h = v1h | 0;\n this.v2l = v2l | 0;\n this.v2h = v2h | 0;\n this.v3l = v3l | 0;\n this.v3h = v3h | 0;\n this.v4l = v4l | 0;\n this.v4h = v4h | 0;\n this.v5l = v5l | 0;\n this.v5h = v5h | 0;\n this.v6l = v6l | 0;\n this.v6h = v6h | 0;\n this.v7l = v7l | 0;\n this.v7h = v7h | 0;\n }\n protected compress(msg: Uint32Array, offset: number, isLast: boolean) {\n this.get().forEach((v, i) => (BUF[i] = v)); // First half from state.\n BUF.set(IV, 16); // Second half from IV.\n let { h, l } = u64.fromBig(BigInt(this.length));\n BUF[24] = IV[8] ^ l; // Low word of the offset.\n BUF[25] = IV[9] ^ h; // High word.\n // Invert all bits for last block\n if (isLast) {\n BUF[28] = ~BUF[28];\n BUF[29] = ~BUF[29];\n }\n let j = 0;\n const s = SIGMA;\n for (let i = 0; i < 12; i++) {\n G1(0, 4, 8, 12, msg, offset + 2 * s[j++]);\n G2(0, 4, 8, 12, msg, offset + 2 * s[j++]);\n G1(1, 5, 9, 13, msg, offset + 2 * s[j++]);\n G2(1, 5, 9, 13, msg, offset + 2 * s[j++]);\n G1(2, 6, 10, 14, msg, offset + 2 * s[j++]);\n G2(2, 6, 10, 14, msg, offset + 2 * s[j++]);\n G1(3, 7, 11, 15, msg, offset + 2 * s[j++]);\n G2(3, 7, 11, 15, msg, offset + 2 * s[j++]);\n\n G1(0, 5, 10, 15, msg, offset + 2 * s[j++]);\n G2(0, 5, 10, 15, msg, offset + 2 * s[j++]);\n G1(1, 6, 11, 12, msg, offset + 2 * s[j++]);\n G2(1, 6, 11, 12, msg, offset + 2 * s[j++]);\n G1(2, 7, 8, 13, msg, offset + 2 * s[j++]);\n G2(2, 7, 8, 13, msg, offset + 2 * s[j++]);\n G1(3, 4, 9, 14, msg, offset + 2 * s[j++]);\n G2(3, 4, 9, 14, msg, offset + 2 * s[j++]);\n }\n this.v0l ^= BUF[0] ^ BUF[16];\n this.v0h ^= BUF[1] ^ BUF[17];\n this.v1l ^= BUF[2] ^ BUF[18];\n this.v1h ^= BUF[3] ^ BUF[19];\n this.v2l ^= BUF[4] ^ BUF[20];\n this.v2h ^= BUF[5] ^ BUF[21];\n this.v3l ^= BUF[6] ^ BUF[22];\n this.v3h ^= BUF[7] ^ BUF[23];\n this.v4l ^= BUF[8] ^ BUF[24];\n this.v4h ^= BUF[9] ^ BUF[25];\n this.v5l ^= BUF[10] ^ BUF[26];\n this.v5h ^= BUF[11] ^ BUF[27];\n this.v6l ^= BUF[12] ^ BUF[28];\n this.v6h ^= BUF[13] ^ BUF[29];\n this.v7l ^= BUF[14] ^ BUF[30];\n this.v7h ^= BUF[15] ^ BUF[31];\n BUF.fill(0);\n }\n destroy() {\n this.destroyed = true;\n this.buffer32.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\n\n/**\n * BLAKE2b - optimized for 64-bit platforms. JS doesn't have uint64, so it's slower than BLAKE2s.\n * @param msg - message that would be hashed\n * @param opts - dkLen, key, salt, personalization\n */\nexport const blake2b = wrapConstructorWithOpts((opts) => new BLAKE2b(opts));\n", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { hasBigInt, u8aToHex, u8aToU8a } from '@polkadot/util';\nimport { isReady } from '@polkadot/wasm-crypto';\n\n// re-export so TS *.d.ts generation is correct\n\n/** @internal */\nexport function createAsHex(fn) {\n return (...args) => u8aToHex(fn(...args));\n}\n\n/** @internal */\nexport function createBitHasher(bitLength, fn) {\n return (data, onlyJs) => fn(data, bitLength, onlyJs);\n}\n\n/** @internal */\nexport function createDualHasher(wa, js) {\n return (value, bitLength = 256, onlyJs) => {\n const u8a = u8aToU8a(value);\n return !hasBigInt || !onlyJs && isReady() ? wa[bitLength](u8a) : js[bitLength](u8a);\n };\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { blake2b as blake2bJs } from '@noble/hashes/blake2b';\nimport { hasBigInt, u8aToU8a } from '@polkadot/util';\nimport { blake2b, isReady } from '@polkadot/wasm-crypto';\nimport { createAsHex } from \"../helpers.js\";\n\n/**\n * @name blake2AsU8a\n * @summary Creates a blake2b u8a from the input.\n * @description\n * From a `Uint8Array` input, create the blake2b and return the result as a u8a with the specified `bitLength`.\n * @example\n *
\n *\n * ```javascript\n * import { blake2AsU8a } from '@polkadot/util-crypto';\n *\n * blake2AsU8a('abc'); // => [0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d]\n * ```\n */\nexport function blake2AsU8a(data, bitLength = 256, key, onlyJs) {\n const byteLength = Math.ceil(bitLength / 8);\n const u8a = u8aToU8a(data);\n return !hasBigInt || !onlyJs && isReady() ? blake2b(u8a, u8aToU8a(key), byteLength) : blake2bJs(u8a, {\n dkLen: byteLength,\n key: key || undefined\n });\n}\n\n/**\n * @name blake2AsHex\n * @description Creates a blake2b hex from the input.\n */\nexport const blake2AsHex = createAsHex(blake2AsU8a);", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { stringToU8a, u8aConcat } from '@polkadot/util';\nimport { blake2AsU8a } from \"../blake2/asU8a.js\";\nconst SS58_PREFIX = stringToU8a('SS58PRE');\nexport function sshash(key) {\n return blake2AsU8a(u8aConcat(SS58_PREFIX, key), 512);\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { sshash } from \"./sshash.js\";\nexport function checkAddressChecksum(decoded) {\n const ss58Length = decoded[0] & 0b01000000 ? 2 : 1;\n const ss58Decoded = ss58Length === 1 ? decoded[0] : (decoded[0] & 0b00111111) << 2 | decoded[1] >> 6 | (decoded[1] & 0b00111111) << 8;\n\n // 32/33 bytes public + 2 bytes checksum + prefix\n const isPublicKey = [34 + ss58Length, 35 + ss58Length].includes(decoded.length);\n const length = decoded.length - (isPublicKey ? 2 : 1);\n\n // calculate the hash and do the checksum byte checks\n const hash = sshash(decoded.subarray(0, length));\n const isValid = (decoded[0] & 0b10000000) === 0 && ![46, 47].includes(decoded[0]) && (isPublicKey ? decoded[decoded.length - 2] === hash[0] && decoded[decoded.length - 1] === hash[1] : decoded[decoded.length - 1] === hash[0]);\n return [isValid, length, ss58Length, ss58Decoded];\n}", "// Copyright (C) 2021-2024 Parity Technologies (UK) Ltd.\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// \thttp://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport default [\n\t{\n\t\t\"prefix\": 0,\n\t\t\"network\": \"polkadot\",\n\t\t\"displayName\": \"Polkadot Relay Chain\",\n\t\t\"symbols\": [\n\t\t\t\"DOT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://polkadot.network\"\n\t},\n\t{\n\t\t\"prefix\": 1,\n\t\t\"network\": \"BareSr25519\",\n\t\t\"displayName\": \"Bare 32-bit Schnorr/Ristretto (S/R 25519) public key.\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"Sr25519\",\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 2,\n\t\t\"network\": \"kusama\",\n\t\t\"displayName\": \"Kusama Relay Chain\",\n\t\t\"symbols\": [\n\t\t\t\"KSM\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://kusama.network\"\n\t},\n\t{\n\t\t\"prefix\": 3,\n\t\t\"network\": \"BareEd25519\",\n\t\t\"displayName\": \"Bare 32-bit Ed25519 public key.\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"Ed25519\",\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 4,\n\t\t\"network\": \"katalchain\",\n\t\t\"displayName\": \"Katal Chain\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 5,\n\t\t\"network\": \"astar\",\n\t\t\"displayName\": \"Astar Network\",\n\t\t\"symbols\": [\n\t\t\t\"ASTR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://astar.network\"\n\t},\n\t{\n\t\t\"prefix\": 6,\n\t\t\"network\": \"bifrost\",\n\t\t\"displayName\": \"Bifrost\",\n\t\t\"symbols\": [\n\t\t\t\"BNC\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://bifrost.finance/\"\n\t},\n\t{\n\t\t\"prefix\": 7,\n\t\t\"network\": \"edgeware\",\n\t\t\"displayName\": \"Edgeware\",\n\t\t\"symbols\": [\n\t\t\t\"EDG\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://edgewa.re\"\n\t},\n\t{\n\t\t\"prefix\": 8,\n\t\t\"network\": \"karura\",\n\t\t\"displayName\": \"Karura\",\n\t\t\"symbols\": [\n\t\t\t\"KAR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://karura.network/\"\n\t},\n\t{\n\t\t\"prefix\": 9,\n\t\t\"network\": \"reynolds\",\n\t\t\"displayName\": \"Laminar Reynolds Canary\",\n\t\t\"symbols\": [\n\t\t\t\"REY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"http://laminar.network/\"\n\t},\n\t{\n\t\t\"prefix\": 10,\n\t\t\"network\": \"acala\",\n\t\t\"displayName\": \"Acala\",\n\t\t\"symbols\": [\n\t\t\t\"ACA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://acala.network/\"\n\t},\n\t{\n\t\t\"prefix\": 11,\n\t\t\"network\": \"laminar\",\n\t\t\"displayName\": \"Laminar\",\n\t\t\"symbols\": [\n\t\t\t\"LAMI\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"http://laminar.network/\"\n\t},\n\t{\n\t\t\"prefix\": 12,\n\t\t\"network\": \"polymesh\",\n\t\t\"displayName\": \"Polymesh\",\n\t\t\"symbols\": [\n\t\t\t\"POLYX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t6\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://polymath.network/\"\n\t},\n\t{\n\t\t\"prefix\": 13,\n\t\t\"network\": \"integritee\",\n\t\t\"displayName\": \"Integritee\",\n\t\t\"symbols\": [\n\t\t\t\"TEER\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://integritee.network\"\n\t},\n\t{\n\t\t\"prefix\": 14,\n\t\t\"network\": \"totem\",\n\t\t\"displayName\": \"Totem\",\n\t\t\"symbols\": [\n\t\t\t\"TOTEM\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t0\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://totemaccounting.com\"\n\t},\n\t{\n\t\t\"prefix\": 15,\n\t\t\"network\": \"synesthesia\",\n\t\t\"displayName\": \"Synesthesia\",\n\t\t\"symbols\": [\n\t\t\t\"SYN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://synesthesia.network/\"\n\t},\n\t{\n\t\t\"prefix\": 16,\n\t\t\"network\": \"kulupu\",\n\t\t\"displayName\": \"Kulupu\",\n\t\t\"symbols\": [\n\t\t\t\"KLP\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://kulupu.network/\"\n\t},\n\t{\n\t\t\"prefix\": 17,\n\t\t\"network\": \"dark\",\n\t\t\"displayName\": \"Dark Mainnet\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 18,\n\t\t\"network\": \"darwinia\",\n\t\t\"displayName\": \"Darwinia Network\",\n\t\t\"symbols\": [\n\t\t\t\"RING\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"secp256k1\",\n\t\t\"website\": \"https://darwinia.network\"\n\t},\n\t{\n\t\t\"prefix\": 19,\n\t\t\"network\": \"watr\",\n\t\t\"displayName\": \"Watr Protocol\",\n\t\t\"symbols\": [\n\t\t\t\"WATR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.watr.org\"\n\t},\n\t{\n\t\t\"prefix\": 20,\n\t\t\"network\": \"stafi\",\n\t\t\"displayName\": \"Stafi\",\n\t\t\"symbols\": [\n\t\t\t\"FIS\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://stafi.io\"\n\t},\n\t{\n\t\t\"prefix\": 21,\n\t\t\"network\": \"karmachain\",\n\t\t\"displayName\": \"Karmacoin\",\n\t\t\"symbols\": [\n\t\t\t\"KCOIN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t6\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://karmaco.in\"\n\t},\n\t{\n\t\t\"prefix\": 22,\n\t\t\"network\": \"dock-pos-mainnet\",\n\t\t\"displayName\": \"Dock Mainnet\",\n\t\t\"symbols\": [\n\t\t\t\"DCK\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t6\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://dock.io\"\n\t},\n\t{\n\t\t\"prefix\": 23,\n\t\t\"network\": \"shift\",\n\t\t\"displayName\": \"ShiftNrg\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 24,\n\t\t\"network\": \"zero\",\n\t\t\"displayName\": \"ZERO\",\n\t\t\"symbols\": [\n\t\t\t\"ZERO\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://zero.io\"\n\t},\n\t{\n\t\t\"prefix\": 25,\n\t\t\"network\": \"zero-alphaville\",\n\t\t\"displayName\": \"ZERO Alphaville\",\n\t\t\"symbols\": [\n\t\t\t\"ZERO\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://zero.io\"\n\t},\n\t{\n\t\t\"prefix\": 26,\n\t\t\"network\": \"jupiter\",\n\t\t\"displayName\": \"Jupiter\",\n\t\t\"symbols\": [\n\t\t\t\"jDOT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://jupiter.patract.io\"\n\t},\n\t{\n\t\t\"prefix\": 27,\n\t\t\"network\": \"kabocha\",\n\t\t\"displayName\": \"Kabocha\",\n\t\t\"symbols\": [\n\t\t\t\"KAB\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://kabocha.network\"\n\t},\n\t{\n\t\t\"prefix\": 28,\n\t\t\"network\": \"subsocial\",\n\t\t\"displayName\": \"Subsocial\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 29,\n\t\t\"network\": \"cord\",\n\t\t\"displayName\": \"CORD Network\",\n\t\t\"symbols\": [\n\t\t\t\"DHI\",\n\t\t\t\"WAY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12,\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://cord.network/\"\n\t},\n\t{\n\t\t\"prefix\": 30,\n\t\t\"network\": \"phala\",\n\t\t\"displayName\": \"Phala Network\",\n\t\t\"symbols\": [\n\t\t\t\"PHA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://phala.network\"\n\t},\n\t{\n\t\t\"prefix\": 31,\n\t\t\"network\": \"litentry\",\n\t\t\"displayName\": \"Litentry Network\",\n\t\t\"symbols\": [\n\t\t\t\"LIT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://litentry.com/\"\n\t},\n\t{\n\t\t\"prefix\": 32,\n\t\t\"network\": \"robonomics\",\n\t\t\"displayName\": \"Robonomics\",\n\t\t\"symbols\": [\n\t\t\t\"XRT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t9\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://robonomics.network\"\n\t},\n\t{\n\t\t\"prefix\": 33,\n\t\t\"network\": \"datahighway\",\n\t\t\"displayName\": \"DataHighway\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 34,\n\t\t\"network\": \"ares\",\n\t\t\"displayName\": \"Ares Protocol\",\n\t\t\"symbols\": [\n\t\t\t\"ARES\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.aresprotocol.com/\"\n\t},\n\t{\n\t\t\"prefix\": 35,\n\t\t\"network\": \"vln\",\n\t\t\"displayName\": \"Valiu Liquidity Network\",\n\t\t\"symbols\": [\n\t\t\t\"USDv\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t15\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://valiu.com/\"\n\t},\n\t{\n\t\t\"prefix\": 36,\n\t\t\"network\": \"centrifuge\",\n\t\t\"displayName\": \"Centrifuge Chain\",\n\t\t\"symbols\": [\n\t\t\t\"CFG\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://centrifuge.io/\"\n\t},\n\t{\n\t\t\"prefix\": 37,\n\t\t\"network\": \"nodle\",\n\t\t\"displayName\": \"Nodle Chain\",\n\t\t\"symbols\": [\n\t\t\t\"NODL\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t11\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://nodle.io/\"\n\t},\n\t{\n\t\t\"prefix\": 38,\n\t\t\"network\": \"kilt\",\n\t\t\"displayName\": \"KILT Spiritnet\",\n\t\t\"symbols\": [\n\t\t\t\"KILT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t15\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://kilt.io/\"\n\t},\n\t{\n\t\t\"prefix\": 39,\n\t\t\"network\": \"mathchain\",\n\t\t\"displayName\": \"MathChain mainnet\",\n\t\t\"symbols\": [\n\t\t\t\"MATH\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://mathwallet.org\"\n\t},\n\t{\n\t\t\"prefix\": 40,\n\t\t\"network\": \"mathchain-testnet\",\n\t\t\"displayName\": \"MathChain testnet\",\n\t\t\"symbols\": [\n\t\t\t\"MATH\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://mathwallet.org\"\n\t},\n\t{\n\t\t\"prefix\": 41,\n\t\t\"network\": \"polimec\",\n\t\t\"displayName\": \"Polimec Protocol\",\n\t\t\"symbols\": [\n\t\t\t\"PLMC\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.polimec.org/\"\n\t},\n\t{\n\t\t\"prefix\": 42,\n\t\t\"network\": \"substrate\",\n\t\t\"displayName\": \"Substrate\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://substrate.io/\"\n\t},\n\t{\n\t\t\"prefix\": 43,\n\t\t\"network\": \"BareSecp256k1\",\n\t\t\"displayName\": \"Bare 32-bit ECDSA SECP-256k1 public key.\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"secp256k1\",\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 44,\n\t\t\"network\": \"chainx\",\n\t\t\"displayName\": \"ChainX\",\n\t\t\"symbols\": [\n\t\t\t\"PCX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t8\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://chainx.org/\"\n\t},\n\t{\n\t\t\"prefix\": 45,\n\t\t\"network\": \"uniarts\",\n\t\t\"displayName\": \"UniArts Network\",\n\t\t\"symbols\": [\n\t\t\t\"UART\",\n\t\t\t\"UINK\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12,\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://uniarts.me\"\n\t},\n\t{\n\t\t\"prefix\": 46,\n\t\t\"network\": \"reserved46\",\n\t\t\"displayName\": \"This prefix is reserved.\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": null,\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 47,\n\t\t\"network\": \"reserved47\",\n\t\t\"displayName\": \"This prefix is reserved.\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": null,\n\t\t\"website\": null\n\t},\n\t{\n\t\t\"prefix\": 48,\n\t\t\"network\": \"neatcoin\",\n\t\t\"displayName\": \"Neatcoin Mainnet\",\n\t\t\"symbols\": [\n\t\t\t\"NEAT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://neatcoin.org\"\n\t},\n\t{\n\t\t\"prefix\": 49,\n\t\t\"network\": \"picasso\",\n\t\t\"displayName\": \"Picasso\",\n\t\t\"symbols\": [\n\t\t\t\"PICA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://picasso.composable.finance\"\n\t},\n\t{\n\t\t\"prefix\": 50,\n\t\t\"network\": \"composable\",\n\t\t\"displayName\": \"Composable Finance\",\n\t\t\"symbols\": [\n\t\t\t\"LAYR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://composable.finance\"\n\t},\n\t{\n\t\t\"prefix\": 51,\n\t\t\"network\": \"oak\",\n\t\t\"displayName\": \"OAK Network\",\n\t\t\"symbols\": [\n\t\t\t\"OAK\",\n\t\t\t\"TUR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10,\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://oak.tech\"\n\t},\n\t{\n\t\t\"prefix\": 52,\n\t\t\"network\": \"KICO\",\n\t\t\"displayName\": \"KICO\",\n\t\t\"symbols\": [\n\t\t\t\"KICO\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t14\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://dico.io\"\n\t},\n\t{\n\t\t\"prefix\": 53,\n\t\t\"network\": \"DICO\",\n\t\t\"displayName\": \"DICO\",\n\t\t\"symbols\": [\n\t\t\t\"DICO\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t14\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://dico.io\"\n\t},\n\t{\n\t\t\"prefix\": 54,\n\t\t\"network\": \"cere\",\n\t\t\"displayName\": \"Cere Network\",\n\t\t\"symbols\": [\n\t\t\t\"CERE\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://cere.network\"\n\t},\n\t{\n\t\t\"prefix\": 55,\n\t\t\"network\": \"xxnetwork\",\n\t\t\"displayName\": \"xx network\",\n\t\t\"symbols\": [\n\t\t\t\"XX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t9\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://xx.network\"\n\t},\n\t{\n\t\t\"prefix\": 56,\n\t\t\"network\": \"pendulum\",\n\t\t\"displayName\": \"Pendulum chain\",\n\t\t\"symbols\": [\n\t\t\t\"PEN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://pendulumchain.org/\"\n\t},\n\t{\n\t\t\"prefix\": 57,\n\t\t\"network\": \"amplitude\",\n\t\t\"displayName\": \"Amplitude chain\",\n\t\t\"symbols\": [\n\t\t\t\"AMPE\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://pendulumchain.org/\"\n\t},\n\t{\n\t\t\"prefix\": 58,\n\t\t\"network\": \"eternal-civilization\",\n\t\t\"displayName\": \"Eternal Civilization\",\n\t\t\"symbols\": [\n\t\t\t\"ECC\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"http://www.ysknfr.cn/\"\n\t},\n\t{\n\t\t\"prefix\": 63,\n\t\t\"network\": \"hydradx\",\n\t\t\"displayName\": \"HydraDX\",\n\t\t\"symbols\": [\n\t\t\t\"HDX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://hydradx.io\"\n\t},\n\t{\n\t\t\"prefix\": 65,\n\t\t\"network\": \"aventus\",\n\t\t\"displayName\": \"Aventus Mainnet\",\n\t\t\"symbols\": [\n\t\t\t\"AVT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://aventus.io\"\n\t},\n\t{\n\t\t\"prefix\": 66,\n\t\t\"network\": \"crust\",\n\t\t\"displayName\": \"Crust Network\",\n\t\t\"symbols\": [\n\t\t\t\"CRU\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://crust.network\"\n\t},\n\t{\n\t\t\"prefix\": 67,\n\t\t\"network\": \"genshiro\",\n\t\t\"displayName\": \"Genshiro Network\",\n\t\t\"symbols\": [\n\t\t\t\"GENS\",\n\t\t\t\"EQD\",\n\t\t\t\"LPT0\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t9,\n\t\t\t9,\n\t\t\t9\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://genshiro.equilibrium.io\"\n\t},\n\t{\n\t\t\"prefix\": 68,\n\t\t\"network\": \"equilibrium\",\n\t\t\"displayName\": \"Equilibrium Network\",\n\t\t\"symbols\": [\n\t\t\t\"EQ\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t9\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://equilibrium.io\"\n\t},\n\t{\n\t\t\"prefix\": 69,\n\t\t\"network\": \"sora\",\n\t\t\"displayName\": \"SORA Network\",\n\t\t\"symbols\": [\n\t\t\t\"XOR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://sora.org\"\n\t},\n\t{\n\t\t\"prefix\": 71,\n\t\t\"network\": \"p3d\",\n\t\t\"displayName\": \"3DP network\",\n\t\t\"symbols\": [\n\t\t\t\"P3D\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://3dpass.org\"\n\t},\n\t{\n\t\t\"prefix\": 72,\n\t\t\"network\": \"p3dt\",\n\t\t\"displayName\": \"3DP test network\",\n\t\t\"symbols\": [\n\t\t\t\"P3Dt\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://3dpass.org\"\n\t},\n\t{\n\t\t\"prefix\": 73,\n\t\t\"network\": \"zeitgeist\",\n\t\t\"displayName\": \"Zeitgeist\",\n\t\t\"symbols\": [\n\t\t\t\"ZTG\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://zeitgeist.pm\"\n\t},\n\t{\n\t\t\"prefix\": 77,\n\t\t\"network\": \"manta\",\n\t\t\"displayName\": \"Manta network\",\n\t\t\"symbols\": [\n\t\t\t\"MANTA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://manta.network\"\n\t},\n\t{\n\t\t\"prefix\": 78,\n\t\t\"network\": \"calamari\",\n\t\t\"displayName\": \"Calamari: Manta Canary Network\",\n\t\t\"symbols\": [\n\t\t\t\"KMA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://manta.network\"\n\t},\n\t{\n\t\t\"prefix\": 81,\n\t\t\"network\": \"sora_dot_para\",\n\t\t\"displayName\": \"SORA Polkadot Parachain\",\n\t\t\"symbols\": [\n\t\t\t\"XOR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://sora.org\"\n\t},\n\t{\n\t\t\"prefix\": 88,\n\t\t\"network\": \"polkadex\",\n\t\t\"displayName\": \"Polkadex Mainnet\",\n\t\t\"symbols\": [\n\t\t\t\"PDEX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://polkadex.trade\"\n\t},\n\t{\n\t\t\"prefix\": 89,\n\t\t\"network\": \"polkadexparachain\",\n\t\t\"displayName\": \"Polkadex Parachain\",\n\t\t\"symbols\": [\n\t\t\t\"PDEX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://polkadex.trade\"\n\t},\n\t{\n\t\t\"prefix\": 90,\n\t\t\"network\": \"frequency\",\n\t\t\"displayName\": \"Frequency\",\n\t\t\"symbols\": [\n\t\t\t\"FRQCY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t8\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.frequency.xyz\"\n\t},\n\t{\n\t\t\"prefix\": 92,\n\t\t\"network\": \"anmol\",\n\t\t\"displayName\": \"Anmol Network\",\n\t\t\"symbols\": [\n\t\t\t\"ANML\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://anmol.network/\"\n\t},\n\t{\n\t\t\"prefix\": 93,\n\t\t\"network\": \"fragnova\",\n\t\t\"displayName\": \"Fragnova Network\",\n\t\t\"symbols\": [\n\t\t\t\"NOVA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://fragnova.com\"\n\t},\n\t{\n\t\t\"prefix\": 98,\n\t\t\"network\": \"polkasmith\",\n\t\t\"displayName\": \"PolkaSmith Canary Network\",\n\t\t\"symbols\": [\n\t\t\t\"PKS\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://polkafoundry.com\"\n\t},\n\t{\n\t\t\"prefix\": 99,\n\t\t\"network\": \"polkafoundry\",\n\t\t\"displayName\": \"PolkaFoundry Network\",\n\t\t\"symbols\": [\n\t\t\t\"PKF\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://polkafoundry.com\"\n\t},\n\t{\n\t\t\"prefix\": 100,\n\t\t\"network\": \"ibtida\",\n\t\t\"displayName\": \"Anmol Network Ibtida Canary network\",\n\t\t\"symbols\": [\n\t\t\t\"IANML\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://anmol.network/\"\n\t},\n\t{\n\t\t\"prefix\": 101,\n\t\t\"network\": \"origintrail-parachain\",\n\t\t\"displayName\": \"OriginTrail Parachain\",\n\t\t\"symbols\": [\n\t\t\t\"OTP\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://parachain.origintrail.io/\"\n\t},\n\t{\n\t\t\"prefix\": 105,\n\t\t\"network\": \"pontem-network\",\n\t\t\"displayName\": \"Pontem Network\",\n\t\t\"symbols\": [\n\t\t\t\"PONT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://pontem.network\"\n\t},\n\t{\n\t\t\"prefix\": 110,\n\t\t\"network\": \"heiko\",\n\t\t\"displayName\": \"Heiko\",\n\t\t\"symbols\": [\n\t\t\t\"HKO\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://parallel.fi/\"\n\t},\n\t{\n\t\t\"prefix\": 113,\n\t\t\"network\": \"integritee-incognito\",\n\t\t\"displayName\": \"Integritee Incognito\",\n\t\t\"symbols\": [],\n\t\t\"decimals\": [],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://integritee.network\"\n\t},\n\t{\n\t\t\"prefix\": 117,\n\t\t\"network\": \"tinker\",\n\t\t\"displayName\": \"Tinker\",\n\t\t\"symbols\": [\n\t\t\t\"TNKR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://invarch.network\"\n\t},\n\t{\n\t\t\"prefix\": 126,\n\t\t\"network\": \"joystream\",\n\t\t\"displayName\": \"Joystream\",\n\t\t\"symbols\": [\n\t\t\t\"JOY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.joystream.org\"\n\t},\n\t{\n\t\t\"prefix\": 128,\n\t\t\"network\": \"clover\",\n\t\t\"displayName\": \"Clover Finance\",\n\t\t\"symbols\": [\n\t\t\t\"CLV\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://clover.finance\"\n\t},\n\t{\n\t\t\"prefix\": 129,\n\t\t\"network\": \"dorafactory-polkadot\",\n\t\t\"displayName\": \"Dorafactory Polkadot Network\",\n\t\t\"symbols\": [\n\t\t\t\"DORA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://dorafactory.org\"\n\t},\n\t{\n\t\t\"prefix\": 131,\n\t\t\"network\": \"litmus\",\n\t\t\"displayName\": \"Litmus Network\",\n\t\t\"symbols\": [\n\t\t\t\"LIT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://litentry.com/\"\n\t},\n\t{\n\t\t\"prefix\": 136,\n\t\t\"network\": \"altair\",\n\t\t\"displayName\": \"Altair\",\n\t\t\"symbols\": [\n\t\t\t\"AIR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://centrifuge.io/\"\n\t},\n\t{\n\t\t\"prefix\": 137,\n\t\t\"network\": \"vara\",\n\t\t\"displayName\": \"Vara Network\",\n\t\t\"symbols\": [\n\t\t\t\"VARA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://vara.network/\"\n\t},\n\t{\n\t\t\"prefix\": 172,\n\t\t\"network\": \"parallel\",\n\t\t\"displayName\": \"Parallel\",\n\t\t\"symbols\": [\n\t\t\t\"PARA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://parallel.fi/\"\n\t},\n\t{\n\t\t\"prefix\": 252,\n\t\t\"network\": \"social-network\",\n\t\t\"displayName\": \"Social Network\",\n\t\t\"symbols\": [\n\t\t\t\"NET\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://social.network\"\n\t},\n\t{\n\t\t\"prefix\": 255,\n\t\t\"network\": \"quartz_mainnet\",\n\t\t\"displayName\": \"QUARTZ by UNIQUE\",\n\t\t\"symbols\": [\n\t\t\t\"QTZ\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://unique.network\"\n\t},\n\t{\n\t\t\"prefix\": 268,\n\t\t\"network\": \"pioneer_network\",\n\t\t\"displayName\": \"Pioneer Network by Bit.Country\",\n\t\t\"symbols\": [\n\t\t\t\"NEER\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://bit.country\"\n\t},\n\t{\n\t\t\"prefix\": 420,\n\t\t\"network\": \"sora_kusama_para\",\n\t\t\"displayName\": \"SORA Kusama Parachain\",\n\t\t\"symbols\": [\n\t\t\t\"XOR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://sora.org\"\n\t},\n\t{\n\t\t\"prefix\": 440,\n\t\t\"network\": \"allfeat_network\",\n\t\t\"displayName\": \"Allfeat Network\",\n\t\t\"symbols\": [\n\t\t\t\"AFT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://allfeat.network\"\n\t},\n\t{\n\t\t\"prefix\": 666,\n\t\t\"network\": \"metaquity_network\",\n\t\t\"displayName\": \"Metaquity Network\",\n\t\t\"symbols\": [\n\t\t\t\"MQTY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://metaquity.xyz/\"\n\t},\n\t{\n\t\t\"prefix\": 777,\n\t\t\"network\": \"curio\",\n\t\t\"displayName\": \"Curio\",\n\t\t\"symbols\": [\n\t\t\t\"CGT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://parachain.capitaldex.exchange/\"\n\t},\n\t{\n\t\t\"prefix\": 789,\n\t\t\"network\": \"geek\",\n\t\t\"displayName\": \"GEEK Network\",\n\t\t\"symbols\": [\n\t\t\t\"GEEK\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://geek.gl\"\n\t},\n\t{\n\t\t\"prefix\": 995,\n\t\t\"network\": \"ternoa\",\n\t\t\"displayName\": \"Ternoa\",\n\t\t\"symbols\": [\n\t\t\t\"CAPS\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.ternoa.network\"\n\t},\n\t{\n\t\t\"prefix\": 1110,\n\t\t\"network\": \"efinity\",\n\t\t\"displayName\": \"Efinity\",\n\t\t\"symbols\": [\n\t\t\t\"EFI\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://efinity.io/\"\n\t},\n\t{\n\t\t\"prefix\": 1221,\n\t\t\"network\": \"peaq\",\n\t\t\"displayName\": \"Peaq Network\",\n\t\t\"symbols\": [\n\t\t\t\"PEAQ\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"Sr25519\",\n\t\t\"website\": \"https://www.peaq.network/\"\n\t},\n\t{\n\t\t\"prefix\": 1222,\n\t\t\"network\": \"krest\",\n\t\t\"displayName\": \"Krest Network\",\n\t\t\"symbols\": [\n\t\t\t\"KREST\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"Sr25519\",\n\t\t\"website\": \"https://www.peaq.network/\"\n\t},\n\t{\n\t\t\"prefix\": 1284,\n\t\t\"network\": \"moonbeam\",\n\t\t\"displayName\": \"Moonbeam\",\n\t\t\"symbols\": [\n\t\t\t\"GLMR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"secp256k1\",\n\t\t\"website\": \"https://moonbeam.network\"\n\t},\n\t{\n\t\t\"prefix\": 1285,\n\t\t\"network\": \"moonriver\",\n\t\t\"displayName\": \"Moonriver\",\n\t\t\"symbols\": [\n\t\t\t\"MOVR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"secp256k1\",\n\t\t\"website\": \"https://moonbeam.network\"\n\t},\n\t{\n\t\t\"prefix\": 1328,\n\t\t\"network\": \"ajuna\",\n\t\t\"displayName\": \"Ajuna Network\",\n\t\t\"symbols\": [\n\t\t\t\"AJUN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://ajuna.io\"\n\t},\n\t{\n\t\t\"prefix\": 1337,\n\t\t\"network\": \"bajun\",\n\t\t\"displayName\": \"Bajun Network\",\n\t\t\"symbols\": [\n\t\t\t\"BAJU\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://ajuna.io\"\n\t},\n\t{\n\t\t\"prefix\": 1516,\n\t\t\"network\": \"societal\",\n\t\t\"displayName\": \"Societal\",\n\t\t\"symbols\": [\n\t\t\t\"SCTL\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.sctl.xyz\"\n\t},\n\t{\n\t\t\"prefix\": 1985,\n\t\t\"network\": \"seals\",\n\t\t\"displayName\": \"Seals Network\",\n\t\t\"symbols\": [\n\t\t\t\"SEAL\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t9\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://seals.app\"\n\t},\n\t{\n\t\t\"prefix\": 2007,\n\t\t\"network\": \"kapex\",\n\t\t\"displayName\": \"Kapex\",\n\t\t\"symbols\": [\n\t\t\t\"KAPEX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://totemaccounting.com\"\n\t},\n\t{\n\t\t\"prefix\": 2009,\n\t\t\"network\": \"cloudwalk_mainnet\",\n\t\t\"displayName\": \"CloudWalk Network Mainnet\",\n\t\t\"symbols\": [\n\t\t\t\"CWN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://explorer.mainnet.cloudwalk.io\"\n\t},\n\t{\n\t\t\"prefix\": 2021,\n\t\t\"network\": \"logion\",\n\t\t\"displayName\": \"logion network\",\n\t\t\"symbols\": [\n\t\t\t\"LGNT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://logion.network\"\n\t},\n\t{\n\t\t\"prefix\": 2032,\n\t\t\"network\": \"interlay\",\n\t\t\"displayName\": \"Interlay\",\n\t\t\"symbols\": [\n\t\t\t\"INTR\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t10\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://interlay.io/\"\n\t},\n\t{\n\t\t\"prefix\": 2092,\n\t\t\"network\": \"kintsugi\",\n\t\t\"displayName\": \"Kintsugi\",\n\t\t\"symbols\": [\n\t\t\t\"KINT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://interlay.io/\"\n\t},\n\t{\n\t\t\"prefix\": 2106,\n\t\t\"network\": \"bitgreen\",\n\t\t\"displayName\": \"Bitgreen\",\n\t\t\"symbols\": [\n\t\t\t\"BBB\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://bitgreen.org/\"\n\t},\n\t{\n\t\t\"prefix\": 2112,\n\t\t\"network\": \"chainflip\",\n\t\t\"displayName\": \"Chainflip\",\n\t\t\"symbols\": [\n\t\t\t\"FLIP\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://chainflip.io/\"\n\t},\n\t{\n\t\t\"prefix\": 2199,\n\t\t\"network\": \"moonsama\",\n\t\t\"displayName\": \"Moonsama\",\n\t\t\"symbols\": [\n\t\t\t\"SAMA\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"secp256k1\",\n\t\t\"website\": \"https://moonsama.com\"\n\t},\n\t{\n\t\t\"prefix\": 2206,\n\t\t\"network\": \"ICE\",\n\t\t\"displayName\": \"ICE Network\",\n\t\t\"symbols\": [\n\t\t\t\"ICY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://icenetwork.io\"\n\t},\n\t{\n\t\t\"prefix\": 2207,\n\t\t\"network\": \"SNOW\",\n\t\t\"displayName\": \"SNOW: ICE Canary Network\",\n\t\t\"symbols\": [\n\t\t\t\"ICZ\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://icenetwork.io\"\n\t},\n\t{\n\t\t\"prefix\": 2254,\n\t\t\"network\": \"subspace_testnet\",\n\t\t\"displayName\": \"Subspace testnet\",\n\t\t\"symbols\": [\n\t\t\t\"tSSC\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://subspace.network\"\n\t},\n\t{\n\t\t\"prefix\": 3333,\n\t\t\"network\": \"peerplays\",\n\t\t\"displayName\": \"Peerplays\",\n\t\t\"symbols\": [\n\t\t\t\"PPY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"secp256k1\",\n\t\t\"website\": \"https://www.peerplays.com/\"\n\t},\n\t{\n\t\t\"prefix\": 4450,\n\t\t\"network\": \"g1\",\n\t\t\"displayName\": \"\u011E1\",\n\t\t\"symbols\": [\n\t\t\t\"G1\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t2\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://duniter.org\"\n\t},\n\t{\n\t\t\"prefix\": 5234,\n\t\t\"network\": \"humanode\",\n\t\t\"displayName\": \"Humanode Network\",\n\t\t\"symbols\": [\n\t\t\t\"HMND\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://humanode.io\"\n\t},\n\t{\n\t\t\"prefix\": 5845,\n\t\t\"network\": \"tangle\",\n\t\t\"displayName\": \"Tangle Network\",\n\t\t\"symbols\": [\n\t\t\t\"TNT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.tangle.tools/\"\n\t},\n\t{\n\t\t\"prefix\": 6094,\n\t\t\"network\": \"subspace\",\n\t\t\"displayName\": \"Subspace\",\n\t\t\"symbols\": [\n\t\t\t\"SSC\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://subspace.network\"\n\t},\n\t{\n\t\t\"prefix\": 7007,\n\t\t\"network\": \"tidefi\",\n\t\t\"displayName\": \"Tidefi\",\n\t\t\"symbols\": [\n\t\t\t\"TDFY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://tidefi.com\"\n\t},\n\t{\n\t\t\"prefix\": 7013,\n\t\t\"network\": \"gm\",\n\t\t\"displayName\": \"GM\",\n\t\t\"symbols\": [\n\t\t\t\"FREN\",\n\t\t\t\"GM\",\n\t\t\t\"GN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://gmordie.com\"\n\t},\n\t{\n\t\t\"prefix\": 7306,\n\t\t\"network\": \"krigan\",\n\t\t\"displayName\": \"Krigan Network\",\n\t\t\"symbols\": [\n\t\t\t\"KRGN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t9\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://krigan.network\"\n\t},\n\t{\n\t\t\"prefix\": 7391,\n\t\t\"network\": \"unique_mainnet\",\n\t\t\"displayName\": \"Unique Network\",\n\t\t\"symbols\": [\n\t\t\t\"UNQ\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://unique.network\"\n\t},\n\t{\n\t\t\"prefix\": 8866,\n\t\t\"network\": \"golden_gate\",\n\t\t\"displayName\": \"Golden Gate\",\n\t\t\"symbols\": [\n\t\t\t\"GGX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://ggxchain.io/\"\n\t},\n\t{\n\t\t\"prefix\": 8883,\n\t\t\"network\": \"sapphire_mainnet\",\n\t\t\"displayName\": \"Sapphire by Unique\",\n\t\t\"symbols\": [\n\t\t\t\"QTZ\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://unique.network\"\n\t},\n\t{\n\t\t\"prefix\": 8886,\n\t\t\"network\": \"golden_gate_sydney\",\n\t\t\"displayName\": \"Golden Gate Sydney\",\n\t\t\"symbols\": [\n\t\t\t\"GGXT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://ggxchain.io/\"\n\t},\n\t{\n\t\t\"prefix\": 9072,\n\t\t\"network\": \"hashed\",\n\t\t\"displayName\": \"Hashed Network\",\n\t\t\"symbols\": [\n\t\t\t\"HASH\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://hashed.network\"\n\t},\n\t{\n\t\t\"prefix\": 9807,\n\t\t\"network\": \"dentnet\",\n\t\t\"displayName\": \"DENTNet\",\n\t\t\"symbols\": [\n\t\t\t\"DENTX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://www.dentnet.io\"\n\t},\n\t{\n\t\t\"prefix\": 9935,\n\t\t\"network\": \"t3rn\",\n\t\t\"displayName\": \"t3rn\",\n\t\t\"symbols\": [\n\t\t\t\"TRN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://t3rn.io/\"\n\t},\n\t{\n\t\t\"prefix\": 10041,\n\t\t\"network\": \"basilisk\",\n\t\t\"displayName\": \"Basilisk\",\n\t\t\"symbols\": [\n\t\t\t\"BSX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://bsx.fi\"\n\t},\n\t{\n\t\t\"prefix\": 11330,\n\t\t\"network\": \"cess-testnet\",\n\t\t\"displayName\": \"CESS Testnet\",\n\t\t\"symbols\": [\n\t\t\t\"TCESS\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://cess.cloud\"\n\t},\n\t{\n\t\t\"prefix\": 11331,\n\t\t\"network\": \"cess\",\n\t\t\"displayName\": \"CESS\",\n\t\t\"symbols\": [\n\t\t\t\"CESS\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://cess.cloud\"\n\t},\n\t{\n\t\t\"prefix\": 11486,\n\t\t\"network\": \"luhn\",\n\t\t\"displayName\": \"Luhn Network\",\n\t\t\"symbols\": [\n\t\t\t\"LUHN\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://luhn.network\"\n\t},\n\t{\n\t\t\"prefix\": 11820,\n\t\t\"network\": \"contextfree\",\n\t\t\"displayName\": \"Automata ContextFree\",\n\t\t\"symbols\": [\n\t\t\t\"CTX\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://ata.network\"\n\t},\n\t{\n\t\t\"prefix\": 12155,\n\t\t\"network\": \"impact\",\n\t\t\"displayName\": \"Impact Protocol Network\",\n\t\t\"symbols\": [\n\t\t\t\"BSTY\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://impactprotocol.network/\"\n\t},\n\t{\n\t\t\"prefix\": 12191,\n\t\t\"network\": \"nftmart\",\n\t\t\"displayName\": \"NFTMart\",\n\t\t\"symbols\": [\n\t\t\t\"NMT\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t12\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://nftmart.io\"\n\t},\n\t{\n\t\t\"prefix\": 13116,\n\t\t\"network\": \"bittensor\",\n\t\t\"displayName\": \"Bittensor\",\n\t\t\"symbols\": [\n\t\t\t\"TAO\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t9\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://bittensor.com\"\n\t},\n\t{\n\t\t\"prefix\": 14697,\n\t\t\"network\": \"goro\",\n\t\t\"displayName\": \"GORO Network\",\n\t\t\"symbols\": [\n\t\t\t\"GORO\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t9\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://goro.network\"\n\t},\n\t{\n\t\t\"prefix\": 14998,\n\t\t\"network\": \"mosaic-chain\",\n\t\t\"displayName\": \"Mosaic Chain\",\n\t\t\"symbols\": [\n\t\t\t\"MOS\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"*25519\",\n\t\t\"website\": \"https://mosaicchain.io\"\n\t},\n\t{\n\t\t\"prefix\": 29972,\n\t\t\"network\": \"mythos\",\n\t\t\"displayName\": \"Mythos\",\n\t\t\"symbols\": [\n\t\t\t\"MYTH\"\n\t\t],\n\t\t\"decimals\": [\n\t\t\t18\n\t\t],\n\t\t\"standardAccount\": \"secp256k1\",\n\t\t\"website\": \"https://mythos.foundation\"\n\t}\n];\n", "// Copyright 2017-2023 @polkadot/networks authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// NOTE: In the case where the network was hard-spooned and multiple genesisHashes\n// are provided, it needs to be in reverse order, i.e. most-recent first, oldest\n// last. This make lookups for the current a simple genesisHash[0]\n// (See Kusama as an example)\nexport const knownGenesis = {\n acala: ['0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c'],\n ajuna: ['0xe358eb1d11b31255a286c12e44fe6780b7edb171d657905a97e39f71d9c6c3ee'],\n 'aleph-node': ['0x70255b4d28de0fc4e1a193d7e175ad1ccef431598211c55538f1018651a0344e'],\n astar: ['0x9eb76c5184c4ab8679d2d5d819fdf90b9c001403e9e17da2e14b6d8aec4029c6'],\n basilisk: ['0xa85cfb9b9fd4d622a5b28289a02347af987d8f73fa3108450e2b4a11c1ce5755'],\n bifrost: ['0x262e1b2ad728475fd6fe88e62d34c200abe6fd693931ddad144059b1eb884e5b'],\n 'bifrost-kusama': ['0x9f28c6a68e0fc9646eff64935684f6eeeece527e37bbe1f213d22caa1d9d6bed'],\n centrifuge: ['0xb3db41421702df9a7fcac62b53ffeac85f7853cc4e689e0b93aeb3db18c09d82', '0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5'],\n composable: ['0xdaab8df776eb52ec604a5df5d388bb62a050a0aaec4556a64265b9d42755552d'],\n darwinia: ['0xe71578b37a7c799b0ab4ee87ffa6f059a6b98f71f06fb8c84a8d88013a548ad6'],\n 'dock-mainnet': ['0x6bfe24dca2a3be10f22212678ac13a6446ec764103c0f3471c71609eac384aae', '0xf73467c6544aa68df2ee546b135f955c46b90fa627e9b5d7935f41061bb8a5a9'],\n edgeware: ['0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b'],\n equilibrium: ['0x6f1a800de3daff7f5e037ddf66ab22ce03ab91874debeddb1086f5f7dbd48925'],\n genshiro: ['0x9b8cefc0eb5c568b527998bdd76c184e2b76ae561be76e4667072230217ea243'],\n hydradx: ['0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d',\n // HydraDX Parachain\n '0xd2a620c27ec5cbc5621ff9a522689895074f7cca0d08e7134a7804e1a3ba86fc',\n // Snakenet Gen3-1\n '0x10af6e84234477d84dc572bac0789813b254aa490767ed06fb9591191d1073f9',\n // Snakenet Gen3\n '0x3d75507dd46301767e601265791da1d9cb47b6ebc94e87347b635e5bf58bd047',\n // Snakenet Gen2\n '0x0ed32bfcab4a83517fac88f2aa7cbc2f88d3ab93be9a12b6188a036bf8a943c2' // Snakenet Gen1\n ],\n\n 'interlay-parachain': ['0xbf88efe70e9e0e916416e8bed61f2b45717f517d7f3523e33c7b001e5ffcbc72'],\n karura: ['0xbaf5aabe40646d11f0ee8abbdc64f4a4b7674925cba08e4a05ff9ebed6e2126b'],\n khala: ['0xd43540ba6d3eb4897c28a77d48cb5b729fea37603cbbfc7a86a73b72adb3be8d'],\n kulupu: ['0xf7a99d3cb92853d00d5275c971c132c074636256583fee53b3bbe60d7b8769ba'],\n kusama: ['0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe',\n // Kusama CC3,\n '0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636',\n // Kusama CC2\n '0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf' // Kusama CC1\n ],\n\n nodle: ['0x97da7ede98d7bad4e36b4d734b6055425a3be036da2a332ea5a7037656427a21'],\n origintrail: ['0xe7e0962324a3b86c83404dbea483f25fb5dab4c224791c81b756cfc948006174'],\n parallel: ['0xe61a41c53f5dcd0beb09df93b34402aada44cb05117b71059cce40a2723a4e97'],\n pendulum: ['0x5d3c298622d5634ed019bf61ea4b71655030015bde9beb0d6a24743714462c86'],\n phala: ['0x1bb969d85965e4bb5a651abbedf21a54b6b31a21f66b5401cc3f1e286268d736'],\n picasso: ['0x6811a339673c9daa897944dcdac99c6e2939cc88245ed21951a0a3c9a2be75bc', '0xe8e7f0f4c4f5a00720b4821dbfddefea7490bcf0b19009961cc46957984e2c1c'],\n polkadex: ['0x3920bcb4960a1eef5580cd5367ff3f430eef052774f78468852f7b9cb39f8a3c'],\n polkadot: ['0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'],\n polymesh: ['0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063'],\n rococo: ['0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e', '0xaaf2cd1b74b5f726895921259421b534124726263982522174147046b8827897', '0x037f5f3c8e67b314062025fc886fcd6238ea25a4a9b45dce8d246815c9ebe770', '0xc196f81260cf1686172b47a79cf002120735d7cb0eb1474e8adce56618456fff', '0xf6e9983c37baf68846fedafe21e56718790e39fb1c582abc408b81bc7b208f9a', '0x5fce687da39305dfe682b117f0820b319348e8bb37eb16cf34acbf6a202de9d9', '0xe7c3d5edde7db964317cd9b51a3a059d7cd99f81bdbce14990047354334c9779', '0x1611e1dbf0405379b861e2e27daa90f480b2e6d3682414a80835a52e8cb8a215', '0x343442f12fa715489a8714e79a7b264ea88c0d5b8c66b684a7788a516032f6b9', '0x78bcd530c6b3a068bc17473cf5d2aff9c287102bed9af3ae3c41c33b9d6c6147', '0x47381ee0697153d64404fc578392c8fd5cba9073391908f46c888498415647bd', '0x19c0e4fa8ab75f5ac7865e0b8f74ff91eb9a100d336f423cd013a8befba40299'],\n sora: ['0x7e4e32d0feafd4f9c9414b0be86373f9a1efa904809b683453a9af6856d38ad5'],\n stafi: ['0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80'],\n statemine: ['0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a'],\n statemint: ['0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f'],\n subsocial: ['0x0bd72c1c305172e1275278aaeb3f161e02eccb7a819e63f62d47bd53a28189f8'],\n ternoa: ['0x6859c81ca95ef624c9dfe4dc6e3381c33e5d6509e35e147092bfbc780f777c4e'],\n unique: ['0x84322d9cddbf35088f1e54e9a85c967a41a56a4f43445768125e61af166c7d31'],\n vtb: ['0x286bc8414c7000ce1d6ee6a834e29a54c1784814b76243eb77ed0b2c5573c60f', '0x7483b89572fb2bd687c7b9a93b242d0b237f9aba463aba07ec24503931038aaa'],\n westend: ['0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e'],\n xxnetwork: ['0x50dd5d206917bf10502c68fb4d18a59fc8aa31586f4e8856b493e43544aa82aa']\n};", "// Copyright 2017-2023 @polkadot/networks authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// these are icon overrides\nexport const knownIcon = {\n centrifuge: 'polkadot',\n kusama: 'polkadot',\n polkadot: 'polkadot',\n sora: 'polkadot',\n statemine: 'polkadot',\n statemint: 'polkadot',\n westmint: 'polkadot'\n};", "// Copyright 2017-2023 @polkadot/networks authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// These match up with the keys of the ledgerApps object in the @polkadot/hw-ledger/defaults.ts\n// and maps to the known slip44 (minus the `0x8` hard derivation flag)\n//\n// NOTE: Any network here needs to have a genesisHash attached in the ./genesis.ts config\nexport const knownLedger = {\n acala: 0x00000313,\n ajuna: 0x00000162,\n 'aleph-node': 0x00000283,\n astar: 0x0000032a,\n bifrost: 0x00000314,\n 'bifrost-kusama': 0x00000314,\n centrifuge: 0x000002eb,\n composable: 0x00000162,\n darwinia: 0x00000162,\n 'dock-mainnet': 0x00000252,\n edgeware: 0x0000020b,\n equilibrium: 0x05f5e0fd,\n genshiro: 0x05f5e0fc,\n hydradx: 0x00000162,\n 'interlay-parachain': 0x00000162,\n karura: 0x000002ae,\n khala: 0x000001b2,\n kusama: 0x000001b2,\n nodle: 0x000003eb,\n origintrail: 0x00000162,\n parallel: 0x00000162,\n pendulum: 0x00000162,\n phala: 0x00000162,\n picasso: 0x000001b2,\n polkadex: 0x0000031f,\n polkadot: 0x00000162,\n polymesh: 0x00000253,\n sora: 0x00000269,\n stafi: 0x0000038b,\n statemine: 0x000001b2,\n // common-good on Kusama, shares derivation\n statemint: 0x00000162,\n // common-good on Polkadot, shares derivation\n ternoa: 0x00003e3,\n unique: 0x00000162,\n vtb: 0x000002b6,\n xxnetwork: 0x000007a3\n};", "// Copyright 2017-2023 @polkadot/networks authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// testnets should not allow selection\nexport const knownTestnet = {\n '': true,\n // this is the default non-network entry\n 'cess-testnet': true,\n 'dock-testnet': true,\n jupiter: true,\n 'mathchain-testnet': true,\n p3dt: true,\n subspace_testnet: true,\n 'zero-alphaville': true\n};", "// Copyright 2017-2023 @polkadot/networks authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport knownSubstrate from '@substrate/ss58-registry';\nimport { knownGenesis, knownIcon, knownLedger, knownTestnet } from \"./defaults/index.js\";\n\n// These are known prefixes that are not sorted\nconst UNSORTED = [0, 2, 42];\nconst TESTNETS = ['testnet'];\nfunction toExpanded(o) {\n const network = o.network || '';\n const nameParts = network.replace(/_/g, '-').split('-');\n const n = o;\n\n // ledger additions\n n.slip44 = knownLedger[network];\n n.hasLedgerSupport = !!n.slip44;\n\n // general items\n n.genesisHash = knownGenesis[network] || [];\n n.icon = knownIcon[network] || 'substrate';\n\n // filtering\n n.isTestnet = !!knownTestnet[network] || TESTNETS.includes(nameParts[nameParts.length - 1]);\n n.isIgnored = n.isTestnet || !(o.standardAccount && o.decimals && o.decimals.length && o.symbols && o.symbols.length) && o.prefix !== 42;\n return n;\n}\nfunction filterSelectable({\n genesisHash,\n prefix\n}) {\n return !!genesisHash.length || prefix === 42;\n}\nfunction filterAvailable(n) {\n return !n.isIgnored && !!n.network;\n}\nfunction sortNetworks(a, b) {\n const isUnSortedA = UNSORTED.includes(a.prefix);\n const isUnSortedB = UNSORTED.includes(b.prefix);\n return isUnSortedA === isUnSortedB ? isUnSortedA ? 0 : a.displayName.localeCompare(b.displayName) : isUnSortedA ? -1 : 1;\n}\n\n// This is all the Substrate networks with our additional information\nexport const allNetworks = knownSubstrate.map(toExpanded);\n\n// The list of available/claimed prefixes\n// - no testnets\n// - we only include those where we have a standardAccount\n// - sort by name, however we keep 0, 2, 42 first in the list\nexport const availableNetworks = allNetworks.filter(filterAvailable).sort(sortNetworks);\n\n// A filtered list of those chains we have details about (genesisHashes)\nexport const selectableNetworks = availableNetworks.filter(filterSelectable);", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { availableNetworks } from \"../networks.js\";\nexport const defaults = {\n allowedDecodedLengths: [1, 2, 4, 8, 32, 33],\n // publicKey has prefix + 2 checksum bytes, short only prefix + 1 checksum byte\n allowedEncodedLengths: [3, 4, 6, 10, 35, 36, 37, 38],\n allowedPrefix: availableNetworks.map(({\n prefix\n }) => prefix),\n prefix: 42\n};", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// Original implementation: https://github.com/paritytech/polka-ui/blob/4858c094684769080f5811f32b081dd7780b0880/src/polkadot.js#L6\nimport { isHex, isU8a, u8aToU8a } from '@polkadot/util';\nimport { base58Decode } from \"../base58/index.js\";\nimport { checkAddressChecksum } from \"./checksum.js\";\nimport { defaults } from \"./defaults.js\";\nexport function decodeAddress(encoded, ignoreChecksum, ss58Format = -1) {\n if (!encoded) {\n throw new Error('Invalid empty address passed');\n }\n if (isU8a(encoded) || isHex(encoded)) {\n return u8aToU8a(encoded);\n }\n try {\n const decoded = base58Decode(encoded);\n if (!defaults.allowedEncodedLengths.includes(decoded.length)) {\n throw new Error('Invalid decoded address length');\n }\n const [isValid, endPos, ss58Length, ss58Decoded] = checkAddressChecksum(decoded);\n if (!isValid && !ignoreChecksum) {\n throw new Error('Invalid decoded address checksum');\n } else if (ss58Format !== -1 && ss58Format !== ss58Decoded) {\n throw new Error(`Expected ss58Format ${ss58Format}, received ${ss58Decoded}`);\n }\n return decoded.slice(ss58Length, endPos);\n } catch (error) {\n throw new Error(`Decoding ${encoded}: ${error.message}`);\n }\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { base58Decode } from \"../base58/index.js\";\nimport { checkAddressChecksum } from \"./checksum.js\";\nimport { defaults } from \"./defaults.js\";\n\n/**\n * @name checkAddress\n * @summary Validates an ss58 address.\n * @description\n * From the provided input, validate that the address is a valid input.\n */\nexport function checkAddress(address, prefix) {\n let decoded;\n try {\n decoded = base58Decode(address);\n } catch (error) {\n return [false, error.message];\n }\n const [isValid,,, ss58Decoded] = checkAddressChecksum(decoded);\n if (ss58Decoded !== prefix) {\n return [false, `Prefix mismatch, expected ${prefix}, found ${ss58Decoded}`];\n } else if (!defaults.allowedEncodedLengths.includes(decoded.length)) {\n return [false, 'Invalid decoded address length'];\n }\n return [isValid, isValid ? null : 'Invalid decoded address checksum'];\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport const BN_BE_OPTS = {\n isLe: false\n};\nexport const BN_LE_OPTS = {\n isLe: true\n};\nexport const BN_LE_16_OPTS = {\n bitLength: 16,\n isLe: true\n};\nexport const BN_BE_32_OPTS = {\n bitLength: 32,\n isLe: false\n};\nexport const BN_LE_32_OPTS = {\n bitLength: 32,\n isLe: true\n};\nexport const BN_BE_256_OPTS = {\n bitLength: 256,\n isLe: false\n};\nexport const BN_LE_256_OPTS = {\n bitLength: 256,\n isLe: true\n};\nexport const BN_LE_512_OPTS = {\n bitLength: 512,\n isLe: true\n};", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// Original implementation: https://github.com/paritytech/polka-ui/blob/4858c094684769080f5811f32b081dd7780b0880/src/polkadot.js#L34\nimport { u8aConcat } from '@polkadot/util';\nimport { base58Encode } from \"../base58/index.js\";\nimport { decodeAddress } from \"./decode.js\";\nimport { defaults } from \"./defaults.js\";\nimport { sshash } from \"./sshash.js\";\nexport function encodeAddress(key, ss58Format = defaults.prefix) {\n // decode it, this means we can re-encode an address\n const u8a = decodeAddress(key);\n if (ss58Format < 0 || ss58Format > 16383 || [46, 47].includes(ss58Format)) {\n throw new Error('Out of range ss58Format specified');\n } else if (!defaults.allowedDecodedLengths.includes(u8a.length)) {\n throw new Error(`Expected a valid key to convert, with length ${defaults.allowedDecodedLengths.join(', ')}`);\n }\n const input = u8aConcat(ss58Format < 64 ? [ss58Format] : [(ss58Format & 0b0000000011111100) >> 2 | 0b01000000, ss58Format >> 8 | (ss58Format & 0b0000000000000011) << 6], u8a);\n return base58Encode(u8aConcat(input, sshash(input).subarray(0, [32, 33].includes(u8a.length) ? 2 : 1)));\n}", "import assert from './_assert.js';\nimport u64 from './_u64.js';\nimport {\n Hash,\n u32,\n Input,\n toBytes,\n wrapConstructor,\n wrapConstructorWithOpts,\n HashXOF,\n} from './utils.js';\n\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA]: [number[], number[], bigint[]] = [[], [], []];\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n) t ^= _1n << ((_1n << BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = u64.split(_SHA3_IOTA, true);\n\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h: number, l: number, s: number) =>\n s > 32 ? u64.rotlBH(h, l, s) : u64.rotlSH(h, l, s);\nconst rotlL = (h: number, l: number, s: number) =>\n s > 32 ? u64.rotlBL(h, l, s) : u64.rotlSL(h, l, s);\n\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s: Uint32Array, rounds: number = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta \u03B8\n for (let x = 0; x < 10; x++) B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (\u03C1) and Pi (\u03C0)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (\u03C7)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++) B[x] = s[y + x];\n for (let x = 0; x < 10; x++) s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (\u03B9)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\n\nexport class Keccak extends Hash implements HashXOF {\n protected state: Uint8Array;\n protected pos = 0;\n protected posOut = 0;\n protected finished = false;\n protected state32: Uint32Array;\n protected destroyed = false;\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(\n public blockLen: number,\n public suffix: number,\n public outputLen: number,\n protected enableXOF = false,\n protected rounds: number = 24\n ) {\n super();\n // Can be passed from user as dkLen\n assert.number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n protected keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data: Input) {\n assert.exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++) state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen) this.keccak();\n }\n return this;\n }\n protected finish() {\n if (this.finished) return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1) this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n protected writeInto(out: Uint8Array): Uint8Array {\n assert.exists(this, false);\n assert.bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen) this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out: Uint8Array): Uint8Array {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF) throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes: number): Uint8Array {\n assert.number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out: Uint8Array) {\n assert.output(out, this);\n if (this.finished) throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to?: Keccak): Keccak {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to ||= new Keccak(blockLen, suffix, outputLen, enableXOF, rounds);\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\n\nconst gen = (suffix: number, blockLen: number, outputLen: number) =>\n wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\n\nexport const sha3_224 = gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = gen(0x06, 136, 256 / 8);\nexport const sha3_384 = gen(0x06, 104, 384 / 8);\nexport const sha3_512 = gen(0x06, 72, 512 / 8);\nexport const keccak_224 = gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = gen(0x01, 136, 256 / 8);\nexport const keccak_384 = gen(0x01, 104, 384 / 8);\nexport const keccak_512 = gen(0x01, 72, 512 / 8);\n\nexport type ShakeOpts = { dkLen?: number };\n\nconst genShake = (suffix: number, blockLen: number, outputLen: number) =>\n wrapConstructorWithOpts(\n (opts: ShakeOpts = {}) =>\n new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true)\n );\n\nexport const shake128 = genShake(0x1f, 168, 128 / 8);\nexport const shake256 = genShake(0x1f, 136, 256 / 8);\n", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { keccak_256 as keccak256Js, keccak_512 as keccak512Js } from '@noble/hashes/sha3';\nimport { keccak256, keccak512 } from '@polkadot/wasm-crypto';\nimport { createAsHex, createBitHasher, createDualHasher } from \"../helpers.js\";\n\n/**\n * @name keccakAsU8a\n * @summary Creates a keccak Uint8Array from the input.\n * @description\n * From either a `string` or a `Buffer` input, create the keccak and return the result as a `Uint8Array`.\n * @example\n *
\n *\n * ```javascript\n * import { keccakAsU8a } from '@polkadot/util-crypto';\n *\n * keccakAsU8a('123'); // => Uint8Array\n * ```\n */\nexport const keccakAsU8a = /*#__PURE__*/createDualHasher({\n 256: keccak256,\n 512: keccak512\n}, {\n 256: keccak256Js,\n 512: keccak512Js\n});\n\n/**\n * @name keccak256AsU8a\n * @description Creates a keccak256 Uint8Array from the input.\n */\nexport const keccak256AsU8a = /*#__PURE__*/createBitHasher(256, keccakAsU8a);\n\n/**\n * @name keccak512AsU8a\n * @description Creates a keccak512 Uint8Array from the input.\n */\nexport const keccak512AsU8a = /*#__PURE__*/createBitHasher(512, keccakAsU8a);\n\n/**\n * @name keccakAsHex\n * @description Creates a keccak hex string from the input.\n */\nexport const keccakAsHex = createAsHex(keccakAsU8a);", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Point } from '@noble/secp256k1';\nimport { bnToU8a, hasBigInt, u8aConcat } from '@polkadot/util';\nimport { isReady, secp256k1Expand as wasm } from '@polkadot/wasm-crypto';\nimport { BN_BE_256_OPTS } from \"../bn.js\";\nexport function secp256k1Expand(publicKey, onlyJs) {\n if (publicKey.length === 65) {\n return publicKey.subarray(1);\n }\n if (publicKey.length !== 33) {\n throw new Error('Invalid publicKey provided');\n }\n if (!hasBigInt || !onlyJs && isReady()) {\n return wasm(publicKey).subarray(1);\n }\n const {\n x,\n y\n } = Point.fromHex(publicKey);\n return u8aConcat(bnToU8a(x, BN_BE_256_OPTS), bnToU8a(y, BN_BE_256_OPTS));\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aToHex, u8aToU8a } from '@polkadot/util';\nimport { keccakAsU8a } from \"../keccak/index.js\";\nimport { secp256k1Expand } from \"../secp256k1/index.js\";\nfunction getH160(u8a) {\n if ([33, 65].includes(u8a.length)) {\n u8a = keccakAsU8a(secp256k1Expand(u8a));\n }\n return u8a.slice(-20);\n}\nexport function ethereumEncode(addressOrPublic) {\n if (!addressOrPublic) {\n return '0x';\n }\n const u8aAddress = u8aToU8a(addressOrPublic);\n if (![20, 32, 33, 65].includes(u8aAddress.length)) {\n throw new Error('Invalid address or publicKey passed');\n }\n const address = u8aToHex(getH160(u8aAddress), -1, false);\n const hash = u8aToHex(keccakAsU8a(address), -1, false);\n let result = '';\n for (let i = 0; i < 40; i++) {\n result = `${result}${parseInt(hash[i], 16) > 7 ? address[i].toUpperCase() : address[i]}`;\n }\n return `0x${result}`;\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { u8aToHex } from '@polkadot/util';\nimport { keccakAsU8a } from \"../keccak/index.js\";\nfunction isInvalidChar(char, byte) {\n return char !== (byte > 7 ? char.toUpperCase() : char.toLowerCase());\n}\nexport function isEthereumChecksum(_address) {\n const address = _address.replace('0x', '');\n const hash = u8aToHex(keccakAsU8a(address.toLowerCase()), -1, false);\n for (let i = 0; i < 40; i++) {\n if (isInvalidChar(address[i], parseInt(hash[i], 16))) {\n return false;\n }\n }\n return true;\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isHex } from '@polkadot/util';\nimport { isEthereumChecksum } from \"./isChecksum.js\";\nexport function isEthereumAddress(address) {\n if (!address || address.length !== 42 || !isHex(address)) {\n return false;\n } else if (/^(0x)?[0-9a-f]{40}$/.test(address) || /^(0x)?[0-9A-F]{40}$/.test(address)) {\n return true;\n }\n return isEthereumChecksum(address);\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { _0n, _1n } from '@polkadot/util';\nimport { BigInt } from '@polkadot/x-bigint';\n\n// Adapted from https://github.com/pierrec/js-xxhash/blob/0504e76f3d31a21ae8528a7f590c7289c9e431d2/lib/xxhash64.js\n//\n// xxHash64 implementation in pure Javascript\n// Copyright (C) 2016, Pierre Curto\n// MIT license\n//\n// Changes made:\n// - converted to TypeScript\n// - uses native JS BigInt (no external dependencies)\n// - support only for Uint8Array inputs\n// - no constructor function, straight fill & digest\n// - update code removed, only called once, no streams\n\nconst P64_1 = BigInt('11400714785074694791');\nconst P64_2 = BigInt('14029467366897019727');\nconst P64_3 = BigInt('1609587929392839161');\nconst P64_4 = BigInt('9650029242287828579');\nconst P64_5 = BigInt('2870177450012600261');\n\n// mask for a u64, all bits set\nconst U64 = BigInt('0xffffffffffffffff');\n\n// various constants\nconst _7n = BigInt(7);\nconst _11n = BigInt(11);\nconst _12n = BigInt(12);\nconst _16n = BigInt(16);\nconst _18n = BigInt(18);\nconst _23n = BigInt(23);\nconst _27n = BigInt(27);\nconst _29n = BigInt(29);\nconst _31n = BigInt(31);\nconst _32n = BigInt(32);\nconst _33n = BigInt(33);\nconst _64n = BigInt(64);\nconst _256n = BigInt(256);\nfunction rotl(a, b) {\n const c = a & U64;\n return (c << b | c >> _64n - b) & U64;\n}\nfunction fromU8a(u8a, p, count) {\n const bigints = new Array(count);\n let offset = 0;\n for (let i = 0; i < count; i++, offset += 2) {\n bigints[i] = BigInt(u8a[p + offset] | u8a[p + 1 + offset] << 8);\n }\n let result = _0n;\n for (let i = count - 1; i >= 0; i--) {\n result = (result << _16n) + bigints[i];\n }\n return result;\n}\nfunction toU8a(h64) {\n const result = new Uint8Array(8);\n for (let i = 7; i >= 0; i--) {\n result[i] = Number(h64 % _256n);\n h64 = h64 / _256n;\n }\n return result;\n}\nfunction state(initSeed) {\n const seed = BigInt(initSeed);\n return {\n seed,\n u8a: new Uint8Array(32),\n u8asize: 0,\n v1: seed + P64_1 + P64_2,\n v2: seed + P64_2,\n v3: seed,\n v4: seed - P64_1\n };\n}\nfunction init(state, input) {\n if (input.length < 32) {\n state.u8a.set(input);\n state.u8asize = input.length;\n return state;\n }\n const limit = input.length - 32;\n let p = 0;\n if (limit >= 0) {\n const adjustV = v => P64_1 * rotl(v + P64_2 * fromU8a(input, p, 4), _31n);\n do {\n state.v1 = adjustV(state.v1);\n p += 8;\n state.v2 = adjustV(state.v2);\n p += 8;\n state.v3 = adjustV(state.v3);\n p += 8;\n state.v4 = adjustV(state.v4);\n p += 8;\n } while (p <= limit);\n }\n if (p < input.length) {\n state.u8a.set(input.subarray(p, input.length));\n state.u8asize = input.length - p;\n }\n return state;\n}\nexport function xxhash64(input, initSeed) {\n const {\n seed,\n u8a,\n u8asize,\n v1,\n v2,\n v3,\n v4\n } = init(state(initSeed), input);\n let p = 0;\n let h64 = U64 & BigInt(input.length) + (input.length >= 32 ? ((((rotl(v1, _1n) + rotl(v2, _7n) + rotl(v3, _12n) + rotl(v4, _18n) ^ P64_1 * rotl(v1 * P64_2, _31n)) * P64_1 + P64_4 ^ P64_1 * rotl(v2 * P64_2, _31n)) * P64_1 + P64_4 ^ P64_1 * rotl(v3 * P64_2, _31n)) * P64_1 + P64_4 ^ P64_1 * rotl(v4 * P64_2, _31n)) * P64_1 + P64_4 : seed + P64_5);\n while (p <= u8asize - 8) {\n h64 = U64 & P64_4 + P64_1 * rotl(h64 ^ P64_1 * rotl(P64_2 * fromU8a(u8a, p, 4), _31n), _27n);\n p += 8;\n }\n if (p + 4 <= u8asize) {\n h64 = U64 & P64_3 + P64_2 * rotl(h64 ^ P64_1 * fromU8a(u8a, p, 2), _23n);\n p += 4;\n }\n while (p < u8asize) {\n h64 = U64 & P64_1 * rotl(h64 ^ P64_5 * BigInt(u8a[p++]), _11n);\n }\n h64 = U64 & P64_2 * (h64 ^ h64 >> _33n);\n h64 = U64 & P64_3 * (h64 ^ h64 >> _29n);\n return toU8a(U64 & (h64 ^ h64 >> _32n));\n}", "// Copyright 2017-2023 @polkadot/util-crypto authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { hasBigInt, u8aToU8a } from '@polkadot/util';\nimport { isReady, twox } from '@polkadot/wasm-crypto';\nimport { createAsHex } from \"../helpers.js\";\nimport { xxhash64 } from \"./xxhash64.js\";\n\n/**\n * @name xxhashAsU8a\n * @summary Creates a xxhash64 u8a from the input.\n * @description\n * From either a `string`, `Uint8Array` or a `Buffer` input, create the xxhash64 and return the result as a `Uint8Array` with the specified `bitLength`.\n * @example\n *
\n *\n * ```javascript\n * import { xxhashAsU8a } from '@polkadot/util-crypto';\n *\n * xxhashAsU8a('abc'); // => 0x44bc2cf5ad770999\n * ```\n */\nexport function xxhashAsU8a(data, bitLength = 64, onlyJs) {\n const rounds = Math.ceil(bitLength / 64);\n const u8a = u8aToU8a(data);\n if (!hasBigInt || !onlyJs && isReady()) {\n return twox(u8a, rounds);\n }\n const result = new Uint8Array(rounds * 8);\n for (let seed = 0; seed < rounds; seed++) {\n result.set(xxhash64(u8a, seed).reverse(), seed * 8);\n }\n return result;\n}\n\n/**\n * @name xxhashAsHex\n * @description Creates a xxhash64 hex from the input.\n */\nexport const xxhashAsHex = createAsHex(xxhashAsU8a);", "function _classPrivateFieldBase(e, t) {\n if (!{}.hasOwnProperty.call(e, t)) throw new TypeError(\"attempted to use private field on non-instance\");\n return e;\n}\nexport { _classPrivateFieldBase as default };", "var id = 0;\nfunction _classPrivateFieldKey(e) {\n return \"__private_\" + id++ + \"_\" + e;\n}\nexport { _classPrivateFieldKey as default };", "// Copyright 2017-2023 @polkadot/x-global authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport { packageInfo } from \"./packageInfo.js\";\n\n// Ensure that we are able to run this without any @types/node definitions\n// and without having lib: ['dom'] in our TypeScript configuration\n// (may not be available in all environments, e.g. Deno springs to mind)\n\nfunction evaluateThis(fn) {\n return fn('return this');\n}\nexport const xglobal = typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : evaluateThis(Function);\nexport function extractGlobal(name, fallback) {\n // Not quite sure why this is here - snuck in with TS 4.7.2 with no real idea\n // (as of now) as to why this looks like an \"any\" when we do cast it to a T\n //\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof xglobal[name] === 'undefined' ? fallback : xglobal[name];\n}\nexport function exposeGlobal(name, fallback) {\n if (typeof xglobal[name] === 'undefined') {\n xglobal[name] = fallback;\n }\n}", "// Copyright 2017-2023 @polkadot/x-fetch authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { xglobal } from '@polkadot/x-global';\nexport { packageInfo } from \"./packageInfo.js\";\nexport const fetch = xglobal.fetch;", "// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isFunction } from '@polkadot/util/is/function';\nconst UNKNOWN = -99999;\nfunction extend(that, name, value) {\n Object.defineProperty(that, name, {\n configurable: true,\n enumerable: false,\n value\n });\n}\n\n/**\n * @name RpcError\n * @summary Extension to the basic JS Error.\n * @description\n * The built-in JavaScript Error class is extended by adding a code to allow for Error categorization. In addition to the normal `stack`, `message`, the numeric `code` and `data` (any types) parameters are available on the object.\n * @example\n *
\n *\n * ```javascript\n * const { RpcError } from '@polkadot/util');\n *\n * throw new RpcError('some message', RpcError.CODES.METHOD_NOT_FOUND); // => error.code = -32601\n * ```\n */\nexport default class RpcError extends Error {\n constructor(message = '', code = UNKNOWN, data) {\n super();\n extend(this, 'message', String(message));\n extend(this, 'name', this.constructor.name);\n extend(this, 'data', data);\n extend(this, 'code', code);\n if (isFunction(Error.captureStackTrace)) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n const {\n stack\n } = new Error(message);\n stack && extend(this, 'stack', stack);\n }\n }\n static CODES = {\n ASSERT: -90009,\n INVALID_JSONRPC: -99998,\n METHOD_NOT_FOUND: -32601,\n // Rust client\n UNKNOWN\n };\n}", "// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isNumber, isString, isUndefined, stringify } from '@polkadot/util';\nimport RpcError from \"./error.js\";\nfunction formatErrorData(data) {\n if (isUndefined(data)) {\n return '';\n }\n const formatted = `: ${isString(data) ? data.replace(/Error\\(\"/g, '').replace(/\\(\"/g, '(').replace(/\"\\)/g, ')').replace(/\\(/g, ', ').replace(/\\)/g, '') : stringify(data)}`;\n\n // We need some sort of cut-off here since these can be very large and\n // very nested, pick a number and trim the result display to it\n return formatted.length <= 256 ? formatted : `${formatted.substring(0, 255)}\u2026`;\n}\nfunction checkError(error) {\n if (error) {\n const {\n code,\n data,\n message\n } = error;\n throw new RpcError(`${code}: ${message}${formatErrorData(data)}`, code, data);\n }\n}\n\n/** @internal */\nexport class RpcCoder {\n #id = 0;\n decodeResponse(response) {\n if (!response || response.jsonrpc !== '2.0') {\n throw new Error('Invalid jsonrpc field in decoded object');\n }\n const isSubscription = !isUndefined(response.params) && !isUndefined(response.method);\n if (!isNumber(response.id) && (!isSubscription || !isNumber(response.params.subscription) && !isString(response.params.subscription))) {\n throw new Error('Invalid id field in decoded object');\n }\n checkError(response.error);\n if (response.result === undefined && !isSubscription) {\n throw new Error('No result found in jsonrpc response');\n }\n if (isSubscription) {\n checkError(response.params.error);\n return response.params.result;\n }\n return response.result;\n }\n encodeJson(method, params) {\n const [id, data] = this.encodeObject(method, params);\n return [id, stringify(data)];\n }\n encodeObject(method, params) {\n const id = ++this.#id;\n return [id, {\n id,\n jsonrpc: '2.0',\n method,\n params\n }];\n }\n}", "// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nconst HTTP_URL = 'http://127.0.0.1:9933';\nconst WS_URL = 'ws://127.0.0.1:9944';\nexport default {\n HTTP_URL,\n WS_URL\n};", "import _classPrivateFieldLooseBase from \"@babel/runtime/helpers/esm/classPrivateFieldLooseBase\";\nimport _classPrivateFieldLooseKey from \"@babel/runtime/helpers/esm/classPrivateFieldLooseKey\";\n// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// Assuming all 1.5MB responses, we apply a default allowing for 192MB\n// cache space (depending on the historic queries this would vary, metadata\n// for Kusama/Polkadot/Substrate falls between 600-750K, 2x for estimate)\nconst DEFAULT_CAPACITY = 128;\nclass LRUNode {\n constructor(key) {\n this.key = key;\n this.next = this.prev = this;\n }\n}\n\n// https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU\nvar _data = /*#__PURE__*/_classPrivateFieldLooseKey(\"data\");\nvar _refs = /*#__PURE__*/_classPrivateFieldLooseKey(\"refs\");\nvar _length = /*#__PURE__*/_classPrivateFieldLooseKey(\"length\");\nvar _head = /*#__PURE__*/_classPrivateFieldLooseKey(\"head\");\nvar _tail = /*#__PURE__*/_classPrivateFieldLooseKey(\"tail\");\nvar _toHead = /*#__PURE__*/_classPrivateFieldLooseKey(\"toHead\");\nexport class LRUCache {\n constructor(capacity = DEFAULT_CAPACITY) {\n Object.defineProperty(this, _toHead, {\n value: _toHead2\n });\n this.capacity = void 0;\n Object.defineProperty(this, _data, {\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, _refs, {\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, _length, {\n writable: true,\n value: 0\n });\n Object.defineProperty(this, _head, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _tail, {\n writable: true,\n value: void 0\n });\n this.capacity = capacity;\n _classPrivateFieldLooseBase(this, _head)[_head] = _classPrivateFieldLooseBase(this, _tail)[_tail] = new LRUNode('');\n }\n get length() {\n return _classPrivateFieldLooseBase(this, _length)[_length];\n }\n get lengthData() {\n return _classPrivateFieldLooseBase(this, _data)[_data].size;\n }\n get lengthRefs() {\n return _classPrivateFieldLooseBase(this, _refs)[_refs].size;\n }\n entries() {\n const keys = this.keys();\n const entries = new Array(keys.length);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n entries[i] = [key, _classPrivateFieldLooseBase(this, _data)[_data].get(key)];\n }\n return entries;\n }\n keys() {\n const keys = [];\n if (_classPrivateFieldLooseBase(this, _length)[_length]) {\n let curr = _classPrivateFieldLooseBase(this, _head)[_head];\n while (curr !== _classPrivateFieldLooseBase(this, _tail)[_tail]) {\n keys.push(curr.key);\n curr = curr.next;\n }\n keys.push(curr.key);\n }\n return keys;\n }\n get(key) {\n const data = _classPrivateFieldLooseBase(this, _data)[_data].get(key);\n if (data) {\n _classPrivateFieldLooseBase(this, _toHead)[_toHead](key);\n return data;\n }\n return null;\n }\n set(key, value) {\n if (_classPrivateFieldLooseBase(this, _data)[_data].has(key)) {\n _classPrivateFieldLooseBase(this, _toHead)[_toHead](key);\n } else {\n const node = new LRUNode(key);\n _classPrivateFieldLooseBase(this, _refs)[_refs].set(node.key, node);\n if (this.length === 0) {\n _classPrivateFieldLooseBase(this, _head)[_head] = _classPrivateFieldLooseBase(this, _tail)[_tail] = node;\n } else {\n _classPrivateFieldLooseBase(this, _head)[_head].prev = node;\n node.next = _classPrivateFieldLooseBase(this, _head)[_head];\n _classPrivateFieldLooseBase(this, _head)[_head] = node;\n }\n if (_classPrivateFieldLooseBase(this, _length)[_length] === this.capacity) {\n _classPrivateFieldLooseBase(this, _data)[_data].delete(_classPrivateFieldLooseBase(this, _tail)[_tail].key);\n _classPrivateFieldLooseBase(this, _refs)[_refs].delete(_classPrivateFieldLooseBase(this, _tail)[_tail].key);\n _classPrivateFieldLooseBase(this, _tail)[_tail] = _classPrivateFieldLooseBase(this, _tail)[_tail].prev;\n _classPrivateFieldLooseBase(this, _tail)[_tail].next = _classPrivateFieldLooseBase(this, _head)[_head];\n } else {\n _classPrivateFieldLooseBase(this, _length)[_length] += 1;\n }\n }\n _classPrivateFieldLooseBase(this, _data)[_data].set(key, value);\n }\n}\nfunction _toHead2(key) {\n const ref = _classPrivateFieldLooseBase(this, _refs)[_refs].get(key);\n if (ref && ref !== _classPrivateFieldLooseBase(this, _head)[_head]) {\n ref.prev.next = ref.next;\n ref.next.prev = ref.prev;\n ref.next = _classPrivateFieldLooseBase(this, _head)[_head];\n _classPrivateFieldLooseBase(this, _head)[_head].prev = ref;\n _classPrivateFieldLooseBase(this, _head)[_head] = ref;\n }\n}", "import _classPrivateFieldLooseBase from \"@babel/runtime/helpers/esm/classPrivateFieldLooseBase\";\nimport _classPrivateFieldLooseKey from \"@babel/runtime/helpers/esm/classPrivateFieldLooseKey\";\n// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { logger } from '@polkadot/util';\nimport { fetch } from '@polkadot/x-fetch';\nimport { RpcCoder } from \"../coder/index.js\";\nimport defaults from \"../defaults.js\";\nimport { LRUCache } from \"../lru.js\";\nconst ERROR_SUBSCRIBE = 'HTTP Provider does not have subscriptions, use WebSockets instead';\nconst l = logger('api-http');\n\n/**\n * # @polkadot/rpc-provider\n *\n * @name HttpProvider\n *\n * @description The HTTP Provider allows sending requests using HTTP to a HTTP RPC server TCP port. It does not support subscriptions so you won't be able to listen to events such as new blocks or balance changes. It is usually preferable using the [[WsProvider]].\n *\n * @example\n *
\n *\n * ```javascript\n * import Api from '@polkadot/api/promise';\n * import { HttpProvider } from '@polkadot/rpc-provider';\n *\n * const provider = new HttpProvider('http://127.0.0.1:9933');\n * const api = new Api(provider);\n * ```\n *\n * @see [[WsProvider]]\n */\nvar _callCache = /*#__PURE__*/_classPrivateFieldLooseKey(\"callCache\");\nvar _coder = /*#__PURE__*/_classPrivateFieldLooseKey(\"coder\");\nvar _endpoint = /*#__PURE__*/_classPrivateFieldLooseKey(\"endpoint\");\nvar _headers = /*#__PURE__*/_classPrivateFieldLooseKey(\"headers\");\nvar _stats = /*#__PURE__*/_classPrivateFieldLooseKey(\"stats\");\nvar _send = /*#__PURE__*/_classPrivateFieldLooseKey(\"send\");\nexport class HttpProvider {\n /**\n * @param {string} endpoint The endpoint url starting with http://\n */\n constructor(endpoint = defaults.HTTP_URL, headers = {}) {\n Object.defineProperty(this, _send, {\n value: _send2\n });\n Object.defineProperty(this, _callCache, {\n writable: true,\n value: new LRUCache()\n });\n Object.defineProperty(this, _coder, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _endpoint, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _headers, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _stats, {\n writable: true,\n value: void 0\n });\n if (!/^(https|http):\\/\\//.test(endpoint)) {\n throw new Error(`Endpoint should start with 'http://' or 'https://', received '${endpoint}'`);\n }\n _classPrivateFieldLooseBase(this, _coder)[_coder] = new RpcCoder();\n _classPrivateFieldLooseBase(this, _endpoint)[_endpoint] = endpoint;\n _classPrivateFieldLooseBase(this, _headers)[_headers] = headers;\n _classPrivateFieldLooseBase(this, _stats)[_stats] = {\n active: {\n requests: 0,\n subscriptions: 0\n },\n total: {\n bytesRecv: 0,\n bytesSent: 0,\n cached: 0,\n errors: 0,\n requests: 0,\n subscriptions: 0,\n timeout: 0\n }\n };\n }\n\n /**\n * @summary `true` when this provider supports subscriptions\n */\n get hasSubscriptions() {\n return false;\n }\n\n /**\n * @description Returns a clone of the object\n */\n clone() {\n return new HttpProvider(_classPrivateFieldLooseBase(this, _endpoint)[_endpoint], _classPrivateFieldLooseBase(this, _headers)[_headers]);\n }\n\n /**\n * @description Manually connect from the connection\n */\n async connect() {\n // noop\n }\n\n /**\n * @description Manually disconnect from the connection\n */\n async disconnect() {\n // noop\n }\n\n /**\n * @description Returns the connection stats\n */\n get stats() {\n return _classPrivateFieldLooseBase(this, _stats)[_stats];\n }\n\n /**\n * @summary `true` when this provider supports clone()\n */\n get isClonable() {\n return true;\n }\n\n /**\n * @summary Whether the node is connected or not.\n * @return {boolean} true if connected\n */\n get isConnected() {\n return true;\n }\n\n /**\n * @summary Events are not supported with the HttpProvider, see [[WsProvider]].\n * @description HTTP Provider does not have 'on' emitters. WebSockets should be used instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n on(type, sub) {\n l.error('HTTP Provider does not have \\'on\\' emitters, use WebSockets instead');\n return () => {\n // noop\n };\n }\n\n /**\n * @summary Send HTTP POST Request with Body to configured HTTP Endpoint.\n */\n async send(method, params, isCacheable) {\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.requests++;\n const [, body] = _classPrivateFieldLooseBase(this, _coder)[_coder].encodeJson(method, params);\n let resultPromise = isCacheable ? _classPrivateFieldLooseBase(this, _callCache)[_callCache].get(body) : null;\n if (!resultPromise) {\n resultPromise = _classPrivateFieldLooseBase(this, _send)[_send](body);\n if (isCacheable) {\n _classPrivateFieldLooseBase(this, _callCache)[_callCache].set(body, resultPromise);\n }\n } else {\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.cached++;\n }\n return resultPromise;\n }\n /**\n * @summary Subscriptions are not supported with the HttpProvider, see [[WsProvider]].\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await\n async subscribe(types, method, params, cb) {\n l.error(ERROR_SUBSCRIBE);\n throw new Error(ERROR_SUBSCRIBE);\n }\n\n /**\n * @summary Subscriptions are not supported with the HttpProvider, see [[WsProvider]].\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await\n async unsubscribe(type, method, id) {\n l.error(ERROR_SUBSCRIBE);\n throw new Error(ERROR_SUBSCRIBE);\n }\n}\nasync function _send2(body) {\n _classPrivateFieldLooseBase(this, _stats)[_stats].active.requests++;\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.bytesSent += body.length;\n try {\n const response = await fetch(_classPrivateFieldLooseBase(this, _endpoint)[_endpoint], {\n body,\n headers: {\n Accept: 'application/json',\n 'Content-Length': `${body.length}`,\n 'Content-Type': 'application/json',\n ..._classPrivateFieldLooseBase(this, _headers)[_headers]\n },\n method: 'POST'\n });\n if (!response.ok) {\n throw new Error(`[${response.status}]: ${response.statusText}`);\n }\n const result = await response.text();\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.bytesRecv += result.length;\n const decoded = _classPrivateFieldLooseBase(this, _coder)[_coder].decodeResponse(JSON.parse(result));\n _classPrivateFieldLooseBase(this, _stats)[_stats].active.requests--;\n return decoded;\n } catch (e) {\n _classPrivateFieldLooseBase(this, _stats)[_stats].active.requests--;\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.errors++;\n throw e;\n }\n}", "// Copyright 2017-2023 @polkadot/x-ws authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { xglobal } from '@polkadot/x-global';\nexport { packageInfo } from \"./packageInfo.js\";\nexport const WebSocket = xglobal.WebSocket;", "// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// from https://stackoverflow.com/questions/19304157/getting-the-reason-why-websockets-closed-with-close-code-1006\n\nconst known = {\n 1000: 'Normal Closure',\n 1001: 'Going Away',\n 1002: 'Protocol Error',\n 1003: 'Unsupported Data',\n 1004: '(For future)',\n 1005: 'No Status Received',\n 1006: 'Abnormal Closure',\n 1007: 'Invalid frame payload data',\n 1008: 'Policy Violation',\n 1009: 'Message too big',\n 1010: 'Missing Extension',\n 1011: 'Internal Error',\n 1012: 'Service Restart',\n 1013: 'Try Again Later',\n 1014: 'Bad Gateway',\n 1015: 'TLS Handshake'\n};\nfunction getUnmapped(code) {\n if (code <= 1999) {\n return '(For WebSocket standard)';\n } else if (code <= 2999) {\n return '(For WebSocket extensions)';\n } else if (code <= 3999) {\n return '(For libraries and frameworks)';\n } else if (code <= 4999) {\n return '(For applications)';\n }\n}\nexport function getWSErrorString(code) {\n if (code >= 0 && code <= 999) {\n return '(Unused)';\n }\n return known[code] || getUnmapped(code) || '(Unknown)';\n}", "import _classPrivateFieldLooseBase from \"@babel/runtime/helpers/esm/classPrivateFieldLooseBase\";\nimport _classPrivateFieldLooseKey from \"@babel/runtime/helpers/esm/classPrivateFieldLooseKey\";\n// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable camelcase */\n\nimport EventEmitter from 'eventemitter3';\nimport { isChildClass, isNull, isUndefined, logger, objectSpread } from '@polkadot/util';\nimport { xglobal } from '@polkadot/x-global';\nimport { WebSocket } from '@polkadot/x-ws';\nimport { RpcCoder } from \"../coder/index.js\";\nimport defaults from \"../defaults.js\";\nimport { LRUCache } from \"../lru.js\";\nimport { getWSErrorString } from \"./errors.js\";\nconst ALIASES = {\n chain_finalisedHead: 'chain_finalizedHead',\n chain_subscribeFinalisedHeads: 'chain_subscribeFinalizedHeads',\n chain_unsubscribeFinalisedHeads: 'chain_unsubscribeFinalizedHeads'\n};\nconst RETRY_DELAY = 2500;\nconst DEFAULT_TIMEOUT_MS = 60 * 1000;\nconst TIMEOUT_INTERVAL = 5000;\nconst MEGABYTE = 1024 * 1024;\nconst l = logger('api-ws');\nfunction eraseRecord(record, cb) {\n Object.keys(record).forEach(key => {\n if (cb) {\n cb(record[key]);\n }\n delete record[key];\n });\n}\n\n/**\n * # @polkadot/rpc-provider/ws\n *\n * @name WsProvider\n *\n * @description The WebSocket Provider allows sending requests using WebSocket to a WebSocket RPC server TCP port. Unlike the [[HttpProvider]], it does support subscriptions and allows listening to events such as new blocks or balance changes.\n *\n * @example\n *
\n *\n * ```javascript\n * import Api from '@polkadot/api/promise';\n * import { WsProvider } from '@polkadot/rpc-provider/ws';\n *\n * const provider = new WsProvider('ws://127.0.0.1:9944');\n * const api = new Api(provider);\n * ```\n *\n * @see [[HttpProvider]]\n */\nvar _callCache = /*#__PURE__*/_classPrivateFieldLooseKey(\"callCache\");\nvar _coder = /*#__PURE__*/_classPrivateFieldLooseKey(\"coder\");\nvar _endpoints = /*#__PURE__*/_classPrivateFieldLooseKey(\"endpoints\");\nvar _headers = /*#__PURE__*/_classPrivateFieldLooseKey(\"headers\");\nvar _eventemitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"eventemitter\");\nvar _handlers = /*#__PURE__*/_classPrivateFieldLooseKey(\"handlers\");\nvar _isReadyPromise = /*#__PURE__*/_classPrivateFieldLooseKey(\"isReadyPromise\");\nvar _stats = /*#__PURE__*/_classPrivateFieldLooseKey(\"stats\");\nvar _waitingForId = /*#__PURE__*/_classPrivateFieldLooseKey(\"waitingForId\");\nvar _autoConnectMs = /*#__PURE__*/_classPrivateFieldLooseKey(\"autoConnectMs\");\nvar _endpointIndex = /*#__PURE__*/_classPrivateFieldLooseKey(\"endpointIndex\");\nvar _isConnected = /*#__PURE__*/_classPrivateFieldLooseKey(\"isConnected\");\nvar _subscriptions = /*#__PURE__*/_classPrivateFieldLooseKey(\"subscriptions\");\nvar _timeoutId = /*#__PURE__*/_classPrivateFieldLooseKey(\"timeoutId\");\nvar _websocket = /*#__PURE__*/_classPrivateFieldLooseKey(\"websocket\");\nvar _timeout = /*#__PURE__*/_classPrivateFieldLooseKey(\"timeout\");\nvar _send = /*#__PURE__*/_classPrivateFieldLooseKey(\"send\");\nvar _emit = /*#__PURE__*/_classPrivateFieldLooseKey(\"emit\");\nvar _onSocketClose = /*#__PURE__*/_classPrivateFieldLooseKey(\"onSocketClose\");\nvar _onSocketError = /*#__PURE__*/_classPrivateFieldLooseKey(\"onSocketError\");\nvar _onSocketMessage = /*#__PURE__*/_classPrivateFieldLooseKey(\"onSocketMessage\");\nvar _onSocketMessageResult = /*#__PURE__*/_classPrivateFieldLooseKey(\"onSocketMessageResult\");\nvar _onSocketMessageSubscribe = /*#__PURE__*/_classPrivateFieldLooseKey(\"onSocketMessageSubscribe\");\nvar _onSocketOpen = /*#__PURE__*/_classPrivateFieldLooseKey(\"onSocketOpen\");\nvar _resubscribe = /*#__PURE__*/_classPrivateFieldLooseKey(\"resubscribe\");\nvar _timeoutHandlers = /*#__PURE__*/_classPrivateFieldLooseKey(\"timeoutHandlers\");\nexport class WsProvider {\n /**\n * @param {string | string[]} endpoint The endpoint url. Usually `ws://ip:9944` or `wss://ip:9944`, may provide an array of endpoint strings.\n * @param {number | false} autoConnectMs Whether to connect automatically or not (default). Provided value is used as a delay between retries.\n * @param {Record} headers The headers provided to the underlying WebSocket\n * @param {number} [timeout] Custom timeout value used per request . Defaults to `DEFAULT_TIMEOUT_MS`\n */\n constructor(endpoint = defaults.WS_URL, autoConnectMs = RETRY_DELAY, headers = {}, timeout) {\n Object.defineProperty(this, _send, {\n value: _send2\n });\n Object.defineProperty(this, _callCache, {\n writable: true,\n value: new LRUCache()\n });\n Object.defineProperty(this, _coder, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _endpoints, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _headers, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _eventemitter, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _handlers, {\n writable: true,\n value: {}\n });\n Object.defineProperty(this, _isReadyPromise, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _stats, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _waitingForId, {\n writable: true,\n value: {}\n });\n Object.defineProperty(this, _autoConnectMs, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _endpointIndex, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _isConnected, {\n writable: true,\n value: false\n });\n Object.defineProperty(this, _subscriptions, {\n writable: true,\n value: {}\n });\n Object.defineProperty(this, _timeoutId, {\n writable: true,\n value: null\n });\n Object.defineProperty(this, _websocket, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _timeout, {\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, _emit, {\n writable: true,\n value: (type, ...args) => {\n _classPrivateFieldLooseBase(this, _eventemitter)[_eventemitter].emit(type, ...args);\n }\n });\n Object.defineProperty(this, _onSocketClose, {\n writable: true,\n value: event => {\n const error = new Error(`disconnected from ${_classPrivateFieldLooseBase(this, _endpoints)[_endpoints][_classPrivateFieldLooseBase(this, _endpointIndex)[_endpointIndex]]}: ${event.code}:: ${event.reason || getWSErrorString(event.code)}`);\n if (_classPrivateFieldLooseBase(this, _autoConnectMs)[_autoConnectMs] > 0) {\n l.error(error.message);\n }\n _classPrivateFieldLooseBase(this, _isConnected)[_isConnected] = false;\n if (_classPrivateFieldLooseBase(this, _websocket)[_websocket]) {\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].onclose = null;\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].onerror = null;\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].onmessage = null;\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].onopen = null;\n _classPrivateFieldLooseBase(this, _websocket)[_websocket] = null;\n }\n if (_classPrivateFieldLooseBase(this, _timeoutId)[_timeoutId]) {\n clearInterval(_classPrivateFieldLooseBase(this, _timeoutId)[_timeoutId]);\n _classPrivateFieldLooseBase(this, _timeoutId)[_timeoutId] = null;\n }\n _classPrivateFieldLooseBase(this, _emit)[_emit]('disconnected');\n\n // reject all hanging requests\n eraseRecord(_classPrivateFieldLooseBase(this, _handlers)[_handlers], h => {\n try {\n h.callback(error, undefined);\n } catch (err) {\n // does not throw\n l.error(err);\n }\n });\n eraseRecord(_classPrivateFieldLooseBase(this, _waitingForId)[_waitingForId]);\n if (_classPrivateFieldLooseBase(this, _autoConnectMs)[_autoConnectMs] > 0) {\n setTimeout(() => {\n this.connectWithRetry().catch(() => {\n // does not throw\n });\n }, _classPrivateFieldLooseBase(this, _autoConnectMs)[_autoConnectMs]);\n }\n }\n });\n Object.defineProperty(this, _onSocketError, {\n writable: true,\n value: error => {\n l.debug(() => ['socket error', error]);\n _classPrivateFieldLooseBase(this, _emit)[_emit]('error', error);\n }\n });\n Object.defineProperty(this, _onSocketMessage, {\n writable: true,\n value: message => {\n l.debug(() => ['received', message.data]);\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.bytesRecv += message.data.length;\n const response = JSON.parse(message.data);\n return isUndefined(response.method) ? _classPrivateFieldLooseBase(this, _onSocketMessageResult)[_onSocketMessageResult](response) : _classPrivateFieldLooseBase(this, _onSocketMessageSubscribe)[_onSocketMessageSubscribe](response);\n }\n });\n Object.defineProperty(this, _onSocketMessageResult, {\n writable: true,\n value: response => {\n const handler = _classPrivateFieldLooseBase(this, _handlers)[_handlers][response.id];\n if (!handler) {\n l.debug(() => `Unable to find handler for id=${response.id}`);\n return;\n }\n try {\n const {\n method,\n params,\n subscription\n } = handler;\n const result = _classPrivateFieldLooseBase(this, _coder)[_coder].decodeResponse(response);\n\n // first send the result - in case of subs, we may have an update\n // immediately if we have some queued results already\n handler.callback(null, result);\n if (subscription) {\n const subId = `${subscription.type}::${result}`;\n _classPrivateFieldLooseBase(this, _subscriptions)[_subscriptions][subId] = objectSpread({}, subscription, {\n method,\n params\n });\n\n // if we have a result waiting for this subscription already\n if (_classPrivateFieldLooseBase(this, _waitingForId)[_waitingForId][subId]) {\n _classPrivateFieldLooseBase(this, _onSocketMessageSubscribe)[_onSocketMessageSubscribe](_classPrivateFieldLooseBase(this, _waitingForId)[_waitingForId][subId]);\n }\n }\n } catch (error) {\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.errors++;\n handler.callback(error, undefined);\n }\n delete _classPrivateFieldLooseBase(this, _handlers)[_handlers][response.id];\n }\n });\n Object.defineProperty(this, _onSocketMessageSubscribe, {\n writable: true,\n value: response => {\n const method = ALIASES[response.method] || response.method || 'invalid';\n const subId = `${method}::${response.params.subscription}`;\n const handler = _classPrivateFieldLooseBase(this, _subscriptions)[_subscriptions][subId];\n if (!handler) {\n // store the JSON, we could have out-of-order subid coming in\n _classPrivateFieldLooseBase(this, _waitingForId)[_waitingForId][subId] = response;\n l.debug(() => `Unable to find handler for subscription=${subId}`);\n return;\n }\n\n // housekeeping\n delete _classPrivateFieldLooseBase(this, _waitingForId)[_waitingForId][subId];\n try {\n const result = _classPrivateFieldLooseBase(this, _coder)[_coder].decodeResponse(response);\n handler.callback(null, result);\n } catch (error) {\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.errors++;\n handler.callback(error, undefined);\n }\n }\n });\n Object.defineProperty(this, _onSocketOpen, {\n writable: true,\n value: () => {\n if (_classPrivateFieldLooseBase(this, _websocket)[_websocket] === null) {\n throw new Error('WebSocket cannot be null in onOpen');\n }\n l.debug(() => ['connected to', _classPrivateFieldLooseBase(this, _endpoints)[_endpoints][_classPrivateFieldLooseBase(this, _endpointIndex)[_endpointIndex]]]);\n _classPrivateFieldLooseBase(this, _isConnected)[_isConnected] = true;\n _classPrivateFieldLooseBase(this, _emit)[_emit]('connected');\n _classPrivateFieldLooseBase(this, _resubscribe)[_resubscribe]();\n return true;\n }\n });\n Object.defineProperty(this, _resubscribe, {\n writable: true,\n value: () => {\n const subscriptions = _classPrivateFieldLooseBase(this, _subscriptions)[_subscriptions];\n _classPrivateFieldLooseBase(this, _subscriptions)[_subscriptions] = {};\n Promise.all(Object.keys(subscriptions).map(async id => {\n const {\n callback,\n method,\n params,\n type\n } = subscriptions[id];\n\n // only re-create subscriptions which are not in author (only area where\n // transactions are created, i.e. submissions such as 'author_submitAndWatchExtrinsic'\n // are not included (and will not be re-broadcast)\n if (type.startsWith('author_')) {\n return;\n }\n try {\n await this.subscribe(type, method, params, callback);\n } catch (error) {\n l.error(error);\n }\n })).catch(l.error);\n }\n });\n Object.defineProperty(this, _timeoutHandlers, {\n writable: true,\n value: () => {\n const now = Date.now();\n const ids = Object.keys(_classPrivateFieldLooseBase(this, _handlers)[_handlers]);\n for (let i = 0; i < ids.length; i++) {\n const handler = _classPrivateFieldLooseBase(this, _handlers)[_handlers][ids[i]];\n if (now - handler.start > _classPrivateFieldLooseBase(this, _timeout)[_timeout]) {\n try {\n handler.callback(new Error(`No response received from RPC endpoint in ${_classPrivateFieldLooseBase(this, _timeout)[_timeout] / 1000}s`), undefined);\n } catch {\n // ignore\n }\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.timeout++;\n delete _classPrivateFieldLooseBase(this, _handlers)[_handlers][ids[i]];\n }\n }\n }\n });\n const endpoints = Array.isArray(endpoint) ? endpoint : [endpoint];\n if (endpoints.length === 0) {\n throw new Error('WsProvider requires at least one Endpoint');\n }\n endpoints.forEach(endpoint => {\n if (!/^(wss|ws):\\/\\//.test(endpoint)) {\n throw new Error(`Endpoint should start with 'ws://', received '${endpoint}'`);\n }\n });\n _classPrivateFieldLooseBase(this, _eventemitter)[_eventemitter] = new EventEmitter();\n _classPrivateFieldLooseBase(this, _autoConnectMs)[_autoConnectMs] = autoConnectMs || 0;\n _classPrivateFieldLooseBase(this, _coder)[_coder] = new RpcCoder();\n _classPrivateFieldLooseBase(this, _endpointIndex)[_endpointIndex] = -1;\n _classPrivateFieldLooseBase(this, _endpoints)[_endpoints] = endpoints;\n _classPrivateFieldLooseBase(this, _headers)[_headers] = headers;\n _classPrivateFieldLooseBase(this, _websocket)[_websocket] = null;\n _classPrivateFieldLooseBase(this, _stats)[_stats] = {\n active: {\n requests: 0,\n subscriptions: 0\n },\n total: {\n bytesRecv: 0,\n bytesSent: 0,\n cached: 0,\n errors: 0,\n requests: 0,\n subscriptions: 0,\n timeout: 0\n }\n };\n _classPrivateFieldLooseBase(this, _timeout)[_timeout] = timeout || DEFAULT_TIMEOUT_MS;\n if (autoConnectMs > 0) {\n this.connectWithRetry().catch(() => {\n // does not throw\n });\n }\n _classPrivateFieldLooseBase(this, _isReadyPromise)[_isReadyPromise] = new Promise(resolve => {\n _classPrivateFieldLooseBase(this, _eventemitter)[_eventemitter].once('connected', () => {\n resolve(this);\n });\n });\n }\n\n /**\n * @summary `true` when this provider supports subscriptions\n */\n get hasSubscriptions() {\n return true;\n }\n\n /**\n * @summary `true` when this provider supports clone()\n */\n get isClonable() {\n return true;\n }\n\n /**\n * @summary Whether the node is connected or not.\n * @return {boolean} true if connected\n */\n get isConnected() {\n return _classPrivateFieldLooseBase(this, _isConnected)[_isConnected];\n }\n\n /**\n * @description Promise that resolves the first time we are connected and loaded\n */\n get isReady() {\n return _classPrivateFieldLooseBase(this, _isReadyPromise)[_isReadyPromise];\n }\n\n /**\n * @description Returns a clone of the object\n */\n clone() {\n return new WsProvider(_classPrivateFieldLooseBase(this, _endpoints)[_endpoints]);\n }\n\n /**\n * @summary Manually connect\n * @description The [[WsProvider]] connects automatically by default, however if you decided otherwise, you may\n * connect manually using this method.\n */\n // eslint-disable-next-line @typescript-eslint/require-await\n async connect() {\n if (_classPrivateFieldLooseBase(this, _websocket)[_websocket]) {\n throw new Error('WebSocket is already connected');\n }\n try {\n _classPrivateFieldLooseBase(this, _endpointIndex)[_endpointIndex] = (_classPrivateFieldLooseBase(this, _endpointIndex)[_endpointIndex] + 1) % _classPrivateFieldLooseBase(this, _endpoints)[_endpoints].length;\n\n // the as typeof WebSocket here is Deno-specific - not available on the globalThis\n _classPrivateFieldLooseBase(this, _websocket)[_websocket] = typeof xglobal.WebSocket !== 'undefined' && isChildClass(xglobal.WebSocket, WebSocket) ? new WebSocket(_classPrivateFieldLooseBase(this, _endpoints)[_endpoints][_classPrivateFieldLooseBase(this, _endpointIndex)[_endpointIndex]])\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - WS may be an instance of w3cwebsocket, which supports headers\n : new WebSocket(_classPrivateFieldLooseBase(this, _endpoints)[_endpoints][_classPrivateFieldLooseBase(this, _endpointIndex)[_endpointIndex]], undefined, undefined, _classPrivateFieldLooseBase(this, _headers)[_headers], undefined, {\n // default: true\n fragmentOutgoingMessages: true,\n // default: 16K (bump, the Node has issues with too many fragments, e.g. on setCode)\n fragmentationThreshold: 1 * MEGABYTE,\n // default: 1MiB (also align with maxReceivedMessageSize)\n maxReceivedFrameSize: 24 * MEGABYTE,\n // default: 8MB (however Polkadot api.query.staking.erasStakers.entries(356) is over that, 16M is ok there)\n maxReceivedMessageSize: 24 * MEGABYTE\n });\n if (_classPrivateFieldLooseBase(this, _websocket)[_websocket]) {\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].onclose = _classPrivateFieldLooseBase(this, _onSocketClose)[_onSocketClose];\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].onerror = _classPrivateFieldLooseBase(this, _onSocketError)[_onSocketError];\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].onmessage = _classPrivateFieldLooseBase(this, _onSocketMessage)[_onSocketMessage];\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].onopen = _classPrivateFieldLooseBase(this, _onSocketOpen)[_onSocketOpen];\n }\n\n // timeout any handlers that have not had a response\n _classPrivateFieldLooseBase(this, _timeoutId)[_timeoutId] = setInterval(() => _classPrivateFieldLooseBase(this, _timeoutHandlers)[_timeoutHandlers](), TIMEOUT_INTERVAL);\n } catch (error) {\n l.error(error);\n _classPrivateFieldLooseBase(this, _emit)[_emit]('error', error);\n throw error;\n }\n }\n\n /**\n * @description Connect, never throwing an error, but rather forcing a retry\n */\n async connectWithRetry() {\n if (_classPrivateFieldLooseBase(this, _autoConnectMs)[_autoConnectMs] > 0) {\n try {\n await this.connect();\n } catch (error) {\n setTimeout(() => {\n this.connectWithRetry().catch(() => {\n // does not throw\n });\n }, _classPrivateFieldLooseBase(this, _autoConnectMs)[_autoConnectMs]);\n }\n }\n }\n\n /**\n * @description Manually disconnect from the connection, clearing auto-connect logic\n */\n // eslint-disable-next-line @typescript-eslint/require-await\n async disconnect() {\n // switch off autoConnect, we are in manual mode now\n _classPrivateFieldLooseBase(this, _autoConnectMs)[_autoConnectMs] = 0;\n try {\n if (_classPrivateFieldLooseBase(this, _websocket)[_websocket]) {\n // 1000 - Normal closure; the connection successfully completed\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].close(1000);\n }\n } catch (error) {\n l.error(error);\n _classPrivateFieldLooseBase(this, _emit)[_emit]('error', error);\n throw error;\n }\n }\n\n /**\n * @description Returns the connection stats\n */\n get stats() {\n return {\n active: {\n requests: Object.keys(_classPrivateFieldLooseBase(this, _handlers)[_handlers]).length,\n subscriptions: Object.keys(_classPrivateFieldLooseBase(this, _subscriptions)[_subscriptions]).length\n },\n total: _classPrivateFieldLooseBase(this, _stats)[_stats].total\n };\n }\n\n /**\n * @summary Listens on events after having subscribed using the [[subscribe]] function.\n * @param {ProviderInterfaceEmitted} type Event\n * @param {ProviderInterfaceEmitCb} sub Callback\n * @return unsubscribe function\n */\n on(type, sub) {\n _classPrivateFieldLooseBase(this, _eventemitter)[_eventemitter].on(type, sub);\n return () => {\n _classPrivateFieldLooseBase(this, _eventemitter)[_eventemitter].removeListener(type, sub);\n };\n }\n\n /**\n * @summary Send JSON data using WebSockets to configured HTTP Endpoint or queue.\n * @param method The RPC methods to execute\n * @param params Encoded parameters as applicable for the method\n * @param subscription Subscription details (internally used)\n */\n send(method, params, isCacheable, subscription) {\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.requests++;\n const [id, body] = _classPrivateFieldLooseBase(this, _coder)[_coder].encodeJson(method, params);\n let resultPromise = isCacheable ? _classPrivateFieldLooseBase(this, _callCache)[_callCache].get(body) : null;\n if (!resultPromise) {\n resultPromise = _classPrivateFieldLooseBase(this, _send)[_send](id, body, method, params, subscription);\n if (isCacheable) {\n _classPrivateFieldLooseBase(this, _callCache)[_callCache].set(body, resultPromise);\n }\n } else {\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.cached++;\n }\n return resultPromise;\n }\n /**\n * @name subscribe\n * @summary Allows subscribing to a specific event.\n *\n * @example\n *
\n *\n * ```javascript\n * const provider = new WsProvider('ws://127.0.0.1:9944');\n * const rpc = new Rpc(provider);\n *\n * rpc.state.subscribeStorage([[storage.system.account,
]], (_, values) => {\n * console.log(values)\n * }).then((subscriptionId) => {\n * console.log('balance changes subscription id: ', subscriptionId)\n * })\n * ```\n */\n subscribe(type, method, params, callback) {\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.subscriptions++;\n\n // subscriptions are not cached, LRU applies to .at() only\n return this.send(method, params, false, {\n callback,\n type\n });\n }\n\n /**\n * @summary Allows unsubscribing to subscriptions made with [[subscribe]].\n */\n async unsubscribe(type, method, id) {\n const subscription = `${type}::${id}`;\n\n // FIXME This now could happen with re-subscriptions. The issue is that with a re-sub\n // the assigned id now does not match what the API user originally received. It has\n // a slight complication in solving - since we cannot rely on the send id, but rather\n // need to find the actual subscription id to map it\n if (isUndefined(_classPrivateFieldLooseBase(this, _subscriptions)[_subscriptions][subscription])) {\n l.debug(() => `Unable to find active subscription=${subscription}`);\n return false;\n }\n delete _classPrivateFieldLooseBase(this, _subscriptions)[_subscriptions][subscription];\n try {\n return this.isConnected && !isNull(_classPrivateFieldLooseBase(this, _websocket)[_websocket]) ? this.send(method, [id]) : true;\n } catch (error) {\n return false;\n }\n }\n}\nasync function _send2(id, body, method, params, subscription) {\n return new Promise((resolve, reject) => {\n try {\n if (!this.isConnected || _classPrivateFieldLooseBase(this, _websocket)[_websocket] === null) {\n throw new Error('WebSocket is not connected');\n }\n const callback = (error, result) => {\n error ? reject(error) : resolve(result);\n };\n l.debug(() => ['calling', method, body]);\n _classPrivateFieldLooseBase(this, _handlers)[_handlers][id] = {\n callback,\n method,\n params,\n start: Date.now(),\n subscription\n };\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.bytesSent += body.length;\n _classPrivateFieldLooseBase(this, _websocket)[_websocket].send(body);\n } catch (error) {\n _classPrivateFieldLooseBase(this, _stats)[_stats].total.errors++;\n reject(error);\n }\n });\n}", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n", "/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "/**\n * Used to create Error subclasses until the community moves away from ES5.\n *\n * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors\n * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123\n *\n * @param createImpl A factory function to create the actual constructor implementation. The returned\n * function should be a named function that calls `_super` internally.\n */\nexport function createErrorClass(createImpl: (_super: any) => any): T {\n const _super = (instance: any) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (errors: any[]): UnsubscriptionError;\n}\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass(\n (_super) =>\n function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n }\n);\n", "/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove(arr: T[] | undefined | null, item: T) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nexport class Subscription implements SubscriptionLike {\n /** @nocollapse */\n public static EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n */\n public closed = false;\n\n private _parentage: Subscription[] | Subscription | null = null;\n\n /**\n * The list of registered finalizers to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _finalizers: Exclude[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the finalization\n * process that is kicked off when {@link #unsubscribe} is called.\n */\n constructor(private initialTeardown?: () => void) {}\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n unsubscribe(): void {\n let errors: any[] | undefined;\n\n if (!this.closed) {\n this.closed = true;\n\n // Remove this from it's parents.\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors ?? [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n\n /**\n * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called\n * when this subscription is unsubscribed. If this subscription is already {@link #closed},\n * because it has already been unsubscribed, then whatever finalizer is passed to it\n * will automatically be executed (unless the finalizer itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed\n * subscription to a any subscription will result in no operation. (A noop).\n *\n * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n * operation at all. (A noop).\n *\n * `Subscription` instances that are added to this instance will automatically remove themselves\n * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n * will need to be removed manually with {@link #remove}\n *\n * @param teardown The finalization logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the finalizer if it's not undefined\n // and don't add a subscription to itself.\n if (teardown && teardown !== this) {\n if (this.closed) {\n // If this subscription is already closed,\n // execute whatever finalizer is handed to it automatically.\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n // We don't add closed subscriptions, and we don't add the same subscription\n // twice. Subscription unsubscribe is idempotent.\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = this._finalizers ?? []).push(teardown);\n }\n }\n }\n\n /**\n * Checks to see if a this subscription already has a particular parent.\n * This will signal that this subscription has already been added to the parent in question.\n * @param parent the parent to check for\n */\n private _hasParent(parent: Subscription) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n\n /**\n * Adds a parent to this subscription so it can be removed from the parent if it\n * unsubscribes on it's own.\n *\n * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n * @param parent The parent subscription to add\n */\n private _addParent(parent: Subscription) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n\n /**\n * Called on a child when it is removed via {@link #remove}.\n * @param parent The parent to remove\n */\n private _removeParent(parent: Subscription) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n\n /**\n * Removes a finalizer from this subscription that was previously added with the {@link #add} method.\n *\n * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n * from every other `Subscription` they have been added to. This means that using the `remove` method\n * is not a common thing and should be used thoughtfully.\n *\n * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All finalizer instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The finalizer to remove from this subscription\n */\n remove(teardown: Exclude): void {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n return (\n value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n );\n}\n\nfunction execFinalizer(finalizer: Unsubscribable | (() => void)) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n", "import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The {@link GlobalConfig} object for RxJS. It is used to configure things\n * like how to react on unhandled errors.\n */\nexport const config: GlobalConfig = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like how to react on unhandled errors. Accessible via {@link config}\n * object.\n */\nexport interface GlobalConfig {\n /**\n * A registration point for unhandled errors from RxJS. These are errors that\n * cannot were not handled by consuming code in the usual subscription path. For\n * example, if you have this configured, and you subscribe to an observable without\n * providing an error handler, errors from that subscription will end up here. This\n * will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onUnhandledError: ((err: any) => void) | null;\n\n /**\n * A registration point for notifications that cannot be sent to subscribers because they\n * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n * might want a different behavior. For example, with sources that attempt to report errors\n * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n * This will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null;\n\n /**\n * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}\n * methods.\n *\n * @deprecated As of version 8, RxJS will no longer support this sort of injection of a\n * Promise constructor. If you need a Promise implementation other than native promises,\n * please polyfill/patch Promise as you see appropriate. Will be removed in v8.\n */\n Promise?: PromiseConstructorLike;\n\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME\n * FOR MIGRATION REASONS.\n *\n * @deprecated As of version 8, RxJS will no longer support synchronous throwing\n * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n * behaviors described above. Will be removed in v8.\n */\n useDeprecatedSynchronousErrorHandling: boolean;\n\n /**\n * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n * `unsubscribe()` via `this` context in `next` functions created in observers passed\n * to `subscribe`.\n *\n * This is being removed because the performance was severely problematic, and it could also cause\n * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n * their `this` context overwritten.\n *\n * @deprecated As of version 8, RxJS will no longer support altering the\n * context of next functions provided as part of an observer to Subscribe. Instead,\n * you will have access to a subscription or a signal or token that will allow you to do things like\n * unsubscribe and test closed status. Will be removed in v8.\n */\n useDeprecatedNextContext: boolean;\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearTimeoutFunction = (handle: TimerHandle) => void;\n\ninterface TimeoutProvider {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n delegate:\n | {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n }\n | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setTimeout(handler: () => void, timeout?: number, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate?.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle as any);\n },\n delegate: undefined,\n};\n", "import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n // Execute the user-configured error handler.\n onUnhandledError(err);\n } else {\n // Throw so it is picked up by the runtime's uncaught error mechanism.\n throw err;\n }\n });\n}\n", "/* tslint:disable:no-empty */\nexport function noop() { }\n", "import { CompleteNotification, NextNotification, ErrorNotification } from './types';\n\n/**\n * A completion object optimized for memory use and created to be the\n * same \"shape\" as other notifications in v8.\n * @internal\n */\nexport const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)();\n\n/**\n * Internal use only. Creates an optimized error notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function errorNotification(error: any): ErrorNotification {\n return createNotification('E', undefined, error) as any;\n}\n\n/**\n * Internal use only. Creates an optimized next notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function nextNotification(value: T) {\n return createNotification('N', value, undefined) as NextNotification;\n}\n\n/**\n * Ensures that all notifications created internally have the same \"shape\" in v8.\n *\n * TODO: This is only exported to support a crazy legacy test in `groupBy`.\n * @internal\n */\nexport function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) {\n return {\n kind,\n value,\n error,\n };\n}\n", "import { config } from '../config';\n\nlet context: { errorThrown: boolean; error: any } | null = null;\n\n/**\n * Handles dealing with errors for super-gross mode. Creates a context, in which\n * any synchronously thrown errors will be passed to {@link captureError}. Which\n * will record the error such that it will be rethrown after the call back is complete.\n * TODO: Remove in v8\n * @param cb An immediately executed function.\n */\nexport function errorContext(cb: () => void) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context!;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n // This is the general non-deprecated path for everyone that\n // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling)\n cb();\n }\n}\n\n/**\n * Captures errors only in super-gross mode.\n * @param err the error to capture\n */\nexport function captureError(err: any) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { Observer, ObservableNotification } from './types';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber\n */\nexport class Subscriber extends Subscription implements Observer {\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param next The `next` callback of an Observer.\n * @param error The `error` callback of an\n * Observer.\n * @param complete The `complete` callback of an\n * Observer.\n * @return A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @nocollapse\n * @deprecated Do not use. Will be removed in v8. There is no replacement for this\n * method, and there is no reason to be creating instances of `Subscriber` directly.\n * If you have a specific use case, please file an issue.\n */\n static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber {\n return new SafeSubscriber(next, error, complete);\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected isStopped: boolean = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n */\n constructor(destination?: Subscriber | Observer) {\n super();\n if (destination) {\n this.destination = destination;\n // Automatically chain subscriptions together here.\n // if destination is a Subscription, then it is a Subscriber.\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param {T} [value] The `next` value.\n * @return {void}\n */\n next(value?: T): void {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value!);\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached `Error`. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param {any} [err] The `error` exception.\n * @return {void}\n */\n error(err?: any): void {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n * @return {void}\n */\n complete(): void {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n\n unsubscribe(): void {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null!;\n }\n }\n\n protected _next(value: T): void {\n this.destination.next(value);\n }\n\n protected _error(err: any): void {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n\n protected _complete(): void {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind any>(fn: Fn, thisArg: any): Fn {\n return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver implements Observer {\n constructor(private partialObserver: Partial>) {}\n\n next(value: T): void {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n\n error(err: any): void {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n\n complete(): void {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\n\nexport class SafeSubscriber extends Subscriber {\n constructor(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((e?: any) => void) | null,\n complete?: (() => void) | null\n ) {\n super();\n\n let partialObserver: Partial>;\n if (isFunction(observerOrNext) || !observerOrNext) {\n // The first argument is a function, not an observer. The next\n // two arguments *could* be observers, or they could be empty.\n partialObserver = {\n next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined),\n error: error ?? undefined,\n complete: complete ?? undefined,\n };\n } else {\n // The first argument is a partial observer.\n let context: any;\n if (this && config.useDeprecatedNextContext) {\n // This is a deprecated path that made `this.unsubscribe()` available in\n // next handler functions passed to subscribe. This only exists behind a flag\n // now, as it is *very* slow.\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n } else {\n // The \"normal\" path. Just use the partial observer directly.\n partialObserver = observerOrNext;\n }\n }\n\n // Wrap the partial observer to ensure it's a full observer, and\n // make sure proper error handling is accounted for.\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\n\nfunction handleUnhandledError(error: any) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n // Ideal path, we report this as an unhandled error,\n // which is thrown on a new call stack.\n reportUnhandledError(error);\n }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent\n * @param subscriber The stopped subscriber\n */\nfunction handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly> & { closed: true } = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n", "/**\n * Symbol.observable or a string \"@@observable\". Used for interop\n *\n * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.\n * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable\n */\nexport const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n", "/**\n * This function takes one parameter and just returns it. Simply put,\n * this is like `(x: T): T => x`.\n *\n * ## Examples\n *\n * This is useful in some cases when using things like `mergeMap`\n *\n * ```ts\n * import { interval, take, map, range, mergeMap, identity } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(5));\n *\n * const result$ = source$.pipe(\n * map(i => range(i)),\n * mergeMap(identity) // same as mergeMap(x => x)\n * );\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * Or when you want to selectively apply an operator\n *\n * ```ts\n * import { interval, take, identity } from 'rxjs';\n *\n * const shouldLimit = () => Math.random() < 0.5;\n *\n * const source$ = interval(1000);\n *\n * const result$ = source$.pipe(shouldLimit() ? take(5) : identity);\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * @param x Any value that is returned by this function\n * @returns The value passed as the first parameter to this function\n */\nexport function identity(x: T): T {\n return x;\n}\n", "import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\nexport function pipe(): typeof identity;\nexport function pipe(fn1: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction,\n ...fns: UnaryFunction[]\n): UnaryFunction;\n\n/**\n * pipe() can be called on one or more functions, each of which can take one argument (\"UnaryFunction\")\n * and uses it to return a value.\n * It returns a function that takes one argument, passes it to the first UnaryFunction, and then\n * passes the result to the next one, passes that result to the next one, and so on. \n */\nexport function pipe(...fns: Array>): UnaryFunction {\n return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray(fns: Array>): UnaryFunction {\n if (fns.length === 0) {\n return identity as UnaryFunction;\n }\n\n if (fns.length === 1) {\n return fns[0];\n }\n\n return function piped(input: T): R {\n return fns.reduce((prev: any, fn: UnaryFunction) => fn(prev), input as any);\n };\n}\n", "import { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n *\n * @class Observable\n */\nexport class Observable implements Subscribable {\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n source: Observable | undefined;\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n operator: Operator | undefined;\n\n /**\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new Observable by calling the Observable constructor\n * @owner Observable\n * @method create\n * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n * @return {Observable} a new observable\n * @nocollapse\n * @deprecated Use `new Observable()` instead. Will be removed in v8.\n */\n static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => {\n return new Observable(subscribe);\n };\n\n /**\n * Creates a new Observable, with this Observable instance as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param operator the operator defining the operation to take on the observable\n * @return a new observable with the Operator applied\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * If you have implemented an operator using `lift`, it is recommended that you create an\n * operator by simply returning `new Observable()` directly. See \"Creating new operators from\n * scratch\" section here: https://rxjs.dev/guide/operators\n */\n lift(operator?: Operator): Observable {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription;\n /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\n subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * Use it when you have all these Observables, but still nothing is happening.\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to Observable's constructor, but most of the time it is\n * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * the thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * of the following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,\n * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,\n * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or\n * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide\n * an `error` method to avoid missing thrown errors.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,\n * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.\n *\n * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events\n * and you also handled emissions internally by using operators (e.g. using `tap`).\n *\n * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n *\n * #### Examples\n *\n * Subscribe with an {@link guide/observer Observer}\n *\n * ```ts\n * import { of } from 'rxjs';\n *\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() {\n * // We actually could just remove this method,\n * // since we do not really care about errors right now.\n * },\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})\n *\n * ```ts\n * import { of } from 'rxjs'\n *\n * let sum = 0;\n *\n * of(1, 2, 3).subscribe(\n * value => {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * () => console.log('Sum equals: ' + sum)\n * );\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Cancel a subscription\n *\n * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe({\n * next(num) {\n * console.log(num)\n * },\n * complete() {\n * // Will not be called, even when cancelling subscription.\n * console.log('completed!');\n * }\n * });\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 'unsubscribed!' after 2.5s\n * ```\n *\n * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n * or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n * Observable.\n * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown asynchronously as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {Subscription} a subscription reference to the registered handlers\n * @method subscribe\n */\n subscribe(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n ): Subscription {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(\n operator\n ? // We're dealing with a subscription in the\n // operator chain to one of our lifted operators.\n operator.call(subscriber, source)\n : source\n ? // If `source` has a value, but `operator` does not, something that\n // had intimate knowledge of our API, like our `Subject`, must have\n // set it. We're going to just call `_subscribe` directly.\n this._subscribe(subscriber)\n : // In all other cases, we're likely wrapping a user-provided initializer\n // function, so we need to catch errors and handle them appropriately.\n this._trySubscribe(subscriber)\n );\n });\n\n return subscriber;\n }\n\n /** @internal */\n protected _trySubscribe(sink: Subscriber): TeardownLogic {\n try {\n return this._subscribe(sink);\n } catch (err) {\n // We don't need to return anything in this case,\n // because it's just going to try to `add()` to a subscription\n // above.\n sink.error(err);\n }\n }\n\n /**\n * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * #### Example\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(4));\n *\n * async function getTotal() {\n * let total = 0;\n *\n * await source$.forEach(value => {\n * total += value;\n * console.log('observable -> ' + value);\n * });\n *\n * return total;\n * }\n *\n * getTotal().then(\n * total => console.log('Total: ' + total)\n * );\n *\n * // Expected:\n * // 'observable -> 0'\n * // 'observable -> 1'\n * // 'observable -> 2'\n * // 'observable -> 3'\n * // 'Total: 6'\n * ```\n *\n * @param next a handler for each value emitted by the observable\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n */\n forEach(next: (value: T) => void): Promise;\n\n /**\n * @param next a handler for each value emitted by the observable\n * @param promiseCtor a constructor function used to instantiate the Promise\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n * @deprecated Passing a Promise constructor will no longer be available\n * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n * little benefit. If you need this functionality, it is recommended that you either\n * polyfill Promise, or you create an adapter to convert the returned native promise\n * to whatever promise implementation you wanted. Will be removed in v8.\n */\n forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise;\n\n forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n }) as Promise;\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): TeardownLogic {\n return this.source?.subscribe(subscriber);\n }\n\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @method Symbol.observable\n * @return {Observable} this instance of the observable\n */\n [Symbol_observable]() {\n return this;\n }\n\n /* tslint:disable:max-line-length */\n pipe(): Observable;\n pipe(op1: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction,\n ...operations: OperatorFunction[]\n ): Observable;\n /* tslint:enable:max-line-length */\n\n /**\n * Used to stitch together functional operators into a chain.\n * @method pipe\n * @return {Observable} the Observable result of all of the operators having\n * been called in the order they were passed in.\n *\n * ## Example\n *\n * ```ts\n * import { interval, filter, map, scan } from 'rxjs';\n *\n * interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x));\n * ```\n */\n pipe(...operations: OperatorFunction[]): Observable {\n return pipeFromArray(operations)(this);\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: typeof Promise): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: PromiseConstructorLike): Promise;\n /* tslint:enable:max-line-length */\n\n /**\n * Subscribe to this Observable and get a Promise resolving on\n * `complete` with the last emission (if any).\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * @method toPromise\n * @param [promiseCtor] a constructor function used to instantiate\n * the Promise\n * @return A Promise that resolves with the last value emit, or\n * rejects on an error. If there were no emissions, Promise\n * resolves with undefined.\n * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise\n */\n toPromise(promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n let value: T | undefined;\n this.subscribe(\n (x: T) => (value = x),\n (err: any) => reject(err),\n () => resolve(value)\n );\n }) as Promise;\n }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver(value: any): value is Observer {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber(value: any): value is Subscriber {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n", "import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType['lift'] } {\n return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate(\n init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void\n): OperatorFunction {\n return (source: Observable) => {\n if (hasLift(source)) {\n return source.lift(function (this: Subscriber, liftedSource: Observable) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n", "import { Subscriber } from '../Subscriber';\n\n/**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional teardown logic here. This will only be called on teardown if the\n * subscriber itself is not already closed. This is called after all other teardown logic is executed.\n */\nexport function createOperatorSubscriber(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n onFinalize?: () => void\n): Subscriber {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\n\n/**\n * A generic helper for allowing operators to be created with a Subscriber and\n * use closures to capture necessary state from the operator function itself.\n */\nexport class OperatorSubscriber extends Subscriber {\n /**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional finalization logic here. This will only be called on finalization if the\n * subscriber itself is not already closed. This is called after all other finalization logic is executed.\n * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe.\n * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription\n * to the resulting observable does not actually disconnect from the source if there are active subscriptions\n * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!)\n */\n constructor(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n private onFinalize?: () => void,\n private shouldUnsubscribe?: () => boolean\n ) {\n // It's important - for performance reasons - that all of this class's\n // members are initialized and that they are always initialized in the same\n // order. This will ensure that all OperatorSubscriber instances have the\n // same hidden class in V8. This, in turn, will help keep the number of\n // hidden classes involved in property accesses within the base class as\n // low as possible. If the number of hidden classes involved exceeds four,\n // the property accesses will become megamorphic and performance penalties\n // will be incurred - i.e. inline caches won't be used.\n //\n // The reasons for ensuring all instances have the same hidden class are\n // further discussed in this blog post from Benedikt Meurer:\n // https://benediktmeurer.de/2018/03/23/impact-of-polymorphism-on-component-based-frameworks-like-react/\n super(destination);\n this._next = onNext\n ? function (this: OperatorSubscriber, value: T) {\n try {\n onNext(value);\n } catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (this: OperatorSubscriber, err: any) {\n try {\n onError(err);\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function (this: OperatorSubscriber) {\n try {\n onComplete();\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n\n unsubscribe() {\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n // Execute additional teardown if we have any and we didn't already do so.\n !closed && this.onFinalize?.();\n }\n }\n}\n", "import { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Make a {@link ConnectableObservable} behave like a ordinary observable and automates the way\n * you can connect to it.\n *\n * Internally it counts the subscriptions to the observable and subscribes (only once) to the source if\n * the number of subscriptions is larger than 0. If the number of subscriptions is smaller than 1, it\n * unsubscribes from the source. This way you can make sure that everything before the *published*\n * refCount has only a single subscription independently of the number of subscribers to the target\n * observable.\n *\n * Note that using the {@link share} operator is exactly the same as using the `multicast(() => new Subject())` operator\n * (making the observable hot) and the *refCount* operator in a sequence.\n *\n * ![](refCount.png)\n *\n * ## Example\n *\n * In the following example there are two intervals turned into connectable observables\n * by using the *publish* operator. The first one uses the *refCount* operator, the\n * second one does not use it. You will notice that a connectable observable does nothing\n * until you call its connect function.\n *\n * ```ts\n * import { interval, tap, publish, refCount } from 'rxjs';\n *\n * // Turn the interval observable into a ConnectableObservable (hot)\n * const refCountInterval = interval(400).pipe(\n * tap(num => console.log(`refCount ${ num }`)),\n * publish(),\n * refCount()\n * );\n *\n * const publishedInterval = interval(400).pipe(\n * tap(num => console.log(`publish ${ num }`)),\n * publish()\n * );\n *\n * refCountInterval.subscribe();\n * refCountInterval.subscribe();\n * // 'refCount 0' -----> 'refCount 1' -----> etc\n * // All subscriptions will receive the same value and the tap (and\n * // every other operator) before the `publish` operator will be executed\n * // only once per event independently of the number of subscriptions.\n *\n * publishedInterval.subscribe();\n * // Nothing happens until you call .connect() on the observable.\n * ```\n *\n * @return A function that returns an Observable that automates the connection\n * to ConnectableObservable.\n * @see {@link ConnectableObservable}\n * @see {@link share}\n * @see {@link publish}\n * @deprecated Replaced with the {@link share} operator. How `share` is used\n * will depend on the connectable observable you created just prior to the\n * `refCount` operator.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\nexport function refCount(): MonoTypeOperatorFunction {\n return operate((source, subscriber) => {\n let connection: Subscription | null = null;\n\n (source as any)._refCount++;\n\n const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || (source as any)._refCount <= 0 || 0 < --(source as any)._refCount) {\n connection = null;\n return;\n }\n\n ///\n // Compare the local RefCountSubscriber's connection Subscription to the\n // connection Subscription on the shared ConnectableObservable. In cases\n // where the ConnectableObservable source synchronously emits values, and\n // the RefCountSubscriber's downstream Observers synchronously unsubscribe,\n // execution continues to here before the RefCountOperator has a chance to\n // supply the RefCountSubscriber with the shared connection Subscription.\n // For example:\n // ```\n // range(0, 10).pipe(\n // publish(),\n // refCount(),\n // take(5),\n // )\n // .subscribe();\n // ```\n // In order to account for this case, RefCountSubscriber should only dispose\n // the ConnectableObservable's shared connection Subscription if the\n // connection Subscription exists, *and* either:\n // a. RefCountSubscriber doesn't have a reference to the shared connection\n // Subscription yet, or,\n // b. RefCountSubscriber's connection Subscription reference is identical\n // to the shared connection Subscription\n ///\n\n const sharedConnection = (source as any)._connection;\n const conn = connection;\n connection = null;\n\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n\n subscriber.unsubscribe();\n });\n\n source.subscribe(refCounter);\n\n if (!refCounter.closed) {\n connection = (source as ConnectableObservable).connect();\n }\n });\n}\n", "import { Subject } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\n\n/**\n * @class ConnectableObservable\n * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable.\n * If you are using the `refCount` method of `ConnectableObservable`, use the {@link share} operator\n * instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\nexport class ConnectableObservable extends Observable {\n protected _subject: Subject | null = null;\n protected _refCount: number = 0;\n protected _connection: Subscription | null = null;\n\n /**\n * @param source The source observable\n * @param subjectFactory The factory that creates the subject used internally.\n * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable.\n * `new ConnectableObservable(source, factory)` is equivalent to\n * `connectable(source, { connector: factory })`.\n * When the `refCount()` method is needed, the {@link share} operator should be used instead:\n * `new ConnectableObservable(source, factory).refCount()` is equivalent to\n * `source.pipe(share({ connector: factory }))`.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n constructor(public source: Observable, protected subjectFactory: () => Subject) {\n super();\n // If we have lift, monkey patch that here. This is done so custom observable\n // types will compose through multicast. Otherwise the resulting observable would\n // simply be an instance of `ConnectableObservable`.\n if (hasLift(source)) {\n this.lift = source.lift;\n }\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber) {\n return this.getSubject().subscribe(subscriber);\n }\n\n protected getSubject(): Subject {\n const subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject!;\n }\n\n protected _teardown() {\n this._refCount = 0;\n const { _connection } = this;\n this._subject = this._connection = null;\n _connection?.unsubscribe();\n }\n\n /**\n * @deprecated {@link ConnectableObservable} will be removed in v8. Use {@link connectable} instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n connect(): Subscription {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(\n this.source.subscribe(\n createOperatorSubscriber(\n subject as any,\n undefined,\n () => {\n this._teardown();\n subject.complete();\n },\n (err) => {\n this._teardown();\n subject.error(err);\n },\n () => this._teardown()\n )\n )\n );\n\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n }\n\n /**\n * @deprecated {@link ConnectableObservable} will be removed in v8. Use the {@link share} operator instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n refCount(): Observable {\n return higherOrderRefCount()(this) as Observable;\n }\n}\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface ObjectUnsubscribedError extends Error {}\n\nexport interface ObjectUnsubscribedErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (): ObjectUnsubscribedError;\n}\n\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nexport const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass(\n (_super) =>\n function ObjectUnsubscribedErrorImpl(this: any) {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n }\n);\n", "import { Operator } from './Operator';\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { Observer, SubscriptionLike, TeardownLogic } from './types';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A Subject is a special type of Observable that allows values to be\n * multicasted to many Observers. Subjects are like EventEmitters.\n *\n * Every Subject is an Observable and an Observer. You can subscribe to a\n * Subject, and you can call next to feed values as well as error and complete.\n */\nexport class Subject extends Observable implements SubscriptionLike {\n closed = false;\n\n private currentObservers: Observer[] | null = null;\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n observers: Observer[] = [];\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n isStopped = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n hasError = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n thrownError: any = null;\n\n /**\n * Creates a \"subject\" by basically gluing an observer to an observable.\n *\n * @nocollapse\n * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion.\n */\n static create: (...args: any[]) => any = (destination: Observer, source: Observable): AnonymousSubject => {\n return new AnonymousSubject(destination, source);\n };\n\n constructor() {\n // NOTE: This must be here to obscure Observable's constructor.\n super();\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n lift(operator: Operator): Observable {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator as any;\n return subject as any;\n }\n\n /** @internal */\n protected _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n\n next(value: T) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n\n error(err: any) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.error(err);\n }\n }\n });\n }\n\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.complete();\n }\n }\n });\n }\n\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null!;\n }\n\n get observed() {\n return this.observers?.length > 0;\n }\n\n /** @internal */\n protected _trySubscribe(subscriber: Subscriber): TeardownLogic {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n\n /** @internal */\n protected _innerSubscribe(subscriber: Subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n\n /** @internal */\n protected _checkFinalizedStatuses(subscriber: Subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n\n /**\n * Creates a new Observable with this Subject as the source. You can do this\n * to create custom Observer-side logic of the Subject and conceal it from\n * code that uses the Observable.\n * @return {Observable} Observable that the Subject casts to\n */\n asObservable(): Observable {\n const observable: any = new Observable();\n observable.source = this;\n return observable;\n }\n}\n\n/**\n * @class AnonymousSubject\n */\nexport class AnonymousSubject extends Subject {\n constructor(\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n public destination?: Observer,\n source?: Observable\n ) {\n super();\n this.source = source;\n }\n\n next(value: T) {\n this.destination?.next?.(value);\n }\n\n error(err: any) {\n this.destination?.error?.(err);\n }\n\n complete() {\n this.destination?.complete?.();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;\n }\n}\n", "import { Subject } from './Subject';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\n\n/**\n * A variant of Subject that requires an initial value and emits its current\n * value whenever it is subscribed to.\n *\n * @class BehaviorSubject\n */\nexport class BehaviorSubject extends Subject {\n constructor(private _value: T) {\n super();\n }\n\n get value(): T {\n return this.getValue();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n\n getValue(): T {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n\n next(value: T): void {\n super.next((this._value = value));\n }\n}\n", "import { TimestampProvider } from '../types';\n\ninterface DateTimestampProvider extends TimestampProvider {\n delegate: TimestampProvider | undefined;\n}\n\nexport const dateTimestampProvider: DateTimestampProvider = {\n now() {\n // Use the variable rather than `this` so that the function can be called\n // without being bound to the provider.\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n", "import { Subject } from './Subject';\nimport { TimestampProvider } from './types';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * A variant of {@link Subject} that \"replays\" old values to new subscribers by emitting them when they first subscribe.\n *\n * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`,\n * `ReplaySubject` \"observes\" values by having them passed to its `next` method. When it observes a value, it will store that\n * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor.\n *\n * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in\n * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will\n * error if it has observed an error.\n *\n * There are two main configuration items to be concerned with:\n *\n * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite.\n * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer.\n *\n * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values\n * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`.\n *\n * ### Differences with BehaviorSubject\n *\n * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions:\n *\n * 1. `BehaviorSubject` comes \"primed\" with a single value upon construction.\n * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n * @see {@link shareReplay}\n */\nexport class ReplaySubject extends Subject {\n private _buffer: (T | number)[] = [];\n private _infiniteTimeWindow = true;\n\n /**\n * @param bufferSize The size of the buffer to replay on subscription\n * @param windowTime The amount of time the buffered items will stay buffered\n * @param timestampProvider An object with a `now()` method that provides the current timestamp. This is used to\n * calculate the amount of time something has been buffered.\n */\n constructor(\n private _bufferSize = Infinity,\n private _windowTime = Infinity,\n private _timestampProvider: TimestampProvider = dateTimestampProvider\n ) {\n super();\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n\n next(value: T): void {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._trimBuffer();\n\n const subscription = this._innerSubscribe(subscriber);\n\n const { _infiniteTimeWindow, _buffer } = this;\n // We use a copy here, so reentrant code does not mutate our array while we're\n // emitting it to a new subscriber.\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i] as T);\n }\n\n this._checkFinalizedStatuses(subscriber);\n\n return subscription;\n }\n\n private _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n // If we don't have an infinite buffer size, and we're over the length,\n // use splice to truncate the old buffer values off. Note that we have to\n // double the size for instances where we're not using an infinite time window\n // because we're storing the values and the timestamps in the same array.\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n\n // Now, if we're not in an infinite time window, remove all values where the time is\n // older than what is allowed.\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n // Search the array for the first timestamp that isn't expired and\n // truncate the buffer up to that point.\n for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Subscription } from '../Subscription';\nimport { SchedulerAction } from '../types';\n\n/**\n * A unit of work to be executed in a `scheduler`. An action is typically\n * created from within a {@link SchedulerLike} and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n *\n * @class Action\n */\nexport class Action extends Subscription {\n constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void) {\n super();\n }\n /**\n * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler.\n * @return {void}\n */\n public schedule(state?: T, delay: number = 0): Subscription {\n return this;\n }\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearIntervalFunction = (handle: TimerHandle) => void;\n\ninterface IntervalProvider {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n delegate:\n | {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n }\n | undefined;\n}\n\nexport const intervalProvider: IntervalProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setInterval(handler: () => void, timeout?: number, ...args) {\n const { delegate } = intervalProvider;\n if (delegate?.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return (delegate?.clearInterval || clearInterval)(handle as any);\n },\n delegate: undefined,\n};\n", "import { Action } from './Action';\nimport { SchedulerAction } from '../types';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncAction extends Action {\n public id: TimerHandle | undefined;\n public state?: T;\n // @ts-ignore: Property has no initializer and is not definitely assigned\n public delay: number;\n protected pending: boolean = false;\n\n constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (this.closed) {\n return this;\n }\n\n // Always replace the current state with the new state.\n this.state = state;\n\n const id = this.id;\n const scheduler = this.scheduler;\n\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay);\n\n return this;\n }\n\n protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n\n protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined {\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n\n return undefined;\n }\n\n /**\n * Immediately executes this action and the `work` it contains.\n * @return {any}\n */\n public execute(state: T, delay: number): any {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n\n protected _execute(state: T, _delay: number): any {\n let errored: boolean = false;\n let errorValue: any;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n // HACK: Since code elsewhere is relying on the \"truthiness\" of the\n // return here, we can't have it return \"\" or 0 or false.\n // TODO: Clean this up when we refactor schedulers mid-version-8 or so.\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n\n this.work = this.state = this.scheduler = null!;\n this.pending = false;\n\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n\n this.delay = null!;\n super.unsubscribe();\n }\n }\n}\n", "let nextHandle = 1;\n// The promise needs to be created lazily otherwise it won't be patched by Zones\nlet resolved: Promise;\nconst activeHandles: { [key: number]: any } = {};\n\n/**\n * Finds the handle in the list of active handles, and removes it.\n * Returns `true` if found, `false` otherwise. Used both to clear\n * Immediate scheduled tasks, and to identify if a task should be scheduled.\n */\nfunction findAndClearHandle(handle: number): boolean {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\n\n/**\n * Helper functions to schedule and unschedule microtasks.\n */\nexport const Immediate = {\n setImmediate(cb: () => void): number {\n const handle = nextHandle++;\n activeHandles[handle] = true;\n if (!resolved) {\n resolved = Promise.resolve();\n }\n resolved.then(() => findAndClearHandle(handle) && cb());\n return handle;\n },\n\n clearImmediate(handle: number): void {\n findAndClearHandle(handle);\n },\n};\n\n/**\n * Used for internal testing purposes only. Do not export from library.\n */\nexport const TestTools = {\n pending() {\n return Object.keys(activeHandles).length;\n }\n};\n", "import { Immediate } from '../util/Immediate';\nimport type { TimerHandle } from './timerHandle';\nconst { setImmediate, clearImmediate } = Immediate;\n\ntype SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle;\ntype ClearImmediateFunction = (handle: TimerHandle) => void;\n\ninterface ImmediateProvider {\n setImmediate: SetImmediateFunction;\n clearImmediate: ClearImmediateFunction;\n delegate:\n | {\n setImmediate: SetImmediateFunction;\n clearImmediate: ClearImmediateFunction;\n }\n | undefined;\n}\n\nexport const immediateProvider: ImmediateProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setImmediate(...args) {\n const { delegate } = immediateProvider;\n return (delegate?.setImmediate || setImmediate)(...args);\n },\n clearImmediate(handle) {\n const { delegate } = immediateProvider;\n return (delegate?.clearImmediate || clearImmediate)(handle as any);\n },\n delegate: undefined,\n};\n", "import { AsyncAction } from './AsyncAction';\nimport { AsapScheduler } from './AsapScheduler';\nimport { SchedulerAction } from '../types';\nimport { immediateProvider } from './immediateProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsapAction extends AsyncAction {\n constructor(protected scheduler: AsapScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If a microtask has already been scheduled, don't schedule another\n // one. If a microtask hasn't been scheduled yet, schedule one now. Return\n // the current scheduled microtask id.\n return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n }\n\n protected recycleAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested microtask and set the scheduled flag to undefined\n // so the next AsapAction will request its own.\n const { actions } = scheduler;\n if (id != null && actions[actions.length - 1]?.id !== id) {\n immediateProvider.clearImmediate(id);\n if (scheduler._scheduled === id) {\n scheduler._scheduled = undefined;\n }\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n", "import { Action } from './scheduler/Action';\nimport { Subscription } from './Subscription';\nimport { SchedulerLike, SchedulerAction } from './types';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an `Action`.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @class Scheduler\n * @deprecated Scheduler is an internal implementation detail of RxJS, and\n * should not be used directly. Rather, create your own class and implement\n * {@link SchedulerLike}. Will be made internal in v8.\n */\nexport class Scheduler implements SchedulerLike {\n public static now: () => number = dateTimestampProvider.now;\n\n constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) {\n this.now = now;\n }\n\n /**\n * A getter method that returns a number representing the current time\n * (at the time this function was called) according to the scheduler's own\n * internal clock.\n * @return {number} A number that represents the current time. May or may not\n * have a relation to wall-clock time. May or may not refer to a time unit\n * (e.g. milliseconds).\n */\n public now: () => number;\n\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param {function(state: ?T): ?Subscription} work A function representing a\n * task, or some unit of work to be executed by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler itself.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @return {Subscription} A subscription in order to be able to unsubscribe\n * the scheduled work.\n */\n public schedule(work: (this: SchedulerAction, state?: T) => void, delay: number = 0, state?: T): Subscription {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Action } from './Action';\nimport { AsyncAction } from './AsyncAction';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncScheduler extends Scheduler {\n public actions: Array> = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @type {boolean}\n * @internal\n */\n public _active: boolean = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @type {any}\n * @internal\n */\n public _scheduled: TimerHandle | undefined;\n\n constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) {\n super(SchedulerAction, now);\n }\n\n public flush(action: AsyncAction): void {\n const { actions } = this;\n\n if (this._active) {\n actions.push(action);\n return;\n }\n\n let error: any;\n this._active = true;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()!)); // exhaust the scheduler queue\n\n this._active = false;\n\n if (error) {\n while ((action = actions.shift()!)) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AsapScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n const flushId = this._scheduled;\n this._scheduled = undefined;\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\n\n/**\n *\n * Asap Scheduler\n *\n * Perform task as fast as it can be performed asynchronously\n *\n * `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task\n * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing\n * code to end and then it will try to execute given task as fast as possible.\n *\n * `asap` scheduler will do its best to minimize time between end of currently executing code\n * and start of scheduled task. This makes it best candidate for performing so called \"deferring\".\n * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves\n * some (although minimal) unwanted delay.\n *\n * Note that using `asap` scheduler does not necessarily mean that your task will be first to process\n * after currently executing code. In particular, if some task was also scheduled with `asap` before,\n * that task will execute first. That being said, if you need to schedule task asynchronously, but\n * as soon as possible, `asap` scheduler is your best bet.\n *\n * ## Example\n * Compare async and asap scheduler<\n * ```ts\n * import { asapScheduler, asyncScheduler } from 'rxjs';\n *\n * asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first...\n * asapScheduler.schedule(() => console.log('asap'));\n *\n * // Logs:\n * // \"asap\"\n * // \"async\"\n * // ... but 'asap' goes first!\n * ```\n */\n\nexport const asapScheduler = new AsapScheduler(AsapAction);\n\n/**\n * @deprecated Renamed to {@link asapScheduler}. Will be removed in v8.\n */\nexport const asap = asapScheduler;\n", "import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\n/**\n * A simple Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * Just emits 'complete', and nothing else.\n *\n * ![](empty.png)\n *\n * A simple Observable that only emits the complete notification. It can be used\n * for composing with other Observables, such as in a {@link mergeMap}.\n *\n * ## Examples\n *\n * Log complete notification\n *\n * ```ts\n * import { EMPTY } from 'rxjs';\n *\n * EMPTY.subscribe({\n * next: () => console.log('Next'),\n * complete: () => console.log('Complete!')\n * });\n *\n * // Outputs\n * // Complete!\n * ```\n *\n * Emit the number 7, then complete\n *\n * ```ts\n * import { EMPTY, startWith } from 'rxjs';\n *\n * const result = EMPTY.pipe(startWith(7));\n * result.subscribe(x => console.log(x));\n *\n * // Outputs\n * // 7\n * ```\n *\n * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'`\n *\n * ```ts\n * import { interval, mergeMap, of, EMPTY } from 'rxjs';\n *\n * const interval$ = interval(1000);\n * const result = interval$.pipe(\n * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1, print a, b, c (each on its own)\n * // if x % 2 is not equal to 1, nothing will be output\n * ```\n *\n * @see {@link Observable}\n * @see {@link NEVER}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\n\n/**\n * @param scheduler A {@link SchedulerLike} to use for scheduling\n * the emission of the complete notification.\n * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8.\n */\nexport function empty(scheduler?: SchedulerLike) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\n\nfunction emptyScheduled(scheduler: SchedulerLike) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport function isScheduler(value: any): value is SchedulerLike {\n return value && isFunction(value.schedule);\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\n\nfunction last(arr: T[]): T | undefined {\n return arr[arr.length - 1];\n}\n\nexport function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\n\nexport function popScheduler(args: any[]): SchedulerLike | undefined {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\n\nexport function popNumber(args: any[], defaultValue: number): number {\n return typeof last(args) === 'number' ? args.pop()! : defaultValue;\n}\n", "export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function');", "import { isFunction } from \"./isFunction\";\n\n/**\n * Tests to see if the object is \"thennable\".\n * @param value the object to test\n */\nexport function isPromise(value: any): value is PromiseLike {\n return isFunction(value?.then);\n}\n", "import { InteropObservable } from '../types';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isInteropObservable(input: any): input is InteropObservable {\n return isFunction(input[Symbol_observable]);\n}\n", "import { isFunction } from './isFunction';\n\nexport function isAsyncIterable(obj: any): obj is AsyncIterable {\n return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]);\n}\n", "/**\n * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.\n * @param input The object that was passed.\n */\nexport function createInvalidObservableTypeError(input: any) {\n // TODO: We should create error codes that can be looked up, so this can be less verbose.\n return new TypeError(\n `You provided ${\n input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`\n } where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`\n );\n}\n", "export function getSymbolIterator(): symbol {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator' as any;\n }\n\n return Symbol.iterator;\n}\n\nexport const iterator = getSymbolIterator();\n", "import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being an Iterable */\nexport function isIterable(input: any): input is Iterable {\n return isFunction(input?.[Symbol_iterator]);\n}\n", "import { ReadableStreamLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = await reader.read();\n if (done) {\n return;\n }\n yield value!;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function isReadableStreamLike(obj: any): obj is ReadableStreamLike {\n // We don't want to use instanceof checks because they would return\n // false for instances from another Realm, like an