diff --git a/.gitignore b/.gitignore index 469def26..8ff15829 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ dioxusin /dist /node_modules /target +wallet-adapter/node_modules/ diff --git a/AppEntitlements.entitlements b/AppEntitlements.entitlements deleted file mode 100644 index 638357a7..00000000 --- a/AppEntitlements.entitlements +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - com.apple.security.network.client - - - - com.apple.security.application-identifier - $(AppIdentifierPrefix)com.ore.app - - - diff --git a/Cargo.lock b/Cargo.lock index f61a767f..aa4faf1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -33,7 +33,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -69,7 +69,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -81,7 +81,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -96,26 +95,11 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -132,68 +116,11 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anstream" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "anymap2" @@ -242,7 +169,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.4", + "num-bigint", "num-traits", "paste", "rustc_version", @@ -265,7 +192,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint", "num-traits", "proc-macro2", "quote", @@ -294,7 +221,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint", ] [[package]] @@ -318,6 +245,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "array-const-fn-init" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bcb85e548c05d407fa6faff46b750ba287714ef32afc0f5e15b4641ffd6affb" + [[package]] name = "arrayref" version = "0.3.7" @@ -330,51 +263,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "ascii" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" - -[[package]] -name = "asn1-rs" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" -dependencies = [ - "asn1-rs-derive", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "asn1-rs-impl" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "assert_matches" version = "1.5.0" @@ -404,41 +292,25 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.0", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-compression" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" -dependencies = [ - "brotli", - "flate2", + "event-listener-strategy", "futures-core", - "memchr", "pin-project-lite", - "tokio", ] [[package]] name = "async-executor" -version = "1.8.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" dependencies = [ - "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", + "fastrand 2.1.0", "futures-lite 2.3.0", "slab", ] @@ -449,10 +321,10 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.2.0", + "async-channel 2.3.1", "async-executor", - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.3", + "async-lock 3.4.0", "blocking", "futures-lite 2.3.0", "once_cell", @@ -480,18 +352,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.5.0", - "rustix 0.38.32", + "polling 3.7.2", + "rustix 0.38.34", "slab", "tracing", "windows-sys 0.52.0", @@ -508,34 +380,34 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] [[package]] -name = "async-mutex" -version = "1.4.0" +name = "async-retry" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +checksum = "33c7d291ca98798cc3c49b4064314288ad14ba95013d546b47d29af791b72d9c" dependencies = [ - "event-listener 2.5.3", + "async-sleep", + "futures-util", + "pin-project-lite", + "retry-policy", ] [[package]] -name = "async-native-tls" -version = "0.5.0" +name = "async-sleep" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9343dc5acf07e79ff82d0c37899f079db3534d99f189a1837c8e549c99405bec" +checksum = "268257885b8f4e7f9c28c29f265f4058130b474dd5b6d59b342e2db84499478a" dependencies = [ "futures-util", - "native-tls", - "thiserror", - "url", ] [[package]] @@ -566,58 +438,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", -] - -[[package]] -name = "async-tungstenite" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0f8d64ef9351752fbe5462f242c625d9c4910d2bc3f7ec44c43857ca123f5d" -dependencies = [ - "async-native-tls", - "async-std", - "futures-io", - "futures-util", - "log", - "pin-project-lite", - "tungstenite 0.21.0", -] - -[[package]] -name = "atk" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39991bc421ddf72f70159011b323ff49b0f783cc676a7287c59453da2e2531cf" -dependencies = [ - "atk-sys", - "bitflags 1.3.2", - "glib", - "libc", -] - -[[package]] -name = "atk-sys" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ad703eb64dc058024f0e57ccfa069e15a413b98dbd50a1a950e743b7f11148" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", + "syn 2.0.70", ] [[package]] @@ -639,15 +472,73 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "axum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +dependencies = [ + "async-trait", + "axum-core", + "base64 0.21.7", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sha1", + "sync_wrapper 1.0.1", + "tokio", + "tokio-tungstenite", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", + "tracing", +] [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -677,10 +568,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "base64ct" -version = "1.6.0" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bincode" @@ -699,9 +590,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -715,6 +606,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "blake3" version = "1.5.1" @@ -742,7 +642,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ "block-padding", - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -751,7 +651,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -762,18 +662,15 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.0", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", - "fastrand 2.0.1", "futures-io", "futures-lite 2.3.0", "piper", - "tracing", ] [[package]] @@ -796,6 +693,16 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", +] + [[package]] name = "borsh-derive" version = "0.9.3" @@ -822,6 +729,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.70", + "syn_derive", +] + [[package]] name = "borsh-derive-internal" version = "0.9.3" @@ -866,27 +787,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "brotli" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - [[package]] name = "bs58" version = "0.4.0" @@ -902,11 +802,21 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "bstr" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bv" @@ -920,22 +830,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -946,9 +856,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cached" @@ -957,12 +867,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69b0116662497bc24e4b177c90eaf8870e39e2714c3fcfa296327a93f593fc21" dependencies = [ "ahash 0.8.11", + "async-trait", "cached_proc_macro", "cached_proc_macro_types", - "hashbrown 0.14.3", + "futures", + "hashbrown 0.14.5", "instant", "once_cell", "thiserror", + "tokio", ] [[package]] @@ -984,75 +897,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] -name = "cairo-rs" -version = "0.16.7" +name = "camino" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3125b15ec28b84c238f6f476c6034016a5f6cc0221cb514ca46c532139fc97d" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ - "bitflags 1.3.2", - "cairo-sys-rs", - "glib", - "libc", - "once_cell", - "thiserror", + "serde", ] [[package]] -name = "cairo-sys-rs" -version = "0.16.3" +name = "cargo-platform" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ - "glib-sys", - "libc", - "system-deps", + "serde", ] [[package]] -name = "caps" -version = "0.5.5" +name = "cargo_metadata" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ - "libc", + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", "thiserror", ] [[package]] name = "cc" -version = "1.0.90" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" dependencies = [ "jobserver", "libc", -] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfb" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" -dependencies = [ - "byteorder", - "fnv", - "uuid", + "once_cell", ] [[package]] name = "cfg-expr" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", - "target-lexicon", ] [[package]] @@ -1062,42 +955,60 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chrono" -version = "0.4.35" +name = "cfg_aliases" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" -dependencies = [ +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] -name = "cipher" -version = "0.3.0" +name = "ciborium" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ - "generic-array", + "ciborium-io", + "ciborium-ll", + "serde", ] [[package]] -name = "clap" -version = "2.34.0" +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap 0.11.0", - "unicode-width", - "vec_map", + "ciborium-io", + "half", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array 0.14.7", ] [[package]] @@ -1110,10 +1021,9 @@ dependencies = [ "bitflags 1.3.2", "clap_lex", "indexmap 1.9.3", - "once_cell", "strsim 0.10.0", "termcolor", - "textwrap 0.16.1", + "textwrap", ] [[package]] @@ -1135,76 +1045,17 @@ dependencies = [ "winapi", ] -[[package]] -name = "cocoa" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "libc", - "objc", -] - [[package]] name = "color_quant" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "combine" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" -dependencies = [ - "ascii", - "byteorder", - "either", - "memchr", - "unreachable", -] - -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "memchr", -] - [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -1243,28 +1094,49 @@ dependencies = [ ] [[package]] -name = "const-oid" -version = "0.7.1" +name = "const-crypto" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "19c63acd992239f1877a7d6387038ca886a2029e41f3d91087fd454f9995f22c" +dependencies = [ + "keccak-const", + "sha2-const-stable", +] [[package]] -name = "constant_time_eq" -version = "0.3.0" +name = "const_format" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] [[package]] -name = "constcat" -version = "0.3.1" +name = "const_format_proc_macros" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "convert_case" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "copypasta" @@ -1296,30 +1168,6 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "core-graphics" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "libc", -] - [[package]] name = "cpufeatures" version = "0.2.12" @@ -1331,18 +1179,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1368,9 +1216,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1384,7 +1232,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array", + "generic-array 0.14.7", "typenum", ] @@ -1394,37 +1242,10 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array", + "generic-array 0.14.7", "subtle", ] -[[package]] -name = "cssparser" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa 0.4.8", - "matches", - "phf", - "proc-macro2", - "quote", - "smallvec", - "syn 1.0.109", -] - -[[package]] -name = "cssparser-macros" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" -dependencies = [ - "quote", - "syn 2.0.53", -] - [[package]] name = "ctr" version = "0.8.0" @@ -1460,12 +1281,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1484,16 +1305,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.53", + "strsim 0.11.1", + "syn 2.0.70", ] [[package]] @@ -1509,62 +1330,33 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] name = "dashmap" -version = "4.0.2" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "num_cpus", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core 0.9.10", ] [[package]] name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "der" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" -dependencies = [ - "const-oid", -] - -[[package]] -name = "der-parser" -version = "8.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" -dependencies = [ - "asn1-rs", - "displaydoc", - "nom", - "num-bigint 0.4.4", - "num-traits", - "rusticata-macros", -] - -[[package]] -name = "deranged" -version = "0.3.11" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "derivation-path" @@ -1583,38 +1375,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "dialoguer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" -dependencies = [ - "console", - "shell-words", - "tempfile", - "zeroize", -] - [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -1630,162 +1397,219 @@ dependencies = [ [[package]] name = "dioxus" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d9e3b0725e520250bf23213f996d241cca29cea4360a9bf08a44e0033f8e569" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ + "dioxus-config-macro", "dioxus-core", "dioxus-core-macro", + "dioxus-fullstack", "dioxus-hooks", "dioxus-hot-reload", "dioxus-html", - "dioxus-rsx", + "dioxus-router", + "dioxus-signals", + "dioxus-static-site-generation", + "dioxus-web", +] + +[[package]] +name = "dioxus-cli-config" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" +dependencies = [ + "once_cell", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "dioxus-config-macro" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" +dependencies = [ + "proc-macro2", + "quote", ] [[package]] name = "dioxus-core" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f33186615b2e90bceab24a195b3cfad4e0b4d91a33ec44a94845876bfb25c13" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ - "bumpalo", + "const_format", "futures-channel", "futures-util", + "generational-box", "longest-increasing-subsequence", "rustc-hash", + "rustversion", "serde", "slab", - "smallbox", + "slotmap", "tracing", ] [[package]] name = "dioxus-core-macro" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21afaccb28587aed0ba98856335912f5ce7052c0aafa74b213829a3b8bfd2345" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ - "constcat", - "dioxus-core", + "convert_case", "dioxus-rsx", "prettyplease", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] -name = "dioxus-debug-cell" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ea539174bb236e0e7dc9c12b19b88eae3cb574dedbd0252a2d43ea7e6de13e2" - -[[package]] -name = "dioxus-desktop" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3ea0b1f6e64157b43e73d7ec3985df904c89ecf313bff93e06ff7d3b40d1cb" +name = "dioxus-fullstack" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ - "async-trait", - "core-foundation", - "dioxus-core", + "base64 0.21.7", + "bytes", + "ciborium", "dioxus-hot-reload", - "dioxus-html", - "dioxus-interpreter-js", - "dunce", + "dioxus-lib", + "dioxus-web", + "dioxus_server_macro", "futures-channel", "futures-util", - "infer", - "objc", - "objc_id", - "rfd", + "once_cell", "serde", - "serde_json", - "slab", - "thiserror", - "tokio", + "server_fn", "tracing", - "urlencoding", - "webbrowser", - "wry", + "web-sys", ] [[package]] name = "dioxus-hooks" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb23ce82df4fb13e9ddaa01d1469f1f32d683dd4636204bd0a0eaf434b65946" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ "dioxus-core", - "dioxus-debug-cell", + "dioxus-signals", "futures-channel", + "futures-util", + "generational-box", + "rustversion", "slab", - "thiserror", "tracing", ] [[package]] name = "dioxus-hot-reload" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7d8c9e89e866a6b84b8ad696f0ff2f6f6563d2235eb99acc6952f19e516cc09" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ + "axum", + "chrono", "dioxus-core", "dioxus-html", "dioxus-rsx", + "execute", + "futures-util", + "ignore", "interprocess-docfix", + "notify", + "once_cell", "serde", "serde_json", + "tokio", + "tokio-stream", + "tracing", ] [[package]] name = "dioxus-html" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "828a42a2d70688a2412a8538c8b5a5eceadf68f682f899dc4455a0169db39dfd" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ - "async-channel 1.9.0", "async-trait", "dioxus-core", + "dioxus-html-internal-macro", + "dioxus-rsx", "enumset", "euclid", + "futures-channel", + "generational-box", + "js-sys", "keyboard-types", + "rustversion", "serde", - "serde-value", "serde_json", - "serde_repr", - "tokio", + "tracing", "wasm-bindgen", "web-sys", ] [[package]] -name = "dioxus-interpreter-js" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a3115cf9f550a9af88de615c21a15a72dee44230602087dd7b0c5d01f46c37" +name = "dioxus-html-internal-macro" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "syn 2.0.70", +] + +[[package]] +name = "dioxus-interpreter-js" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ "js-sys", + "md5", "sledgehammer_bindgen", "sledgehammer_utils", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] -name = "dioxus-router" -version = "0.4.3" +name = "dioxus-lib" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" +dependencies = [ + "dioxus-config-macro", + "dioxus-core", + "dioxus-core-macro", + "dioxus-hooks", + "dioxus-html", + "dioxus-rsx", + "dioxus-signals", +] + +[[package]] +name = "dioxus-logger" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25785196405afb2a6ef1b76400d06af88fdf1f8d0315779136465afcddea39a6" +checksum = "81fe09dc9773dc1f1bb0d38529203d6555d08f67aadca5cf955ac3d1a9e69880" dependencies = [ - "anyhow", - "dioxus", + "console_error_panic_hook", + "tracing", + "tracing-subscriber", + "tracing-wasm", +] + +[[package]] +name = "dioxus-router" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" +dependencies = [ + "dioxus-cli-config", + "dioxus-fullstack", + "dioxus-lib", "dioxus-router-macro", - "futures-util", "gloo 0.8.1", "gloo-utils 0.1.7", "js-sys", - "thiserror", + "rustversion", "tracing", "url", "urlencoding", @@ -1795,56 +1619,84 @@ dependencies = [ [[package]] name = "dioxus-router-macro" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c7bc30b74ce1082cf7d501ce50c5c1f0629b0c35966bca854e3e9a1d8d4f64" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ "proc-macro2", "quote", "slab", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] name = "dioxus-rsx" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c974133c7c95497a486d587e40449927711430b308134b9cd374b8d35eceafb3" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ "dioxus-core", + "internment", + "krates", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", + "tracing", ] [[package]] -name = "dioxus-std" -version = "0.4.2" +name = "dioxus-sdk" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8763c3131f97e769edc2cc0783ff033286e3c7a3295437835b79d390b86b3bf" +checksum = "271adf41837fbbceb955fefd71816d4a3fbbab2829f8c0ea0364584b531ce999" dependencies = [ "async-broadcast", "cfg-if", "copypasta", "dioxus", "js-sys", + "tracing", "uuid", ] +[[package]] +name = "dioxus-signals" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" +dependencies = [ + "dioxus-core", + "futures-channel", + "futures-util", + "generational-box", + "once_cell", + "parking_lot 0.12.3", + "rustc-hash", + "tracing", +] + +[[package]] +name = "dioxus-static-site-generation" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" +dependencies = [ + "dioxus-fullstack", + "dioxus-lib", + "dioxus-router", + "dioxus-web", + "tracing", +] + [[package]] name = "dioxus-web" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fafaff75f50035078c2da45441ee61472fd0f335fa15b05170165eaf3479f0df" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ - "async-channel 1.9.0", - "async-trait", + "ciborium", "console_error_panic_hook", "dioxus-core", "dioxus-html", "dioxus-interpreter-js", "futures-channel", "futures-util", + "generational-box", "js-sys", "rustc-hash", "serde", @@ -1857,40 +1709,15 @@ dependencies = [ ] [[package]] -name = "directories" -version = "4.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - -[[package]] -name = "displaydoc" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +name = "dioxus_server_macro" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ + "convert_case", "proc-macro2", "quote", - "syn 2.0.53", + "server_fn_macro", + "syn 2.0.70", ] [[package]] @@ -1903,61 +1730,51 @@ dependencies = [ ] [[package]] -name = "dlopen2" -version = "0.5.0" +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "drillx" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b4f5f101177ff01b8ec4ecc81eead416a8aa42819a2869311b3420fa114ffa" +checksum = "0c5fd3a8f11a6420d6efb1952c8c2e788627cb2c9e834537dc4b6bd036461646" dependencies = [ - "dlopen2_derive", - "libc", - "once_cell", - "winapi", + "equix", + "serde", + "sha3 0.10.8", + "solana-program", + "strum", ] [[package]] -name = "dlopen2_derive" -version = "0.3.0" +name = "dynasm" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" +checksum = "33dc03612f42465a8ed7f5e354bc2b79ba54cedefa81d5bd3a064f1835adaba8" dependencies = [ + "bitflags 1.3.2", + "byteorder", + "lazy_static", + "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.53", + "syn 1.0.109", ] [[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "dtoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" - -[[package]] -name = "dtoa-short" -version = "0.3.4" +name = "dynasmrt" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" +checksum = "f7dccc31a678058996aef614f6bd418ced384da70f284e83e2b7bf29b27b6a28" dependencies = [ - "dtoa", + "byteorder", + "dynasm", + "fnv", + "memmap2", ] -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "eager" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" - [[package]] name = "ed25519" version = "1.5.3" @@ -1995,9 +1812,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -2007,33 +1824,13 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] -[[package]] -name = "enum-iterator" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" -dependencies = [ - "enum-iterator-derive", -] - -[[package]] -name = "enum-iterator-derive" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.53", -] - [[package]] name = "enumset" version = "1.1.3" @@ -2049,20 +1846,10 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.53", -] - -[[package]] -name = "env_filter" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" -dependencies = [ - "log", - "regex", + "syn 2.0.70", ] [[package]] @@ -2078,30 +1865,30 @@ dependencies = [ "termcolor", ] -[[package]] -name = "env_logger" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "equix" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced5aa2974d730a3bbe65dcb62ad8fbb0ae44d4aeed1093808a855d922b931ee" +dependencies = [ + "arrayvec", + "hashx", + "num-traits", + "thiserror", + "visibility", +] + [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2109,12 +1896,11 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.9" +version = "0.22.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787" +checksum = "e0f0eb73b934648cd7a4a61f1b15391cd95dab0b4da6e2e66c2a072c144b4a20" dependencies = [ "num-traits", - "serde", ] [[package]] @@ -2125,9 +1911,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -2135,36 +1921,52 @@ dependencies = [ ] [[package]] -name = "event-listener" -version = "5.2.0" +name = "event-listener-strategy" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "concurrent-queue", - "parking", + "event-listener 5.3.1", "pin-project-lite", ] [[package]] -name = "event-listener-strategy" -version = "0.4.0" +name = "execute" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +checksum = "3a82608ee96ce76aeab659e9b8d3c2b787bffd223199af88c674923d861ada10" dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", + "execute-command-macro", + "execute-command-tokens", + "generic-array 1.1.0", ] [[package]] -name = "event-listener-strategy" -version = "0.5.0" +name = "execute-command-macro" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "90dec53d547564e911dc4ff3ecb726a64cf41a6fa01a2370ebc0d95175dd08bd" dependencies = [ - "event-listener 5.2.0", - "pin-project-lite", + "execute-command-macro-impl", +] + +[[package]] +name = "execute-command-macro-impl" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8cd46a041ad005ab9c71263f9a0ff5b529eac0fe4cc9b4a20f4f0765d8cf4b" +dependencies = [ + "execute-command-tokens", + "quote", + "syn 2.0.70", ] +[[package]] +name = "execute-command-tokens" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69dc321eb6be977f44674620ca3aa21703cb20ffbe560e1ae97da08401ffbcad" + [[package]] name = "fallible-iterator" version = "0.2.0" @@ -2182,9 +1984,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fdeflate" @@ -2202,26 +2004,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] -name = "field-offset" -version = "0.3.6" +name = "filetime" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ - "memoffset 0.9.0", - "rustc_version", + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] -name = "finl_unicode" -version = "1.2.0" +name = "fixed-capacity-vec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b31a14f5ee08ed1a40e1252b35af18bed062e3f39b69aab34decde36bc43e40" + +[[package]] +name = "fixedbitset" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -2273,13 +2083,12 @@ dependencies = [ ] [[package]] -name = "futf" -version = "0.1.5" +name = "fsevent-sys" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" dependencies = [ - "mac", - "new_debug_unreachable", + "libc", ] [[package]] @@ -2351,7 +2160,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.1", + "fastrand 2.1.0", "futures-core", "futures-io", "parking", @@ -2366,7 +2175,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -2400,231 +2209,86 @@ dependencies = [ ] [[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +name = "generational-box" +version = "0.5.2" +source = "git+https://github.com/DioxusLabs/dioxus?rev=742721bf#742721bfded2f6d0ea8e2d752be02dbc4b0e18a8" dependencies = [ - "byteorder", + "parking_lot 0.12.3", ] [[package]] -name = "gdk" -version = "0.16.2" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9cb33da481c6c040404a11f8212d193889e9b435db2c14fd86987f630d3ce1" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "gdk-pixbuf", - "gdk-sys", - "gio", - "glib", - "libc", - "pango", + "serde", + "typenum", + "version_check", ] [[package]] -name = "gdk-pixbuf" -version = "0.16.7" +name = "generic-array" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3578c60dee9d029ad86593ed88cb40f35c1b83360e12498d055022385dd9a05" +checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" dependencies = [ - "bitflags 1.3.2", - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", + "typenum", ] [[package]] -name = "gdk-pixbuf-sys" -version = "0.16.3" +name = "gethostname" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", "libc", - "system-deps", + "winapi", ] [[package]] -name = "gdk-sys" -version = "0.16.0" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76354f97a913e55b984759a997b693aa7dc71068c9e98bcce51aa167a0a5c5a" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", + "cfg-if", + "js-sys", "libc", - "pango-sys", - "pkg-config", - "system-deps", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] -name = "gdkwayland-sys" -version = "0.16.0" +name = "getrandom" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4511710212ed3020b61a8622a37aa6f0dd2a84516575da92e9b96928dcbe83ba" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "gdk-sys", - "glib-sys", - "gobject-sys", + "cfg-if", + "js-sys", "libc", - "pkg-config", - "system-deps", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] -name = "gdkx11-sys" -version = "0.16.0" +name = "gimli" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa2bf8b5b8c414bc5d05e48b271896d0fd3ddb57464a3108438082da61de6af" -dependencies = [ - "gdk-sys", - "glib-sys", - "libc", - "system-deps", - "x11", -] +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] -name = "generic-array" -version = "0.14.7" +name = "globset" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "gethostname" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "gio" -version = "0.16.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1c84b4534a290a29160ef5c6eff2a9c95833111472e824fc5cb78b513dd092" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "gio-sys", - "glib", - "libc", - "once_cell", - "pin-project-lite", - "smallvec", - "thiserror", -] - -[[package]] -name = "gio-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", - "winapi", -] - -[[package]] -name = "glib" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16aa2475c9debed5a32832cb5ff2af5a3f9e1ab9e69df58eaadc1ab2004d6eba" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "once_cell", - "smallvec", - "thiserror", -] - -[[package]] -name = "glib-macros" -version = "0.16.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1a9325847aa46f1e96ffea37611b9d51fc4827e67f79e7de502a297560a67b" -dependencies = [ - "anyhow", - "heck 0.4.1", - "proc-macro-crate 1.3.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "glib-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" -dependencies = [ - "libc", - "system-deps", + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", ] [[package]] @@ -2777,7 +2441,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "903f432be5ba34427eac5e16048ef65604a82061fe93789f2212afc73d8617d6" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "gloo-events 0.2.0", "gloo-utils 0.2.0", "serde", @@ -2973,91 +2637,14 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", -] - -[[package]] -name = "gobject-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "goblin" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" -dependencies = [ - "log", - "plain", - "scroll", -] - -[[package]] -name = "gtk" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4d3507d43908c866c805f74c9dd593c0ce7ba5c38e576e41846639cdcd4bee6" -dependencies = [ - "atk", - "bitflags 1.3.2", - "cairo-rs", - "field-offset", - "futures-channel", - "gdk", - "gdk-pixbuf", - "gio", - "glib", - "gtk-sys", - "gtk3-macros", - "libc", - "once_cell", - "pango", - "pkg-config", -] - -[[package]] -name = "gtk-sys" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b5f8946685d5fe44497007786600c2f368ff6b1e61a16251c89f72a97520a3" -dependencies = [ - "atk-sys", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "system-deps", -] - -[[package]] -name = "gtk3-macros" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "096eb63c6fedf03bafe65e5924595785eaf1bcb7200dac0f2cbe9c9738f05ad8" -dependencies = [ - "anyhow", - "proc-macro-crate 1.3.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "syn 2.0.70", ] [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -3065,7 +2652,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.5", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -3073,12 +2660,13 @@ dependencies = [ ] [[package]] -name = "hash32" -version = "0.2.1" +name = "half" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "byteorder", + "cfg-if", + "crunchy", ] [[package]] @@ -3107,14 +2695,29 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", "allocator-api2", ] +[[package]] +name = "hashx" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44a3b158f726cbff305571b9882f9638ce8cf146dde935a5bd43e115d8d6b6a0" +dependencies = [ + "arrayvec", + "blake2", + "dynasmrt", + "fixed-capacity-vec", + "hex", + "rand_core 0.6.4", + "thiserror", +] + [[package]] name = "heck" version = "0.4.1" @@ -3143,10 +2746,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] -name = "histogram" -version = "0.6.9" +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" @@ -3174,19 +2783,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array", + "generic-array 0.14.7", "hmac 0.8.1", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "html-escape" version = "0.2.13" @@ -3196,20 +2796,6 @@ dependencies = [ "utf8-width", ] -[[package]] -name = "html5ever" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" -dependencies = [ - "log", - "mac", - "markup5ever", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "http" version = "0.2.12" @@ -3218,7 +2804,7 @@ checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", - "itoa 1.0.10", + "itoa", ] [[package]] @@ -3229,7 +2815,7 @@ checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", - "itoa 1.0.10", + "itoa", ] [[package]] @@ -3243,11 +2829,34 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "pin-project-lite", +] + [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -3263,9 +2872,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -3273,12 +2882,12 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", + "http-body 0.4.6", "httparse", "httpdate", - "itoa 1.0.10", + "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -3286,17 +2895,22 @@ dependencies = [ ] [[package]] -name = "hyper-rustls" -version = "0.24.2" +name = "hyper" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ + "bytes", + "futures-channel", "futures-util", - "http 0.2.12", - "hyper", - "rustls", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", "tokio", - "tokio-rustls", ] [[package]] @@ -3306,12 +2920,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "tokio", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -3351,6 +2980,22 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + [[package]] name = "im" version = "15.1.0" @@ -3392,41 +3037,39 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] -name = "indicatif" -version = "0.17.8" +name = "inotify" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", + "bitflags 1.3.2", + "inotify-sys", + "libc", ] [[package]] -name = "infer" -version = "0.11.0" +name = "inotify-sys" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6c16b11a665b26aeeb9b1d7f954cdeb034be38dd00adab4f2ae921a8fee804" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" dependencies = [ - "cfb", + "libc", ] [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", "js-sys", @@ -3434,6 +3077,16 @@ dependencies = [ "web-sys", ] +[[package]] +name = "internment" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e8e537b529b8674e97e9fb82c10ff168a290ac3867a0295f112061ffbca1ef" +dependencies = [ + "hashbrown 0.14.5", + "parking_lot 0.12.3", +] + [[package]] name = "interprocess-docfix" version = "1.2.2" @@ -3498,138 +3151,83 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] -name = "javascriptcore-rs" -version = "0.17.0" +name = "jobserver" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "110b9902c80c12bf113c432d0b71c7a94490b294a8234f326fd0abca2fac0b00" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ - "bitflags 1.3.2", - "glib", - "javascriptcore-rs-sys", + "libc", ] [[package]] -name = "javascriptcore-rs-sys" -version = "0.5.1" +name = "js-sys" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a216519a52cd941a733a0ad3f1023cfdb1cd47f3955e8e863ed56f558f916c" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", + "wasm-bindgen", ] [[package]] -name = "jni" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" -dependencies = [ - "cesu8", - "combine 4.6.6", - "jni-sys", - "log", - "thiserror", - "walkdir", -] - -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine 4.6.6", - "jni-sys", - "log", - "thiserror", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "jobserver" -version = "0.1.28" +name = "keccak" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ - "libc", + "cpufeatures", ] [[package]] -name = "js-sys" -version = "0.3.68" +name = "keccak-const" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" -dependencies = [ - "wasm-bindgen", -] +checksum = "57d8d8ce877200136358e0bbff3a77965875db3af755a11e1fa6b1b3e2df13ea" [[package]] -name = "jsonrpc-core" -version = "18.0.0" +name = "keyboard-types" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "futures", - "futures-executor", - "futures-util", - "log", - "serde", - "serde_derive", - "serde_json", + "bitflags 2.6.0", ] [[package]] -name = "keccak" -version = "0.1.5" +name = "kqueue" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" dependencies = [ - "cpufeatures", + "kqueue-sys", + "libc", ] [[package]] -name = "keyboard-types" -version = "0.7.0" +name = "kqueue-sys" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ - "bitflags 2.5.0", - "serde", - "unicode-segmentation", + "bitflags 1.3.2", + "libc", ] [[package]] -name = "kuchiki" -version = "0.8.1" +name = "krates" +version = "0.16.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" +checksum = "7fcb3baf2360eb25ad31f0ada3add63927ada6db457791979b82ac199f835cb9" dependencies = [ - "cssparser", - "html5ever", - "matches", - "selectors", + "cargo-platform", + "cargo_metadata", + "cfg-expr", + "petgraph", + "semver", ] [[package]] @@ -3649,35 +3247,24 @@ checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", - "windows-targets 0.52.4", -] - -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.5.0", - "libc", - "redox_syscall 0.4.1", + "windows-targets 0.52.6", ] [[package]] @@ -3730,12 +3317,13 @@ dependencies = [ [[package]] name = "light-poseidon" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b439809cdfc0d86ecc7317f1724df13dfa665df48991b79e90e689411451f7" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", + "num-bigint", "thiserror", ] @@ -3747,15 +3335,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -3763,9 +3351,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "value-bag", ] @@ -3782,15 +3370,9 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - [[package]] name = "malloc_buf" version = "0.0.6" @@ -3801,24 +3383,10 @@ dependencies = [ ] [[package]] -name = "markup5ever" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" -dependencies = [ - "log", - "phf", - "phf_codegen", - "string_cache", - "string_cache_codegen", - "tendril", -] - -[[package]] -name = "matches" -version = "0.1.10" +name = "matchit" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "md-5" @@ -3830,11 +3398,17 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -3856,18 +3430,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -3890,17 +3455,11 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", "simd-adler32", @@ -3913,6 +3472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", + "log", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] @@ -3932,11 +3492,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -3948,40 +3507,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "ndk" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" -dependencies = [ - "bitflags 1.3.2", - "jni-sys", - "ndk-sys", - "num_enum 0.5.11", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nix" version = "0.24.3" @@ -3995,86 +3520,33 @@ dependencies = [ ] [[package]] -name = "nix" -version = "0.26.4" +name = "notify" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "729f63e1ca555a43fe3efa4f3efdf4801c479da85b432242a7b726f353c88486" dependencies = [ "bitflags 1.3.2", - "cfg-if", + "crossbeam-channel", + "filetime", + "fsevent-sys", + "inotify", + "kqueue", "libc", - "memoffset 0.7.1", - "pin-utils", -] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" -dependencies = [ - "num-bigint 0.2.6", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "mio", + "walkdir", + "windows-sys 0.45.0", ] [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] -[[package]] -name = "num-complex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-derive" version = "0.3.3" @@ -4094,60 +3566,37 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", + "syn 2.0.70", ] [[package]] -name = "num-iter" -version = "0.1.44" +name = "num-format" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "arrayvec", + "itoa", ] [[package]] -name = "num-rational" -version = "0.2.4" +name = "num-integer" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", - "num-bigint 0.2.6", - "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - [[package]] name = "num_enum" version = "0.5.11" @@ -4196,7 +3645,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -4208,15 +3657,9 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "objc" version = "0.2.7" @@ -4224,7 +3667,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", ] [[package]] @@ -4238,15 +3680,6 @@ dependencies = [ "objc_id", ] -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] - [[package]] name = "objc_id" version = "0.1.1" @@ -4258,22 +3691,13 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] -[[package]] -name = "oid-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" -dependencies = [ - "asn1-rs", -] - [[package]] name = "once_cell" version = "1.19.0" @@ -4292,7 +3716,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -4309,7 +3733,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -4320,9 +3744,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -4331,55 +3755,64 @@ dependencies = [ ] [[package]] -name = "ordered-float" -version = "2.10.1" +name = "ore-api" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +checksum = "0697cf6480f6c81117db19ceeaa66206b76f1d5b0e2896767f6d797f50181475" dependencies = [ - "num-traits", + "array-const-fn-init", + "bytemuck", + "const-crypto", + "drillx", + "mpl-token-metadata", + "num_enum 0.7.2", + "ore-utils", + "solana-program", + "spl-associated-token-account", + "spl-token", + "static_assertions", + "thiserror", ] [[package]] name = "ore-app" -version = "1.0.1" +version = "1.1.0" dependencies = [ + "async-retry", "async-std", - "async-tungstenite", + "base64 0.22.1", "bincode", + "bs58 0.4.0", "cached", "chrono", "dioxus", - "dioxus-desktop", - "dioxus-router", - "dioxus-std", - "dioxus-web", - "directories", - "env_logger 0.11.3", + "dioxus-logger", + "dioxus-sdk", + "drillx", "futures", + "futures-util", "gloo 0.11.0", "gloo-storage 0.3.0", - "home", "is-url", "js-sys", + "lazy_static", "log", - "num_cpus", + "num-format", + "ore-api", "ore-program", + "ore-relayer-api", "ore-types", + "ore-utils", "qrcode-generator", "rand 0.8.5", "reqwest", "serde", "serde-wasm-bindgen 0.6.5", "serde_json", - "solana-account-decoder", - "solana-client", "solana-client-wasm", "solana-extra-wasm", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account", - "spl-memo", - "spl-token", + "tracing", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -4390,9 +3823,9 @@ dependencies = [ [[package]] name = "ore-program" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1438154357d3952bd1d8f683d7ded7977a317b86495031313a6a8799afe2ec8" +checksum = "fcf2aafa6b257df0f423042e69eb7dd5dbc90a03f2469b986b14401dc6570246" dependencies = [ "bs58 0.5.1", "bytemuck", @@ -4407,48 +3840,53 @@ dependencies = [ ] [[package]] -name = "ore-types" -version = "0.0.5" +name = "ore-relayer-api" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac63bfebb54b36bde67dda2015904c94d3dcde0eb0f77d8ff02f0b8d637ec85f" +checksum = "5a57ad347b32515669ebcbc0c5362c9414be0f9a32011f8e233ec4c9128899a1" dependencies = [ - "postgres-types", - "serde", - "serde_json", -] - -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + "bytemuck", + "mpl-token-metadata", + "num_enum 0.7.2", + "ore-api", + "ore-utils", + "solana-program", + "spl-associated-token-account", + "spl-token", + "static_assertions", + "thiserror", +] [[package]] -name = "pango" -version = "0.16.5" +name = "ore-types" +version = "0.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" +checksum = "5b8382bd318e64848963858692f4bbff8ce2f976d503d040c4a3f3dea1abc5ca" dependencies = [ - "bitflags 1.3.2", - "gio", - "glib", - "libc", - "once_cell", - "pango-sys", + "drillx", + "postgres-types", + "serde", + "serde_json", ] [[package]] -name = "pango-sys" -version = "0.16.3" +name = "ore-utils" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" +checksum = "90a09a7a1e296ce157c75cf41145edb3608b838f9503125897552f4fe49acf64" dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", + "bytemuck", + "solana-program", + "spl-associated-token-account", + "spl-token", ] +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + [[package]] name = "parking" version = "2.2.0" @@ -4468,12 +3906,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] @@ -4492,22 +3930,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.2", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -4527,15 +3965,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -4543,85 +3972,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "percentage" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" -dependencies = [ - "num", -] - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_macros", - "phf_shared 0.8.0", - "proc-macro-hack", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared 0.8.0", - "rand 0.7.3", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -dependencies = [ - "phf_shared 0.10.0", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" +name = "petgraph" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ - "siphasher", + "fixedbitset", + "indexmap 2.2.6", ] [[package]] @@ -4641,14 +3998,14 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -4669,38 +4026,21 @@ dependencies = [ [[package]] name = "piper" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand 2.1.0", "futures-io", ] -[[package]] -name = "pkcs8" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" -dependencies = [ - "der", - "spki", - "zeroize", -] - [[package]] name = "pkg-config" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "png" version = "0.17.13" @@ -4732,14 +4072,15 @@ dependencies = [ [[package]] name = "polling" -version = "3.5.0" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.32", + "rustix 0.38.34", "tracing", "windows-sys 0.52.0", ] @@ -4756,12 +4097,6 @@ dependencies = [ "universal-hash", ] -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - [[package]] name = "postgres-derive" version = "0.4.5" @@ -4771,7 +4106,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -4804,32 +4139,20 @@ dependencies = [ "postgres-protocol", ] -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -4838,7 +4161,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml 0.5.11", + "toml", ] [[package]] @@ -4884,17 +4207,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -4933,62 +4250,14 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", -] - -[[package]] -name = "quinn" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" -dependencies = [ - "bytes", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "quinn-proto" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" -dependencies = [ - "bytes", - "rand 0.8.5", - "ring 0.16.20", - "rustc-hash", - "rustls", - "rustls-native-certs", - "slab", - "thiserror", - "tinyvec", - "tracing", -] - -[[package]] -name = "quinn-udp" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" -dependencies = [ - "bytes", - "libc", - "socket2 0.5.6", - "tracing", - "windows-sys 0.48.0", + "syn 2.0.70", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -5004,7 +4273,6 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", - "rand_pcg", ] [[package]] @@ -5053,7 +4321,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", ] [[package]] @@ -5065,15 +4333,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_xoshiro" version = "0.6.0" @@ -5083,17 +4342,11 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "raw-window-handle" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -5109,18 +4362,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rcgen" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" -dependencies = [ - "pem", - "ring 0.16.20", - "time", - "yasna", -] - [[package]] name = "redox_syscall" version = "0.2.16" @@ -5140,21 +4381,19 @@ dependencies = [ ] [[package]] -name = "redox_users" -version = "0.4.4" +name = "redox_syscall" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "getrandom 0.2.12", - "libredox", - "thiserror", + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.3" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -5164,9 +4403,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -5175,9 +4414,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -5185,7 +4424,6 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "async-compression", "base64 0.21.7", "bytes", "encoding_rs", @@ -5193,9 +4431,8 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", - "hyper", - "hyper-rustls", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-tls", "ipnet", "js-sys", @@ -5205,107 +4442,49 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", - "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.4", "winreg", ] [[package]] -name = "rfd" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe664af397d2b6a13a8ba1d172a2b5c87c6c5149039edbf8fa122b98c9ed96f" -dependencies = [ - "async-io 1.13.0", - "block", - "dispatch", - "futures-util", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "log", - "objc", - "objc-foundation", - "objc_id", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - -[[package]] -name = "ring" -version = "0.17.8" +name = "retry-backoff" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.12", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.52.0", -] +checksum = "e0d5058b9f1c22f124c926b1f60bb7893c9cfb793d4e2506316cfda4ff17ae56" [[package]] -name = "rpassword" -version = "7.3.1" +name = "retry-policy" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +checksum = "e4636eceb6380719d9ab5acf2a55528a255f0c32ad8ed4d5148c968f625bf79a" dependencies = [ - "libc", - "rtoolbox", - "windows-sys 0.48.0", + "retry-backoff", + "retry-predicate", ] [[package]] -name = "rtoolbox" -version = "0.0.2" +name = "retry-predicate" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] +checksum = "de4e01b6a9151ea5e162dd4521f35047ab8ca927c226c92e2550e675a08e809d" [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -5322,15 +4501,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom", -] - [[package]] name = "rustix" version = "0.37.27" @@ -5347,41 +4517,17 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -5391,27 +4537,17 @@ dependencies = [ "base64 0.21.7", ] -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -5443,43 +4579,13 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scroll" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.53", -] - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -5488,57 +4594,39 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", ] [[package]] -name = "selectors" -version = "0.22.0" +name = "semver" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ - "bitflags 1.3.2", - "cssparser", - "derive_more", - "fxhash", - "log", - "matches", - "phf", - "phf_codegen", - "precomputed-hash", - "servo_arc", - "smallvec", - "thin-slice", + "serde", ] [[package]] -name = "semver" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" - -[[package]] -name = "serde" -version = "1.0.197" +name = "send_wrapper" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" dependencies = [ - "serde_derive", + "futures-core", ] [[package]] -name = "serde-value" -version = "0.7.0" +name = "serde" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ - "ordered-float", - "serde", + "serde_derive", ] [[package]] @@ -5565,53 +4653,54 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ - "itoa 1.0.10", + "itoa", "ryu", "serde", ] [[package]] -name = "serde_repr" -version = "0.1.18" +name = "serde_path_to_error" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.53", + "itoa", + "serde", ] [[package]] -name = "serde_spanned" -version = "0.6.5" +name = "serde_qs" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c" dependencies = [ + "percent-encoding", "serde", + "thiserror", ] [[package]] @@ -5621,7 +4710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.10", + "itoa", "ryu", "serde", ] @@ -5642,20 +4731,62 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] -name = "servo_arc" -version = "0.1.1" +name = "server_fn" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" +checksum = "b06e6e5467a2cd93ce1accfdfd8b859404f0b3b2041131ffd774fabf666b8219" dependencies = [ - "nodrop", - "stable_deref_trait", + "bytes", + "const_format", + "dashmap", + "futures", + "gloo-net 0.5.0", + "http 1.1.0", + "js-sys", + "once_cell", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "server_fn_macro_default", + "thiserror", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c216bb1c1ac890151397643c663c875a1836adf0b269be4e389cb1b48c173c" +dependencies = [ + "const_format", + "convert_case", + "proc-macro2", + "quote", + "syn 2.0.70", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro_default" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00783df297ec85ea605779f2fef9cbec98981dffe2e01e1a9845c102ee1f1ae6" +dependencies = [ + "server_fn_macro", + "syn 2.0.70", ] [[package]] @@ -5693,6 +4824,12 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2-const-stable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f179d4e11094a893b82fff208f74d448a7512f99f5a0acbd5c679b705f83ed9" + [[package]] name = "sha3" version = "0.9.1" @@ -5762,18 +4899,12 @@ dependencies = [ ] [[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" +name = "sharded-slab" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ - "libc", + "lazy_static", ] [[package]] @@ -5815,12 +4946,22 @@ dependencies = [ [[package]] name = "sledgehammer_bindgen" -version = "0.2.4" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcfaf791ff02f48f3518ce825d32cf419c13a43c1d8b1232f74ac89f339c46d2" +dependencies = [ + "sledgehammer_bindgen_macro", + "wasm-bindgen", +] + +[[package]] +name = "sledgehammer_bindgen_macro" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0bc2cf26c12673eee8674b19d56cec04e9b815704c71298eafac61f131f99d7" +checksum = "edc90d3e8623d29a664cd8dba5078b600dd203444f00b9739f744e4c6e7aeaf2" dependencies = [ "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -5835,10 +4976,14 @@ dependencies = [ ] [[package]] -name = "smallbox" -version = "0.8.2" +name = "slotmap" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92359f97e6b417da4328a970cf04a044db104fbd57f7d72cb7ff665bb8806af" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "serde", + "version_check", +] [[package]] name = "smallvec" @@ -5857,7 +5002,7 @@ dependencies = [ "lazy_static", "log", "memmap2", - "nix 0.24.3", + "nix", "pkg-config", "wayland-client", "wayland-cursor", @@ -5886,98 +5031,24 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", ] -[[package]] -name = "solana-account-decoder" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5010de925850388b045a6d88e88f62944906f4f436ff48436b110f543f254ad6" -dependencies = [ - "Inflector", - "base64 0.21.7", - "bincode", - "bs58 0.4.0", - "bv", - "lazy_static", - "serde", - "serde_derive", - "serde_json", - "solana-config-program", - "solana-sdk", - "spl-token", - "spl-token-2022", - "spl-token-metadata-interface", - "thiserror", - "zstd", -] - -[[package]] -name = "solana-clap-utils" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a03569b14b9eb239fe1d19f990e3fb9b1a819a8b2fe723b40766fdd1453e974" -dependencies = [ - "chrono", - "clap 2.34.0", - "rpassword", - "solana-remote-wallet", - "solana-sdk", - "thiserror", - "tiny-bip39", - "uriparse", - "url", -] - -[[package]] -name = "solana-client" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2faa22fced7ed238942d12f203177273f945746210cff3e465961407ac12a96b" -dependencies = [ - "async-trait", - "bincode", - "dashmap", - "futures", - "futures-util", - "indexmap 2.2.5", - "indicatif", - "log", - "quinn", - "rayon", - "solana-connection-cache", - "solana-measure", - "solana-metrics", - "solana-pubsub-client", - "solana-quic-client", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-rpc-client-nonce-utils", - "solana-sdk", - "solana-streamer", - "solana-thin-client", - "solana-tpu-client", - "solana-udp-client", - "thiserror", - "tokio", -] - [[package]] name = "solana-client-wasm" -version = "1.17.4" -source = "git+https://github.com/HardhatChad/solana-playground?branch=hardhatchad/token-largest#91367320c2f76d9d6e24e55f48eb14b7947b1c8f" +version = "1.18.0" +source = "git+https://github.com/regolith-labs/solana-playground?branch=master#5cb0c7d4804192a1ecb1686c18ceb4d8060a325a" dependencies = [ "async-trait", "base64 0.13.1", "bincode", "bs58 0.4.0", - "clap 3.2.25", + "clap", "futures", "reqwest", "serde", @@ -5988,46 +5059,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "solana-config-program" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fa1a537ec5fc4ba3c3951d2a010809721c240a2cfaab6d6da95a5f0b2f4797c" -dependencies = [ - "bincode", - "chrono", - "serde", - "serde_derive", - "solana-program-runtime", - "solana-sdk", -] - -[[package]] -name = "solana-connection-cache" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158fe99dc9e1ee82f35aae0da416fa6b23f7e17dbbb469427d532056f713a02a" -dependencies = [ - "async-trait", - "bincode", - "crossbeam-channel", - "futures-util", - "indexmap 2.2.5", - "log", - "rand 0.8.5", - "rayon", - "rcgen", - "solana-measure", - "solana-metrics", - "solana-sdk", - "thiserror", - "tokio", -] - [[package]] name = "solana-extra-wasm" -version = "1.17.4" -source = "git+https://github.com/HardhatChad/solana-playground?branch=hardhatchad/token-largest#91367320c2f76d9d6e24e55f48eb14b7947b1c8f" +version = "1.18.0" +source = "git+https://github.com/regolith-labs/solana-playground?branch=master#5cb0c7d4804192a1ecb1686c18ceb4d8060a325a" dependencies = [ "Inflector", "arrayref", @@ -6038,7 +5073,7 @@ dependencies = [ "bs58 0.4.0", "bytemuck", "chrono", - "clap 3.2.25", + "clap", "console", "fluvio-wasm-timer", "humantime", @@ -6060,19 +5095,15 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.17.4" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80447a64ba88aff4ab1fe70c646b9a0ee65f190aa2977b1e7360066445f8ed34" +checksum = "4867f66e9527fa44451c861c1dc6d9b2a7c7a668d7c6a297cdefbe39f4395b33" dependencies = [ - "ahash 0.8.11", - "blake3", "block-buffer 0.10.4", "bs58 0.4.0", "bv", - "byteorder", - "cc", "either", - "generic-array", + "generic-array 0.14.7", "im", "lazy_static", "log", @@ -6081,7 +5112,6 @@ dependencies = [ "serde", "serde_bytes", "serde_derive", - "serde_json", "sha2 0.10.8", "solana-frozen-abi-macro", "subtle", @@ -6090,108 +5120,32 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.17.4" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28b7325d40b3b3fef0db6917972e8121bec05fa2b59904212b25478c85924cd" +checksum = "168f24d97347b85f05192df58d6be3e3047a4aadc4001bc1b9e711a5ec878eea" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] name = "solana-logger" -version = "1.17.4" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a224a0a87196c940472515838630e0ed6a49f97ea0d01d9dbeed0bb57390447" +checksum = "a0511082fc62f2d086520fff5aa1917c389d8c840930c08ad255ae05952c08a2" dependencies = [ - "env_logger 0.9.3", + "env_logger", "lazy_static", "log", ] -[[package]] -name = "solana-measure" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf3d86eec20d13830a3c692e1428570d1e02dca750812ef58532dbda062e79b" -dependencies = [ - "log", - "solana-sdk", -] - -[[package]] -name = "solana-metrics" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b9e646b0d429c661500f3acc1a52adb292157a2f57fc855b298b437f07c9de" -dependencies = [ - "crossbeam-channel", - "gethostname", - "lazy_static", - "log", - "reqwest", - "solana-sdk", - "thiserror", -] - -[[package]] -name = "solana-net-utils" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca9b8bfb1876bc5386873f129dcd27fe08da8cd2f2d94c40351c5411cece365f" -dependencies = [ - "bincode", - "clap 3.2.25", - "crossbeam-channel", - "log", - "nix 0.26.4", - "rand 0.8.5", - "serde", - "serde_derive", - "socket2 0.5.6", - "solana-logger", - "solana-sdk", - "solana-version", - "tokio", - "url", -] - -[[package]] -name = "solana-perf" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3f15738555e4262181bcbcc6d2b7ac60693b6514556d5d44b791ee7b517a2e" -dependencies = [ - "ahash 0.8.11", - "bincode", - "bv", - "caps", - "curve25519-dalek", - "dlopen2", - "fnv", - "lazy_static", - "libc", - "log", - "nix 0.26.4", - "rand 0.8.5", - "rayon", - "rustc_version", - "serde", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-metrics", - "solana-rayon-threadlimit", - "solana-sdk", - "solana-vote-program", -] - [[package]] name = "solana-program" -version = "1.17.4" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1fe4a811ec2c4b0c3773e5661ecfaff81f822c9e18866097caeba6be9338dab" +checksum = "2bc5a636dc75e5c25651e34f7a36afc9ae60d38166687c5b0375abb580ac81a2" dependencies = [ "ark-bn254", "ark-ec", @@ -6199,10 +5153,11 @@ dependencies = [ "ark-serialize", "base64 0.21.7", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "blake3", "borsh 0.10.3", "borsh 0.9.3", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -6210,7 +5165,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.12", + "getrandom 0.2.15", "itertools", "js-sys", "lazy_static", @@ -6218,11 +5173,11 @@ dependencies = [ "libsecp256k1", "light-poseidon", "log", - "memoffset 0.9.0", - "num-bigint 0.4.4", - "num-derive 0.3.3", + "memoffset 0.9.1", + "num-bigint", + "num-derive 0.4.2", "num-traits", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", "rustc_version", "rustversion", @@ -6241,187 +5196,17 @@ dependencies = [ "zeroize", ] -[[package]] -name = "solana-program-runtime" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41841bee09d81bed82ffebe1fb7fdebe3003d0fca5f3a6d03e3cb01ac5aed979" -dependencies = [ - "base64 0.21.7", - "bincode", - "eager", - "enum-iterator", - "itertools", - "libc", - "log", - "num-derive 0.3.3", - "num-traits", - "percentage", - "rand 0.8.5", - "rustc_version", - "serde", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-measure", - "solana-metrics", - "solana-sdk", - "solana_rbpf", - "thiserror", -] - -[[package]] -name = "solana-pubsub-client" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18b8dd7a4139b47c0e364356890c8d80e7e6fa61d7e7932b9aeb034858001da0" -dependencies = [ - "crossbeam-channel", - "futures-util", - "log", - "reqwest", - "semver", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-rpc-client-api", - "solana-sdk", - "thiserror", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite 0.20.1", - "url", -] - -[[package]] -name = "solana-quic-client" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec167e0a89e276beb3537cb1f8062eeee1c8c7450fcdd97bb146b9ca452028" -dependencies = [ - "async-mutex", - "async-trait", - "futures", - "itertools", - "lazy_static", - "log", - "quinn", - "quinn-proto", - "rcgen", - "rustls", - "solana-connection-cache", - "solana-measure", - "solana-metrics", - "solana-net-utils", - "solana-rpc-client-api", - "solana-sdk", - "solana-streamer", - "thiserror", - "tokio", -] - -[[package]] -name = "solana-rayon-threadlimit" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1bfe12ceef4ba1c66c01528d3a420dc71bfebc2822ff7176e5e02229704efdd" -dependencies = [ - "lazy_static", - "num_cpus", -] - -[[package]] -name = "solana-remote-wallet" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6c9306ca3911cbca5918b9c8644494db18454388b2b586b9f3cf9a319f5a8a" -dependencies = [ - "console", - "dialoguer", - "log", - "num-derive 0.3.3", - "num-traits", - "parking_lot 0.12.1", - "qstring", - "semver", - "solana-sdk", - "thiserror", - "uriparse", -] - -[[package]] -name = "solana-rpc-client" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16bfac7d8a3cb4ac6136779537e985ee8097ed424f2778cfabdcd5ca3fc44961" -dependencies = [ - "async-trait", - "base64 0.21.7", - "bincode", - "bs58 0.4.0", - "indicatif", - "log", - "reqwest", - "semver", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-version", - "solana-vote-program", - "tokio", -] - -[[package]] -name = "solana-rpc-client-api" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e281e7ce2d2f7775973de6f8901baf7688ed3b38b93215fc417efeade0a858" -dependencies = [ - "base64 0.21.7", - "bs58 0.4.0", - "jsonrpc-core", - "reqwest", - "semver", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-sdk", - "solana-transaction-status", - "solana-version", - "spl-token-2022", - "thiserror", -] - -[[package]] -name = "solana-rpc-client-nonce-utils" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2146bced7672bef5f288bb33923c39688ff64c085e7e189843eeb2a1570d402" -dependencies = [ - "clap 2.34.0", - "solana-clap-utils", - "solana-rpc-client", - "solana-sdk", - "thiserror", -] - [[package]] name = "solana-sdk" -version = "1.17.4" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c79894240bad61135a9ec86cd7709dcbc9e69eec8ebcc0b4066bccde6615600" +checksum = "df43d3a1e1637397ab43cbc216a5a8f977ec8a3cc3f3ae8c3851c83a3255dbcf" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 2.5.0", - "borsh 0.10.3", + "bitflags 2.6.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -6430,7 +5215,7 @@ dependencies = [ "digest 0.10.7", "ed25519-dalek", "ed25519-dalek-bip32", - "generic-array", + "generic-array 0.14.7", "hmac 0.12.1", "itertools", "js-sys", @@ -6438,9 +5223,9 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "num-derive 0.3.3", + "num-derive 0.4.2", "num-traits", - "num_enum 0.6.1", + "num_enum 0.7.2", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -6455,183 +5240,41 @@ dependencies = [ "serde_with", "sha2 0.10.8", "sha3 0.10.8", + "siphasher", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-logger", "solana-program", "solana-sdk-macro", "thiserror", - "uriparse", - "wasm-bindgen", -] - -[[package]] -name = "solana-sdk-macro" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dce8e347d73bcd9a6fe0b37bf830a20d0a4913ac58046c79959d5e15bbbed3" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.53", -] - -[[package]] -name = "solana-streamer" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef6ad3550bfa2b19a34ded8e0bc48afa6329f4b035bbbb47e9cd4eea2f43b77" -dependencies = [ - "async-channel 1.9.0", - "bytes", - "crossbeam-channel", - "futures-util", - "histogram", - "indexmap 2.2.5", - "itertools", - "libc", - "log", - "nix 0.26.4", - "pem", - "percentage", - "pkcs8", - "quinn", - "quinn-proto", - "rand 0.8.5", - "rcgen", - "rustls", - "solana-metrics", - "solana-perf", - "solana-sdk", - "thiserror", - "tokio", - "x509-parser", -] - -[[package]] -name = "solana-thin-client" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c37f63a745ce69c82492f9e5f64065931cc04f089c85f9fc8405d4157e5e1faa" -dependencies = [ - "bincode", - "log", - "rayon", - "solana-connection-cache", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-sdk", -] - -[[package]] -name = "solana-tpu-client" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0dd91049e3b36a123b8e06366def07c8e7b94ad3e2054acc2c21c2d64592ec" -dependencies = [ - "async-trait", - "bincode", - "futures-util", - "indexmap 2.2.5", - "indicatif", - "log", - "rayon", - "solana-connection-cache", - "solana-measure", - "solana-metrics", - "solana-pubsub-client", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-sdk", - "thiserror", - "tokio", -] - -[[package]] -name = "solana-transaction-status" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e143ce053b0fe641f320c463c822c199d5b6849b0d844be009b8e7d6ecebf8e" -dependencies = [ - "Inflector", - "base64 0.21.7", - "bincode", - "borsh 0.10.3", - "bs58 0.4.0", - "lazy_static", - "log", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-sdk", - "spl-associated-token-account", - "spl-memo", - "spl-token", - "spl-token-2022", - "thiserror", -] - -[[package]] -name = "solana-udp-client" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5adc5098bc0bed377909856ea645ce0129189b202e4dc39d900ee6a8f5bcc78" -dependencies = [ - "async-trait", - "solana-connection-cache", - "solana-net-utils", - "solana-sdk", - "solana-streamer", - "thiserror", - "tokio", -] - -[[package]] -name = "solana-version" -version = "1.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d49400028b385d830fde8ec073c372394197bb493236442670117516db4b4a1" -dependencies = [ - "log", - "rustc_version", - "semver", - "serde", - "serde_derive", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk", + "uriparse", + "wasm-bindgen", ] [[package]] -name = "solana-vote-program" -version = "1.17.4" +name = "solana-sdk-macro" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af002db2bc89bfdc199d641929449d932248c38d2b39cb875f307aa4c4ff60bc" +checksum = "86c76414183a325038ff020b22c07d1e9d2da0703ddc0244acfed37ee2921d96" dependencies = [ - "bincode", - "log", - "num-derive 0.3.3", - "num-traits", - "rustc_version", - "serde", - "serde_derive", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-metrics", - "solana-program", - "solana-program-runtime", - "solana-sdk", - "thiserror", + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.70", ] +[[package]] +name = "solana-security-txt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" + [[package]] name = "solana-zk-token-sdk" -version = "1.17.4" +version = "1.18.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48f33d2ce508c9e70aa7d2f1948f3a9df56ee66423252785c608b4023e0c01a" +checksum = "513407f88394e437b4ff5aad892bc5bf51a655ae2401e6e63549734d3695c46f" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -6643,7 +5286,7 @@ dependencies = [ "itertools", "lazy_static", "merlin", - "num-derive 0.3.3", + "num-derive 0.4.2", "num-traits", "rand 0.7.3", "serde", @@ -6656,65 +5299,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "solana_rbpf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" -dependencies = [ - "byteorder", - "combine 3.8.1", - "goblin", - "hash32", - "libc", - "log", - "rand 0.8.5", - "rustc-demangle", - "scroll", - "thiserror", - "winapi", -] - -[[package]] -name = "soup3" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82bc46048125fefd69d30b32b9d263d6556c9ffe82a7a7df181a86d912da5616" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "gio", - "glib", - "libc", - "once_cell", - "soup3-sys", -] - -[[package]] -name = "soup3-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "014bbeb1c4cdb30739dc181e8d98b7908f124d9555843afa89b5570aaf4ec62b" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "spinning" version = "0.1.0" @@ -6724,21 +5308,11 @@ dependencies = [ "lock_api", ] -[[package]] -name = "spki" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "spl-associated-token-account" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3" +checksum = "992d9c64c2564cc8f63a4b508bf3ebcdf2254b0429b13cd1d31adb6162432a5f" dependencies = [ "assert_matches", "borsh 0.10.3", @@ -6769,7 +5343,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -6781,15 +5355,15 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.53", + "syn 2.0.70", "thiserror", ] [[package]] name = "spl-memo" -version = "4.0.0" +version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +checksum = "a49f49f95f2d02111ded31696ab38a081fab623d4c76bd4cb074286db4560836" dependencies = [ "solana-program", ] @@ -6829,14 +5403,14 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" +checksum = "615d381f48ddd2bb3c57c7f7fb207591a2a05054639b18a62e785117dd7a8683" dependencies = [ "bytemuck", "solana-program", @@ -6863,9 +5437,9 @@ dependencies = [ [[package]] name = "spl-token-2022" -version = "0.9.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" +checksum = "d697fac19fd74ff472dfcc13f0b442dd71403178ce1de7b5d16f83a33561c059" dependencies = [ "arrayref", "bytemuck", @@ -6873,16 +5447,31 @@ dependencies = [ "num-traits", "num_enum 0.7.2", "solana-program", + "solana-security-txt", "solana-zk-token-sdk", "spl-memo", "spl-pod", "spl-token", + "spl-token-group-interface", "spl-token-metadata-interface", "spl-transfer-hook-interface", "spl-type-length-value", "thiserror", ] +[[package]] +name = "spl-token-group-interface" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b889509d49fa74a4a033ca5dae6c2307e9e918122d97e58562f5c4ffa795c75d" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", +] + [[package]] name = "spl-token-metadata-interface" version = "0.2.0" @@ -6899,9 +5488,9 @@ dependencies = [ [[package]] name = "spl-transfer-hook-interface" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" +checksum = "7aabdb7c471566f6ddcee724beb8618449ea24b399e58d464d6b5bc7db550259" dependencies = [ "arrayref", "bytemuck", @@ -6926,12 +5515,6 @@ dependencies = [ "spl-program-error", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" @@ -6939,53 +5522,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "string_cache" -version = "0.8.7" +name = "stringprep" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot 0.12.1", - "phf_shared 0.10.0", - "precomputed-hash", - "serde", + "unicode-bidi", + "unicode-normalization", + "unicode-properties", ] [[package]] -name = "string_cache_codegen" -version = "0.5.2" +name = "strsim" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] -name = "stringprep" -version = "0.1.4" +name = "strsim" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" -dependencies = [ - "finl_unicode", - "unicode-bidi", - "unicode-normalization", -] +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "strsim" -version = "0.8.0" +name = "strum" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] [[package]] -name = "strsim" -version = "0.10.0" +name = "strum_macros" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.70", +] [[package]] name = "subtle" @@ -7006,15 +5585,27 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.53" +version = "2.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.70", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -7022,16 +5613,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "synstructure" -version = "0.12.6" +name = "sync_wrapper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "system-configuration" @@ -7054,83 +5639,6 @@ dependencies = [ "libc", ] -[[package]] -name = "system-deps" -version = "6.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" -dependencies = [ - "cfg-expr", - "heck 0.5.0", - "pkg-config", - "toml 0.8.12", - "version-compare", -] - -[[package]] -name = "tao" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "746ae5d0ca57ae275a792f109f6e992e0b41a443abdf3f5c6eff179ef5b3443a" -dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "cc", - "cocoa", - "core-foundation", - "core-graphics", - "crossbeam-channel", - "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", - "gdkwayland-sys", - "gdkx11-sys", - "gio", - "glib", - "glib-sys", - "gtk", - "image", - "instant", - "jni 0.20.0", - "lazy_static", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys", - "objc", - "once_cell", - "parking_lot 0.12.1", - "png", - "raw-window-handle", - "scopeguard", - "serde", - "tao-macros", - "unicode-segmentation", - "uuid", - "windows", - "windows-implement", - "x11-dl", -] - -[[package]] -name = "tao-macros" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec114582505d158b669b136e6851f85840c109819d77c42bb7c0709f727d18c2" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "target-lexicon" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" - [[package]] name = "tempfile" version = "3.10.1" @@ -7138,22 +5646,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "rustix 0.38.32", + "fastrand 2.1.0", + "rustix 0.38.34", "windows-sys 0.52.0", ] -[[package]] -name = "tendril" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" -dependencies = [ - "futf", - "mac", - "utf-8", -] - [[package]] name = "termcolor" version = "1.4.1" @@ -7163,76 +5660,40 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "textwrap" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" -[[package]] -name = "thin-slice" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" - [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", -] - -[[package]] -name = "time" -version = "0.3.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" -dependencies = [ - "deranged", - "itoa 1.0.10", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", + "syn 2.0.70", ] [[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.17" +name = "thread_local" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "num-conv", - "time-core", + "cfg-if", + "once_cell", ] [[package]] @@ -7256,9 +5717,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -7277,32 +5738,30 @@ checksum = "c7c4ceeeca15c8384bbc3e011dbd8fccb7f068a440b752b7d9b32ceb0ca0e2e8" [[package]] name = "tokio" -version = "1.36.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project-lite", - "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -7315,16 +5774,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - [[package]] name = "tokio-stream" version = "0.1.15" @@ -7334,35 +5783,32 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", - "rustls", "tokio", - "tokio-rustls", - "tungstenite 0.20.1", - "webpki-roots 0.25.4", + "tungstenite", ] [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -7374,26 +5820,11 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.9", -] - [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" [[package]] name = "toml_edit" @@ -7401,9 +5832,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "toml_datetime", - "winnow 0.5.40", + "winnow", ] [[package]] @@ -7412,24 +5843,33 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "toml_datetime", - "winnow 0.5.40", + "winnow", ] [[package]] -name = "toml_edit" -version = "0.22.9" +name = "tower" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "indexmap 2.2.5", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.5", + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", ] +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -7456,7 +5896,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -7469,32 +5909,33 @@ dependencies = [ ] [[package]] -name = "try-lock" -version = "0.2.5" +name = "tracing-subscriber" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] [[package]] -name = "tungstenite" -version = "0.20.1" +name = "tracing-wasm" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "4575c663a174420fa2d78f4108ff68f65bf2fbb7dd89f33749b6e826b3626e07" dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand 0.8.5", - "rustls", - "sha1", - "thiserror", - "url", - "utf-8", - "webpki-roots 0.24.0", + "tracing", + "tracing-subscriber", + "wasm-bindgen", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "tungstenite" version = "0.21.0" @@ -7507,7 +5948,6 @@ dependencies = [ "http 1.1.0", "httparse", "log", - "native-tls", "rand 0.8.5", "sha1", "thiserror", @@ -7542,6 +5982,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + [[package]] name = "unicode-segmentation" version = "1.11.0" @@ -7550,9 +5996,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -7566,31 +6012,10 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array", + "generic-array 0.14.7", "subtle", ] -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -dependencies = [ - "void", -] - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "uriparse" version = "0.6.4" @@ -7603,9 +6028,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -7630,27 +6055,21 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "wasm-bindgen", ] [[package]] name = "value-bag" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74797339c3b98616c009c7c3eb53a0ce41e85c8ec66bd3db96ed132d20cfdee8" +checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" [[package]] name = "vcpkg" @@ -7658,18 +6077,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version-compare" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" - [[package]] name = "version_check" version = "0.9.4" @@ -7677,16 +6084,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "void" -version = "1.0.2" +name = "visibility" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +checksum = "b3fd98999db9227cf28e59d83e1f120f42bc233d4b152e8fab9bc87d5bb1e0f8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.70", +] [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -7721,34 +6133,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -7758,9 +6171,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7768,22 +6181,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-logger" @@ -7796,6 +6209,19 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wayland-client" version = "0.29.5" @@ -7805,7 +6231,7 @@ dependencies = [ "bitflags 1.3.2", "downcast-rs", "libc", - "nix 0.24.3", + "nix", "scoped-tls", "wayland-commons", "wayland-scanner", @@ -7818,7 +6244,7 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" dependencies = [ - "nix 0.24.3", + "nix", "once_cell", "smallvec", "wayland-sys", @@ -7830,7 +6256,7 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ - "nix 0.24.3", + "nix", "wayland-client", "xcursor", ] @@ -7871,9 +6297,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -7889,120 +6315,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webbrowser" -version = "0.8.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1b04c569c83a9bb971dd47ec6fd48753315f4bf989b9b04a2e7ca4d7f0dc950" -dependencies = [ - "core-foundation", - "home", - "jni 0.21.1", - "log", - "ndk-context", - "objc", - "raw-window-handle", - "url", - "web-sys", -] - -[[package]] -name = "webkit2gtk" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8eea819afe15eb8dcdff4f19d8bfda540bae84d874c10e6f4b8faf2d6704bd1" -dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "gdk", - "gdk-sys", - "gio", - "gio-sys", - "glib", - "glib-sys", - "gobject-sys", - "gtk", - "gtk-sys", - "javascriptcore-rs", - "libc", - "once_cell", - "soup3", - "webkit2gtk-sys", -] - -[[package]] -name = "webkit2gtk-sys" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ac7a95ddd3fdfcaf83d8e513b4b1ad101b95b413b6aa6662ed95f284fc3d5b" -dependencies = [ - "bitflags 1.3.2", - "cairo-sys-rs", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "gtk-sys", - "javascriptcore-rs-sys", - "libc", - "pkg-config", - "soup3-sys", - "system-deps", -] - -[[package]] -name = "webpki-roots" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" -dependencies = [ - "rustls-webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "webview2-com" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11296e5daf3a653b79bf47d66c380e4143d5b9c975818871179a3bda79499562" -dependencies = [ - "webview2-com-macros", - "webview2-com-sys", - "windows", - "windows-implement", -] - -[[package]] -name = "webview2-com-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "webview2-com-sys" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde542bed28058a5b028d459689ee57f1d06685bb6c266da3b91b1be6703952f" -dependencies = [ - "regex", - "serde", - "serde_json", - "thiserror", - "windows", - "windows-bindgen", - "windows-metadata", -] - [[package]] name = "winapi" version = "0.3.9" @@ -8021,18 +6333,18 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] name = "winapi-wsapoll" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +checksum = "1eafc5f679c576995526e81635d0cf9695841736712b4e892f87abbe6fed3f28" dependencies = [ "winapi", ] @@ -8043,64 +6355,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-bindgen" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222204ecf46521382a4d88b4a1bbefca9f8855697b4ab7d20803901425e061a3" -dependencies = [ - "windows-metadata", - "windows-tokens", -] - [[package]] name = "windows-core" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", -] - -[[package]] -name = "windows-implement" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-interface" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "windows-targets 0.52.6", ] -[[package]] -name = "windows-metadata" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee78911e3f4ce32c1ad9d3c7b0bd95389662ad8d8f1a3155688fed70bd96e2b6" - [[package]] name = "windows-sys" version = "0.45.0" @@ -8125,7 +6388,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -8160,25 +6423,20 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-tokens" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4251900975a0d10841c5d4bde79c56681543367ef811f3fabb8d1803b0959b" - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -8193,9 +6451,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -8211,9 +6469,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -8229,9 +6487,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -8247,9 +6511,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -8265,9 +6529,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -8283,9 +6547,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -8301,9 +6565,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -8314,15 +6578,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" -dependencies = [ - "memchr", -] - [[package]] name = "winreg" version = "0.50.0" @@ -8333,55 +6588,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "wry" -version = "0.28.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d15f9f827d537cefe6d047be3930f5d89b238dfb85e08ba6a319153217635aa" -dependencies = [ - "base64 0.13.1", - "block", - "cocoa", - "core-graphics", - "crossbeam-channel", - "dunce", - "gdk", - "gio", - "glib", - "gtk", - "html5ever", - "http 0.2.12", - "javascriptcore-rs", - "kuchiki", - "libc", - "log", - "objc", - "objc_id", - "once_cell", - "serde", - "serde_json", - "sha2 0.10.8", - "soup3", - "tao", - "thiserror", - "url", - "webkit2gtk", - "webkit2gtk-sys", - "webview2-com", - "windows", - "windows-implement", -] - -[[package]] -name = "x11" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" -dependencies = [ - "libc", - "pkg-config", -] - [[package]] name = "x11-clipboard" version = "0.7.1" @@ -8391,17 +6597,6 @@ dependencies = [ "x11rb", ] -[[package]] -name = "x11-dl" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" -dependencies = [ - "libc", - "once_cell", - "pkg-config", -] - [[package]] name = "x11rb" version = "0.10.1" @@ -8409,7 +6604,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" dependencies = [ "gethostname", - "nix 0.24.3", + "nix", "winapi", "winapi-wsapoll", "x11rb-protocol", @@ -8421,25 +6616,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" dependencies = [ - "nix 0.24.3", -] - -[[package]] -name = "x509-parser" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" -dependencies = [ - "asn1-rs", - "base64 0.13.1", - "data-encoding", - "der-parser", - "lazy_static", - "nom", - "oid-registry", - "rusticata-macros", - "thiserror", - "time", + "nix", ] [[package]] @@ -8450,37 +6627,34 @@ checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" [[package]] name = "xml-rs" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" +checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" [[package]] -name = "yasna" -version = "0.5.2" +name = "xxhash-rust" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" -dependencies = [ - "time", -] +checksum = "63658493314859b4dfdf3fb8c1defd61587839def09582db50b8a4e93afca6bb" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.70", ] [[package]] @@ -8500,34 +6674,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", + "syn 2.0.70", ] diff --git a/Cargo.toml b/Cargo.toml index 8b958815..7cc02ea5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,125 +1,97 @@ [package] name = "ore-app" -version = "1.0.1" -description = "Ore is a digital currency you can mine from anywhere, at home or on your phone." +version = "1.1.0" +description = "ORE is a proof-of-work token everyone can mine." edition = "2021" license = "Apache-2.0" homepage = "https://ore.supply" documentation = "https://ore.supply" -repository = "https://github.com/hardhatchad/ore-app" +repository = "https://github.com/regolith-labs/ore-app" readme = "./README.md" keywords = ["solana", "crypto", "mining"] [features] default = ["web"] bundle = [] -desktop = [ - "async-tungstenite", - "dioxus-desktop", - "directories", - "env_logger", - "home", - "num_cpus", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "solana-transaction-status", - "spl-memo", - "spl-token", - "spl-associated-token-account", -] web = [ - "dioxus-web", - "gloo", - "gloo-storage", - "js-sys", - "serde-wasm-bindgen", - "solana-client-wasm", - "solana-extra-wasm", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-logger", - "web-sys", - "web-time", + "gloo", + "gloo-storage", + "js-sys", + "serde-wasm-bindgen", + "solana-client-wasm", + "solana-extra-wasm", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-logger", + "web-sys", + "web-time", ] [dependencies] +async-retry = "0.3.1" async-std = "1.12.0" -async-tungstenite = { version = "0.25.0", features = ["async-std-runtime", "async-native-tls"], optional = true } bincode = "1.3.3" -cached = "0.47.0" +bs58 = "0.4" +cached = { version = "0.47.0", features = ["async"] } chrono = "0.4.34" -dioxus = "0.4.3" -dioxus-desktop = { version = "0.4.3", optional = true } -dioxus-router = "0.4.3" -dioxus-std = { version = "0.4.1", features = ["clipboard", "utils"] } -dioxus-web = { version = "0.4.3", optional = true } -directories = { version = "4.0.1", optional = true } -env_logger = { version = "0.11.2", optional = true } +dioxus = { version = "0.5", features = ["web", "router"] } +dioxus-sdk = { version = "0.5", features = ["clipboard", "utils"] } +dioxus-logger = { version = "0.5" } +drillx = "2.0.0" futures = "0.3.30" +futures-util = "0.3.30" gloo = { version = "0.11.0", optional = true } gloo-storage = { version = "0.3.0", optional = true } -home = { verison = "0.5.9", optional = true } is-url = { version = "1.0.4" } js-sys = { version = "0.3.67", optional = true } +lazy_static = "1.4" log = "0.4.20" -num_cpus = { version = "1.16.0", optional = true } -ore = { package = "ore-program", version = "1.2.0", features = ["no-entrypoint"] } -ore-types = "0.0.5" +num-format = "0.4.4" +ore-api-v1 = { package = "ore-program", version = "1.2" } +ore-api = "2.1.0" +ore-relayer-api = "2.1.2" +ore-utils = "2.1.0" +ore-types = "0.0.9" qrcode-generator = "4.1.9" rand = "0.8.5" reqwest = "0.11.24" serde = { version = "1.0", features = ["derive"] } serde-wasm-bindgen = { version = "0.6.3", optional = true } serde_json = "1.0" -solana-account-decoder = { version = "1.17.4", optional = true } -solana-client = { verison = "1.17.4", optional = true } -solana-client-wasm = { version = "1.17.4", optional = true } -solana-extra-wasm = { version = "1.17.4", optional = true } -solana-sdk = { version = "1.17.4", optional = true } -solana-transaction-status = { version = "1.17.4", optional = true } -spl-memo = { version = "^4", features = ["no-entrypoint"], optional = true } -spl-token = { version = "^4", features = ["no-entrypoint"], optional = true } -spl-associated-token-account = { version = "^2.2", features = [ "no-entrypoint" ], optional = true } +solana-client-wasm = { version = "1.18", optional = true } +solana-extra-wasm = { version = "1.18", optional = true } +solana-sdk = "1.18" url = "2.5.0" wasm-bindgen = { version = "0.2.91", optional = true } wasm-bindgen-futures = { version = "0.4.41", optional = true } wasm-logger = { version = "0.2.0", optional = true } web-time = { version = "1.0.0", optional = true } +tracing = "0.1.40" +base64 = "0.22.1" [dependencies.web-sys] version = "0.3" optional = true features = [ - 'console', - 'Clipboard', - 'Document', - 'HtmlElement', - 'HtmlInputElement', - 'MessageEvent', - 'Navigator', - 'Window', - 'Worker', - 'WorkerOptions', - 'WorkerType', - 'WorkerGlobalScope', + 'console', + 'Clipboard', + 'Document', + 'HtmlElement', + 'HtmlInputElement', + "IdbFactory", + "IdbDatabase", + "IdbObjectStore", + "IdbTransaction", + 'MessageEvent', + 'Navigator', + 'Window', + 'Worker', + 'WorkerOptions', + 'WorkerType', + 'WorkerGlobalScope', ] [patch.crates-io] -solana-client-wasm = { version = "1.17.4", git = "https://github.com/HardhatChad/solana-playground", branch = "hardhatchad/token-largest" } -solana-extra-wasm = { version = "1.17.4", git = "https://github.com/HardhatChad/solana-playground", branch = "hardhatchad/token-largest" } -# solana-client-wasm = { version = "1.17.4", git = "https://github.com/HardhatChad/solana-playground", rev = "91367320c2f76d9d6e24e55f48eb14b7947b1c8f" } -# solana-extra-wasm = { version = "1.17.4", git = "https://github.com/HardhatChad/solana-playground", rev = "91367320c2f76d9d6e24e55f48eb14b7947b1c8f" } - -[package.metadata.bundle] -name = "Ore" -identifier = "com.ore.app" -version = "1.0.1" -resources = ["public"] -copyright = "Copyright (c) Hardhat Chad 2024. All rights reserved." -category = "Finance" -short_description = "Ore miner" -long_description = "Ore is a digital currency you can mine from anywhere, at home or on your phone." -osx_url_schemes = ["com.ore.app"] -info_plist = "Info.plist" -icon = ["Icon.icns"] +dioxus = { git = "https://github.com/DioxusLabs/dioxus", rev = "742721bf" } +solana-client-wasm = { version = "1.18", git = "https://github.com/regolith-labs/solana-playground", branch = "master" } +solana-extra-wasm = { version = "1.18", git = "https://github.com/regolith-labs/solana-playground", branch = "master" } diff --git a/Dioxus.toml b/Dioxus.toml index b906bf7d..3056edc0 100644 --- a/Dioxus.toml +++ b/Dioxus.toml @@ -1,7 +1,7 @@ [application] # App (Project) Name -name = "Ore" +name = "ORE" # Dioxus App Default Platform # desktop, web, mobile, ssr @@ -36,14 +36,14 @@ index_on_404 = true style = ["/tailwind.css"] # Javascript code file -script = ["/worker.js"] +script = ["/worker.js", "/wallet.js"] [web.resource.dev] # serve: [dev-server] only # CSS style file -style = [] +# style = [] # Javascript code file -script = [] +# script = [] diff --git a/Icon.icns b/Icon.icns deleted file mode 100644 index 712d75c4..00000000 Binary files a/Icon.icns and /dev/null differ diff --git a/README.md b/README.md index 148a317a..ee1405c1 100644 --- a/README.md +++ b/README.md @@ -1 +1,21 @@ -# Ore app +# ORE app + +Web app for ORE cryptocurrency mining. + +## Running locally + +This app is built with [Dioxus](https://github.com/DioxusLabs/dioxus/). + +To run locally, you will need [Rust](https://www.rust-lang.org/tools/install). +Once installed, you can run: +```bash +./scripts/build.sh +``` + +This builds the web artifacts. You can host them locally with the following command: +```bash +(cd serve && cargo run) +``` + +This hosts the website on `localhost:8080`. + diff --git a/index.html b/index.html index b095450d..7e125086 100644 --- a/index.html +++ b/index.html @@ -2,21 +2,36 @@ - - Ore - - - - - - - - - + + + + + ORE + + + + + + + + + + + + + + + + + + + + -
+
- + \ No newline at end of file diff --git a/public/blink-upgrade.png b/public/blink-upgrade.png new file mode 100644 index 00000000..d6cbb930 Binary files /dev/null and b/public/blink-upgrade.png differ diff --git a/public/blink-upgrade.webp b/public/blink-upgrade.webp new file mode 100644 index 00000000..d29e444e Binary files /dev/null and b/public/blink-upgrade.webp differ diff --git a/public/favicon.png b/public/favicon.png index 5f822fbb..38975ac1 100644 Binary files a/public/favicon.png and b/public/favicon.png differ diff --git a/public/fonts/RoobertTRIAL-RegularItalic.otf b/public/fonts/RoobertTRIAL-RegularItalic.otf index 6125e730..e2b3e816 100644 Binary files a/public/fonts/RoobertTRIAL-RegularItalic.otf and b/public/fonts/RoobertTRIAL-RegularItalic.otf differ diff --git a/public/icon-v1.png b/public/icon-v1.png new file mode 100644 index 00000000..e551d719 Binary files /dev/null and b/public/icon-v1.png differ diff --git a/public/icon.png b/public/icon.png index 114e55c0..3d69c4c5 100644 Binary files a/public/icon.png and b/public/icon.png differ diff --git a/public/metadata-v2.json b/public/metadata-v2.json new file mode 100644 index 00000000..e328114f --- /dev/null +++ b/public/metadata-v2.json @@ -0,0 +1,8 @@ +{ +"name": "ORE", +"image": "https://ore.supply/icon.png", +"symbol": "ORE", +"description": "ORE is proof-of-work token everyone can mine.", +"twitter": "https://x.com/oresupply", +"website": "https://ore.supply" +} diff --git a/public/metadata.json b/public/metadata.json index 2b95cfee..ab75637c 100644 --- a/public/metadata.json +++ b/public/metadata.json @@ -1,7 +1,7 @@ { -"name": "Ore", -"image": "https://ore.supply/icon.png", -"symbol": "ORE", +"name": "OREv1", +"image": "https://ore.supply/icon-v1.png", +"symbol": "OREv1", "description": "Ore is a cryptocurrency you can mine from anywhere, at home or on your phone.", "twitter": "https://x.com/oresupply", "website": "https://ore.supply" diff --git a/public/rock-1-desktop.webp b/public/rock-1-desktop.webp new file mode 100644 index 00000000..24b47a25 Binary files /dev/null and b/public/rock-1-desktop.webp differ diff --git a/public/rock-2-desktop.webp b/public/rock-2-desktop.webp new file mode 100644 index 00000000..fa326509 Binary files /dev/null and b/public/rock-2-desktop.webp differ diff --git a/public/rock-3-desktop.webp b/public/rock-3-desktop.webp new file mode 100644 index 00000000..07c8b44a Binary files /dev/null and b/public/rock-3-desktop.webp differ diff --git a/public/smoke.jpg b/public/smoke.jpg deleted file mode 100644 index cd675ea5..00000000 Binary files a/public/smoke.jpg and /dev/null differ diff --git a/public/social-1.webp b/public/social-1.webp new file mode 100644 index 00000000..d7da60c6 Binary files /dev/null and b/public/social-1.webp differ diff --git a/public/social.jpg b/public/social.jpg deleted file mode 100644 index cb173e21..00000000 Binary files a/public/social.jpg and /dev/null differ diff --git a/public/tailwind.css b/public/tailwind.css index 007f68fd..4876284f 100644 --- a/public/tailwind.css +++ b/public/tailwind.css @@ -451,7 +451,7 @@ body { body:where(.dark, .dark *) { --tw-bg-opacity: 1; - background-color: rgb(29 29 31 / var(--tw-bg-opacity)); + background-color: rgb(19 20 22 / var(--tw-bg-opacity)); } h1 { @@ -459,7 +459,7 @@ h1 { line-height: 2.5rem; font-weight: 700; --tw-text-opacity: 1; - color: rgb(29 29 31 / var(--tw-text-opacity)); + color: rgb(19 20 22 / var(--tw-text-opacity)); } h1:where(.dark, .dark *) { @@ -472,7 +472,7 @@ h2 { line-height: 2.25rem; font-weight: 700; --tw-text-opacity: 1; - color: rgb(29 29 31 / var(--tw-text-opacity)); + color: rgb(19 20 22 / var(--tw-text-opacity)); } @media (min-width: 768px) { @@ -631,8 +631,8 @@ h2:where(.dark, .dark *) { background-color: rgb(70 70 72 / var(--tw-bg-opacity)); } -.pointer-events-none { - pointer-events: none; +.visible { + visibility: visible; } .static { @@ -664,20 +664,32 @@ h2:where(.dark, .dark *) { bottom: 5rem; } +.bottom-8 { + bottom: 2rem; +} + .left-0 { left: 0px; } +.right-0 { + right: 0px; +} + .right-4 { right: 1rem; } +.right-8 { + right: 2rem; +} + .top-0 { top: 0px; } -.z-20 { - z-index: 20; +.z-0 { + z-index: 0; } .z-50 { @@ -708,6 +720,10 @@ h2:where(.dark, .dark *) { margin-bottom: auto; } +.-mb-2 { + margin-bottom: -0.5rem; +} + .-ml-2 { margin-left: -0.5rem; } @@ -724,6 +740,10 @@ h2:where(.dark, .dark *) { margin-top: -0.875rem; } +.mb-4 { + margin-bottom: 1rem; +} + .mb-8 { margin-bottom: 2rem; } @@ -744,10 +764,6 @@ h2:where(.dark, .dark *) { margin-left: 0.5rem; } -.ml-8 { - margin-left: 2rem; -} - .ml-auto { margin-left: auto; } @@ -776,10 +792,6 @@ h2:where(.dark, .dark *) { margin-top: auto; } -.-mt-8 { - margin-top: -2rem; -} - .flex { display: flex; } @@ -820,10 +832,6 @@ h2:where(.dark, .dark *) { height: 66.666667%; } -.h-20 { - height: 5rem; -} - .h-3 { height: 0.75rem; } @@ -832,18 +840,10 @@ h2:where(.dark, .dark *) { height: 0.875rem; } -.h-32 { - height: 8rem; -} - .h-4 { height: 1rem; } -.h-48 { - height: 12rem; -} - .h-5 { height: 1.25rem; } @@ -873,24 +873,28 @@ h2:where(.dark, .dark *) { height: min-content; } -.h-screen { - height: 100vh; -} - -.max-h-\[80vh\] { - max-height: 80vh; +.h-48 { + height: 12rem; } .min-h-16 { min-height: 4rem; } -.min-h-screen { - min-height: 100vh; +.min-h-20 { + min-height: 5rem; } -.min-h-svh { - min-height: 100svh; +.min-h-24 { + min-height: 6rem; +} + +.min-h-dvh { + min-height: 100dvh; +} + +.min-h-screen { + min-height: 100vh; } .w-10 { @@ -909,8 +913,8 @@ h2:where(.dark, .dark *) { width: 0.5rem; } -.w-20 { - width: 5rem; +.w-24 { + width: 6rem; } .w-3 { @@ -929,10 +933,6 @@ h2:where(.dark, .dark *) { width: 1rem; } -.w-48 { - width: 12rem; -} - .w-5 { width: 1.25rem; } @@ -945,6 +945,10 @@ h2:where(.dark, .dark *) { width: 1.75rem; } +.w-8 { + width: 2rem; +} + .w-full { width: 100%; } @@ -958,8 +962,8 @@ h2:where(.dark, .dark *) { width: 100vw; } -.w-24 { - width: 6rem; +.w-48 { + width: 12rem; } .max-w-3xl { @@ -970,10 +974,6 @@ h2:where(.dark, .dark *) { max-width: 24rem; } -.max-w-\[46rem\] { - max-width: 46rem; -} - .max-w-\[48rem\] { max-width: 48rem; } @@ -1059,8 +1059,24 @@ h2:where(.dark, .dark *) { cursor: pointer; } -.list-inside { - list-style-position: inside; +.snap-y { + scroll-snap-type: y var(--tw-scroll-snap-strictness); +} + +.snap-mandatory { + --tw-scroll-snap-strictness: mandatory; +} + +.snap-start { + scroll-snap-align: start; +} + +.snap-end { + scroll-snap-align: end; +} + +.snap-always { + scroll-snap-stop: always; } .list-outside { @@ -1135,10 +1151,6 @@ h2:where(.dark, .dark *) { gap: 0.625rem; } -.gap-24 { - gap: 6rem; -} - .gap-3 { gap: 0.75rem; } @@ -1155,10 +1167,6 @@ h2:where(.dark, .dark *) { gap: 2rem; } -.gap-\[0\.16rem\] { - gap: 0.16rem; -} - .gap-y-4 { row-gap: 1rem; } @@ -1183,6 +1191,10 @@ h2:where(.dark, .dark *) { overflow: visible; } +.overflow-x-auto { + overflow-x: auto; +} + .overflow-y-scroll { overflow-y: scroll; } @@ -1232,7 +1244,12 @@ h2:where(.dark, .dark *) { .bg-black { --tw-bg-opacity: 1; - background-color: rgb(29 29 31 / var(--tw-bg-opacity)); + background-color: rgb(19 20 22 / var(--tw-bg-opacity)); +} + +.bg-blue-500 { + --tw-bg-opacity: 1; + background-color: rgb(59 130 246 / var(--tw-bg-opacity)); } .bg-gray-100 { @@ -1255,11 +1272,6 @@ h2:where(.dark, .dark *) { background-color: rgb(0 184 124 / var(--tw-bg-opacity)); } -.bg-orange-500 { - --tw-bg-opacity: 1; - background-color: rgb(249 115 22 / var(--tw-bg-opacity)); -} - .bg-red-500 { --tw-bg-opacity: 1; background-color: rgb(239 68 68 / var(--tw-bg-opacity)); @@ -1274,6 +1286,10 @@ h2:where(.dark, .dark *) { background-color: rgb(245 245 247 / var(--tw-bg-opacity)); } +.bg-opacity-20 { + --tw-bg-opacity: 0.2; +} + .bg-cover { background-size: cover; } @@ -1282,11 +1298,6 @@ h2:where(.dark, .dark *) { background-position: center; } -.object-contain { - -o-object-fit: contain; - object-fit: contain; -} - .p-2 { padding: 0.5rem; } @@ -1295,12 +1306,8 @@ h2:where(.dark, .dark *) { padding: 0.625rem; } -.p-4 { - padding: 1rem; -} - -.p-6 { - padding: 1.5rem; +.p-3 { + padding: 0.75rem; } .px-1 { @@ -1323,6 +1330,11 @@ h2:where(.dark, .dark *) { padding-right: 1rem; } +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} + .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; @@ -1333,11 +1345,6 @@ h2:where(.dark, .dark *) { padding-bottom: 0.25rem; } -.py-16 { - padding-top: 4rem; - padding-bottom: 4rem; -} - .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; @@ -1353,6 +1360,11 @@ h2:where(.dark, .dark *) { padding-bottom: 1rem; } +.py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; +} + .py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; @@ -1363,15 +1375,6 @@ h2:where(.dark, .dark *) { padding-bottom: 2rem; } -.py-5 { - padding-top: 1.25rem; - padding-bottom: 1.25rem; -} - -.pb-16 { - padding-bottom: 4rem; -} - .pb-20 { padding-bottom: 5rem; } @@ -1396,10 +1399,6 @@ h2:where(.dark, .dark *) { padding-top: 0.375rem; } -.pt-5 { - padding-top: 1.25rem; -} - .text-left { text-align: left; } @@ -1412,8 +1411,8 @@ h2:where(.dark, .dark *) { text-align: right; } -.-indent-4 { - text-indent: -1rem; +.align-top { + vertical-align: top; } .font-hero { @@ -1439,6 +1438,11 @@ h2:where(.dark, .dark *) { line-height: 2.5rem; } +.text-6xl { + font-size: 3.75rem; + line-height: 1; +} + .text-lg { font-size: 1.125rem; line-height: 1.75rem; @@ -1481,7 +1485,7 @@ h2:where(.dark, .dark *) { .text-black { --tw-text-opacity: 1; - color: rgb(29 29 31 / var(--tw-text-opacity)); + color: rgb(19 20 22 / var(--tw-text-opacity)); } .text-gray-300 { @@ -1513,24 +1517,22 @@ h2:where(.dark, .dark *) { color: rgb(214 214 216 / var(--tw-placeholder-opacity)); } -.placeholder-gray-300::-moz-placeholder { - --tw-placeholder-opacity: 1; - color: rgb(176 176 178 / var(--tw-placeholder-opacity)); -} - -.placeholder-gray-300::placeholder { - --tw-placeholder-opacity: 1; - color: rgb(176 176 178 / var(--tw-placeholder-opacity)); -} - .opacity-0 { opacity: 0; } +.opacity-100 { + opacity: 1; +} + .opacity-50 { opacity: 0.5; } +.opacity-70 { + opacity: 0.7; +} + .opacity-75 { opacity: 0.75; } @@ -1591,6 +1593,16 @@ h2:where(.dark, .dark *) { transition-duration: 150ms; } +.transition-transform { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.duration-1000 { + transition-duration: 1000ms; +} + @font-face { font-family: 'RoobertTRIAL'; @@ -1831,6 +1843,92 @@ h2:where(.dark, .dark *) { font-style: normal; } +.selection\:bg-black *::-moz-selection { + --tw-bg-opacity: 1; + background-color: rgb(19 20 22 / var(--tw-bg-opacity)); +} + +.selection\:bg-black *::selection { + --tw-bg-opacity: 1; + background-color: rgb(19 20 22 / var(--tw-bg-opacity)); +} + +.selection\:bg-white *::-moz-selection { + --tw-bg-opacity: 1; + background-color: rgb(245 245 247 / var(--tw-bg-opacity)); +} + +.selection\:bg-white *::selection { + --tw-bg-opacity: 1; + background-color: rgb(245 245 247 / var(--tw-bg-opacity)); +} + +.selection\:text-black *::-moz-selection { + --tw-text-opacity: 1; + color: rgb(19 20 22 / var(--tw-text-opacity)); +} + +.selection\:text-black *::selection { + --tw-text-opacity: 1; + color: rgb(19 20 22 / var(--tw-text-opacity)); +} + +.selection\:text-white *::-moz-selection { + --tw-text-opacity: 1; + color: rgb(245 245 247 / var(--tw-text-opacity)); +} + +.selection\:text-white *::selection { + --tw-text-opacity: 1; + color: rgb(245 245 247 / var(--tw-text-opacity)); +} + +.selection\:bg-black::-moz-selection { + --tw-bg-opacity: 1; + background-color: rgb(19 20 22 / var(--tw-bg-opacity)); +} + +.selection\:bg-black::selection { + --tw-bg-opacity: 1; + background-color: rgb(19 20 22 / var(--tw-bg-opacity)); +} + +.selection\:bg-white::-moz-selection { + --tw-bg-opacity: 1; + background-color: rgb(245 245 247 / var(--tw-bg-opacity)); +} + +.selection\:bg-white::selection { + --tw-bg-opacity: 1; + background-color: rgb(245 245 247 / var(--tw-bg-opacity)); +} + +.selection\:text-black::-moz-selection { + --tw-text-opacity: 1; + color: rgb(19 20 22 / var(--tw-text-opacity)); +} + +.selection\:text-black::selection { + --tw-text-opacity: 1; + color: rgb(19 20 22 / var(--tw-text-opacity)); +} + +.selection\:text-white::-moz-selection { + --tw-text-opacity: 1; + color: rgb(245 245 247 / var(--tw-text-opacity)); +} + +.selection\:text-white::selection { + --tw-text-opacity: 1; + color: rgb(245 245 247 / var(--tw-text-opacity)); +} + +.hover\:scale-105:hover { + --tw-scale-x: 1.05; + --tw-scale-y: 1.05; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .hover\:scale-110:hover { --tw-scale-x: 1.1; --tw-scale-y: 1.1; @@ -1841,9 +1939,14 @@ h2:where(.dark, .dark *) { cursor: pointer; } -.hover\:bg-gray-200:hover { +.hover\:bg-black:hover { --tw-bg-opacity: 1; - background-color: rgb(214 214 216 / var(--tw-bg-opacity)); + background-color: rgb(19 20 22 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(232 232 234 / var(--tw-bg-opacity)); } .hover\:bg-gray-900:hover { @@ -1856,19 +1959,33 @@ h2:where(.dark, .dark *) { background-color: rgb(0 184 124 / var(--tw-bg-opacity)); } -.hover\:bg-orange-600:hover { +.hover\:bg-red-500:hover { --tw-bg-opacity: 1; - background-color: rgb(234 88 12 / var(--tw-bg-opacity)); + background-color: rgb(239 68 68 / var(--tw-bg-opacity)); } -.hover\:bg-red-500:hover { +.hover\:bg-white:hover { --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); + background-color: rgb(245 245 247 / var(--tw-bg-opacity)); +} + +.hover\:bg-gray-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(214 214 216 / var(--tw-bg-opacity)); +} + +.hover\:bg-red-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(220 38 38 / var(--tw-bg-opacity)); +} + +.hover\:bg-opacity-20:hover { + --tw-bg-opacity: 0.2; } .hover\:text-black:hover { --tw-text-opacity: 1; - color: rgb(29 29 31 / var(--tw-text-opacity)); + color: rgb(19 20 22 / var(--tw-text-opacity)); } .hover\:text-green-500:hover { @@ -1901,9 +2018,9 @@ h2:where(.dark, .dark *) { box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } -.active\:bg-gray-300:active { +.active\:bg-gray-200:active { --tw-bg-opacity: 1; - background-color: rgb(176 176 178 / var(--tw-bg-opacity)); + background-color: rgb(214 214 216 / var(--tw-bg-opacity)); } .active\:bg-gray-800:active { @@ -1916,19 +2033,27 @@ h2:where(.dark, .dark *) { background-color: rgb(0 163 110 / var(--tw-bg-opacity)); } -.active\:bg-orange-700:active { +.active\:bg-red-600:active { --tw-bg-opacity: 1; - background-color: rgb(194 65 12 / var(--tw-bg-opacity)); + background-color: rgb(220 38 38 / var(--tw-bg-opacity)); } -.active\:bg-red-600:active { +.active\:bg-gray-300:active { --tw-bg-opacity: 1; - background-color: rgb(220 38 38 / var(--tw-bg-opacity)); + background-color: rgb(176 176 178 / var(--tw-bg-opacity)); } -.active\:bg-red-400:active { +.active\:bg-red-800:active { --tw-bg-opacity: 1; - background-color: rgb(248 113 113 / var(--tw-bg-opacity)); + background-color: rgb(153 27 27 / var(--tw-bg-opacity)); +} + +.active\:bg-opacity-30:active { + --tw-bg-opacity: 0.3; +} + +.active\:opacity-70:active { + opacity: 0.7; } .active\:enabled\:bg-green-700:enabled:active { @@ -1944,18 +2069,9 @@ h2:where(.dark, .dark *) { opacity: 0.5; } -@media (min-width: 480px) { - .min-\[480px\]\:text-5xl { - font-size: 3rem; - line-height: 1; - } -} - -@media (min-width: 600px) { - .min-\[600px\]\:text-6xl { - font-size: 3.75rem; - line-height: 1; - } +.group:hover .group-hover\:bg-green-500 { + --tw-bg-opacity: 1; + background-color: rgb(10 207 134 / var(--tw-bg-opacity)); } @media (min-width: 640px) { @@ -1968,10 +2084,23 @@ h2:where(.dark, .dark *) { margin-right: 0px; } + .sm\:mx-auto { + margin-left: auto; + margin-right: auto; + } + .sm\:ml-0 { margin-left: 0px; } + .sm\:block { + display: block; + } + + .sm\:h-10 { + height: 2.5rem; + } + .sm\:h-6 { height: 1.5rem; } @@ -1980,6 +2109,10 @@ h2:where(.dark, .dark *) { height: 2rem; } + .sm\:w-10 { + width: 2.5rem; + } + .sm\:w-6 { width: 1.5rem; } @@ -1988,6 +2121,15 @@ h2:where(.dark, .dark *) { width: 2rem; } + .sm\:w-full { + width: 100%; + } + + .sm\:w-min { + width: -moz-min-content; + width: min-content; + } + .sm\:flex-row { flex-direction: row; } @@ -1996,6 +2138,10 @@ h2:where(.dark, .dark *) { gap: 4rem; } + .sm\:gap-2 { + gap: 0.5rem; + } + .sm\:gap-4 { gap: 1rem; } @@ -2004,6 +2150,10 @@ h2:where(.dark, .dark *) { gap: 1.5rem; } + .sm\:gap-8 { + gap: 2rem; + } + .sm\:gap-y-10 { row-gap: 2.5rem; } @@ -2027,14 +2177,13 @@ h2:where(.dark, .dark *) { padding-right: 2rem; } - .sm\:py-10 { - padding-top: 2.5rem; - padding-bottom: 2.5rem; + .sm\:px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; } - .sm\:py-8 { - padding-top: 2rem; - padding-bottom: 2rem; + .sm\:text-center { + text-align: center; } .sm\:text-2xl { @@ -2052,6 +2201,11 @@ h2:where(.dark, .dark *) { line-height: 1.75rem; } + .sm\:text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; @@ -2064,10 +2218,19 @@ h2:where(.dark, .dark *) { margin-right: -0.5rem; } + .md\:mx-auto { + margin-left: auto; + margin-right: auto; + } + .md\:h-10 { height: 2.5rem; } + .md\:h-12 { + height: 3rem; + } + .md\:h-4 { height: 1rem; } @@ -2088,6 +2251,10 @@ h2:where(.dark, .dark *) { width: 2.5rem; } + .md\:w-12 { + width: 3rem; + } + .md\:w-5 { width: 1.25rem; } @@ -2096,6 +2263,10 @@ h2:where(.dark, .dark *) { width: 1.75rem; } + .md\:gap-12 { + gap: 3rem; + } + .md\:gap-2 { gap: 0.5rem; } @@ -2116,11 +2287,35 @@ h2:where(.dark, .dark *) { row-gap: 2rem; } + .md\:p-4 { + padding: 1rem; + } + .md\:px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } + .md\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .md\:py-10 { + padding-top: 2.5rem; + padding-bottom: 2.5rem; + } + + .md\:py-16 { + padding-top: 4rem; + padding-bottom: 4rem; + } + + .md\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } + .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; @@ -2146,6 +2341,11 @@ h2:where(.dark, .dark *) { line-height: 1; } + .md\:text-base { + font-size: 1rem; + line-height: 1.5rem; + } + .md\:text-sm { font-size: 0.875rem; line-height: 1.25rem; @@ -2166,10 +2366,6 @@ h2:where(.dark, .dark *) { width: 2rem; } - .lg\:gap-10 { - gap: 2.5rem; - } - .lg\:text-2xl { font-size: 1.5rem; line-height: 2rem; @@ -2199,11 +2395,16 @@ h2:where(.dark, .dark *) { font-size: 6rem; line-height: 1; } + + .lg\:text-lg { + font-size: 1.125rem; + line-height: 1.75rem; + } } .dark\:bg-black:where(.dark, .dark *) { --tw-bg-opacity: 1; - background-color: rgb(29 29 31 / var(--tw-bg-opacity)); + background-color: rgb(19 20 22 / var(--tw-bg-opacity)); } .dark\:bg-gray-700:where(.dark, .dark *) { @@ -2223,7 +2424,7 @@ h2:where(.dark, .dark *) { .dark\:text-black:where(.dark, .dark *) { --tw-text-opacity: 1; - color: rgb(29 29 31 / var(--tw-text-opacity)); + color: rgb(19 20 22 / var(--tw-text-opacity)); } .dark\:text-gray-700:where(.dark, .dark *) { @@ -2266,11 +2467,6 @@ h2:where(.dark, .dark *) { background-color: rgb(70 70 72 / var(--tw-bg-opacity)); } -.dark\:hover\:text-white:hover:where(.dark, .dark *) { - --tw-text-opacity: 1; - color: rgb(245 245 247 / var(--tw-text-opacity)); -} - .dark\:active\:bg-gray-700:active:where(.dark, .dark *) { --tw-bg-opacity: 1; background-color: rgb(112 112 113 / var(--tw-bg-opacity)); diff --git a/public/wallet.js b/public/wallet.js new file mode 100644 index 00000000..3aba4232 --- /dev/null +++ b/public/wallet.js @@ -0,0 +1,1955 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/@solana/buffer-layout/lib/Layout.js": +/*!**********************************************************!*\ + !*** ./node_modules/@solana/buffer-layout/lib/Layout.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; +eval("/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\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 deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * 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 OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\");\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map\n\n//# sourceURL=webpack://my-component/./node_modules/@solana/buffer-layout/lib/Layout.js?"); + +/***/ }), + +/***/ "./node_modules/@solana/wallet-standard-wallet-adapter-react/node_modules/base-x/src/index.js": +/*!****************************************************************************************************!*\ + !*** ./node_modules/@solana/wallet-standard-wallet-adapter-react/node_modules/base-x/src/index.js ***! + \****************************************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +eval("\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 = (__webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").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\n\n//# sourceURL=webpack://my-component/./node_modules/@solana/wallet-standard-wallet-adapter-react/node_modules/base-x/src/index.js?"); + +/***/ }), + +/***/ "./node_modules/@solana/wallet-standard-wallet-adapter-react/node_modules/bs58/index.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@solana/wallet-standard-wallet-adapter-react/node_modules/bs58/index.js ***! + \**********************************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("var basex = __webpack_require__(/*! base-x */ \"./node_modules/@solana/wallet-standard-wallet-adapter-react/node_modules/base-x/src/index.js\")\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n//# sourceURL=webpack://my-component/./node_modules/@solana/wallet-standard-wallet-adapter-react/node_modules/bs58/index.js?"); + +/***/ }), + +/***/ "./node_modules/@solana/web3.js/lib/index.browser.esm.js": +/*!***************************************************************!*\ + !*** ./node_modules/@solana/web3.js/lib/index.browser.esm.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Account: () => (/* binding */ Account),\n/* harmony export */ AddressLookupTableAccount: () => (/* binding */ AddressLookupTableAccount),\n/* harmony export */ AddressLookupTableInstruction: () => (/* binding */ AddressLookupTableInstruction),\n/* harmony export */ AddressLookupTableProgram: () => (/* binding */ AddressLookupTableProgram),\n/* harmony export */ Authorized: () => (/* binding */ Authorized),\n/* harmony export */ BLOCKHASH_CACHE_TIMEOUT_MS: () => (/* binding */ BLOCKHASH_CACHE_TIMEOUT_MS),\n/* harmony export */ BPF_LOADER_DEPRECATED_PROGRAM_ID: () => (/* binding */ BPF_LOADER_DEPRECATED_PROGRAM_ID),\n/* harmony export */ BPF_LOADER_PROGRAM_ID: () => (/* binding */ BPF_LOADER_PROGRAM_ID),\n/* harmony export */ BpfLoader: () => (/* binding */ BpfLoader),\n/* harmony export */ COMPUTE_BUDGET_INSTRUCTION_LAYOUTS: () => (/* binding */ COMPUTE_BUDGET_INSTRUCTION_LAYOUTS),\n/* harmony export */ ComputeBudgetInstruction: () => (/* binding */ ComputeBudgetInstruction),\n/* harmony export */ ComputeBudgetProgram: () => (/* binding */ ComputeBudgetProgram),\n/* harmony export */ Connection: () => (/* binding */ Connection),\n/* harmony export */ Ed25519Program: () => (/* binding */ Ed25519Program),\n/* harmony export */ Enum: () => (/* binding */ Enum),\n/* harmony export */ EpochSchedule: () => (/* binding */ EpochSchedule),\n/* harmony export */ FeeCalculatorLayout: () => (/* binding */ FeeCalculatorLayout),\n/* harmony export */ Keypair: () => (/* binding */ Keypair),\n/* harmony export */ LAMPORTS_PER_SOL: () => (/* binding */ LAMPORTS_PER_SOL),\n/* harmony export */ LOOKUP_TABLE_INSTRUCTION_LAYOUTS: () => (/* binding */ LOOKUP_TABLE_INSTRUCTION_LAYOUTS),\n/* harmony export */ Loader: () => (/* binding */ Loader),\n/* harmony export */ Lockup: () => (/* binding */ Lockup),\n/* harmony export */ MAX_SEED_LENGTH: () => (/* binding */ MAX_SEED_LENGTH),\n/* harmony export */ Message: () => (/* binding */ Message),\n/* harmony export */ MessageAccountKeys: () => (/* binding */ MessageAccountKeys),\n/* harmony export */ MessageV0: () => (/* binding */ MessageV0),\n/* harmony export */ NONCE_ACCOUNT_LENGTH: () => (/* binding */ NONCE_ACCOUNT_LENGTH),\n/* harmony export */ NonceAccount: () => (/* binding */ NonceAccount),\n/* harmony export */ PACKET_DATA_SIZE: () => (/* binding */ PACKET_DATA_SIZE),\n/* harmony export */ PUBLIC_KEY_LENGTH: () => (/* binding */ PUBLIC_KEY_LENGTH),\n/* harmony export */ PublicKey: () => (/* binding */ PublicKey),\n/* harmony export */ SIGNATURE_LENGTH_IN_BYTES: () => (/* binding */ SIGNATURE_LENGTH_IN_BYTES),\n/* harmony export */ SOLANA_SCHEMA: () => (/* binding */ SOLANA_SCHEMA),\n/* harmony export */ STAKE_CONFIG_ID: () => (/* binding */ STAKE_CONFIG_ID),\n/* harmony export */ STAKE_INSTRUCTION_LAYOUTS: () => (/* binding */ STAKE_INSTRUCTION_LAYOUTS),\n/* harmony export */ SYSTEM_INSTRUCTION_LAYOUTS: () => (/* binding */ SYSTEM_INSTRUCTION_LAYOUTS),\n/* harmony export */ SYSVAR_CLOCK_PUBKEY: () => (/* binding */ SYSVAR_CLOCK_PUBKEY),\n/* harmony export */ SYSVAR_EPOCH_SCHEDULE_PUBKEY: () => (/* binding */ SYSVAR_EPOCH_SCHEDULE_PUBKEY),\n/* harmony export */ SYSVAR_INSTRUCTIONS_PUBKEY: () => (/* binding */ SYSVAR_INSTRUCTIONS_PUBKEY),\n/* harmony export */ SYSVAR_RECENT_BLOCKHASHES_PUBKEY: () => (/* binding */ SYSVAR_RECENT_BLOCKHASHES_PUBKEY),\n/* harmony export */ SYSVAR_RENT_PUBKEY: () => (/* binding */ SYSVAR_RENT_PUBKEY),\n/* harmony export */ SYSVAR_REWARDS_PUBKEY: () => (/* binding */ SYSVAR_REWARDS_PUBKEY),\n/* harmony export */ SYSVAR_SLOT_HASHES_PUBKEY: () => (/* binding */ SYSVAR_SLOT_HASHES_PUBKEY),\n/* harmony export */ SYSVAR_SLOT_HISTORY_PUBKEY: () => (/* binding */ SYSVAR_SLOT_HISTORY_PUBKEY),\n/* harmony export */ SYSVAR_STAKE_HISTORY_PUBKEY: () => (/* binding */ SYSVAR_STAKE_HISTORY_PUBKEY),\n/* harmony export */ Secp256k1Program: () => (/* binding */ Secp256k1Program),\n/* harmony export */ SendTransactionError: () => (/* binding */ SendTransactionError),\n/* harmony export */ SolanaJSONRPCError: () => (/* binding */ SolanaJSONRPCError),\n/* harmony export */ SolanaJSONRPCErrorCode: () => (/* binding */ SolanaJSONRPCErrorCode),\n/* harmony export */ StakeAuthorizationLayout: () => (/* binding */ StakeAuthorizationLayout),\n/* harmony export */ StakeInstruction: () => (/* binding */ StakeInstruction),\n/* harmony export */ StakeProgram: () => (/* binding */ StakeProgram),\n/* harmony export */ Struct: () => (/* binding */ Struct),\n/* harmony export */ SystemInstruction: () => (/* binding */ SystemInstruction),\n/* harmony export */ SystemProgram: () => (/* binding */ SystemProgram),\n/* harmony export */ Transaction: () => (/* binding */ Transaction),\n/* harmony export */ TransactionExpiredBlockheightExceededError: () => (/* binding */ TransactionExpiredBlockheightExceededError),\n/* harmony export */ TransactionExpiredNonceInvalidError: () => (/* binding */ TransactionExpiredNonceInvalidError),\n/* harmony export */ TransactionExpiredTimeoutError: () => (/* binding */ TransactionExpiredTimeoutError),\n/* harmony export */ TransactionInstruction: () => (/* binding */ TransactionInstruction),\n/* harmony export */ TransactionMessage: () => (/* binding */ TransactionMessage),\n/* harmony export */ TransactionStatus: () => (/* binding */ TransactionStatus),\n/* harmony export */ VALIDATOR_INFO_KEY: () => (/* binding */ VALIDATOR_INFO_KEY),\n/* harmony export */ VERSION_PREFIX_MASK: () => (/* binding */ VERSION_PREFIX_MASK),\n/* harmony export */ VOTE_PROGRAM_ID: () => (/* binding */ VOTE_PROGRAM_ID),\n/* harmony export */ ValidatorInfo: () => (/* binding */ ValidatorInfo),\n/* harmony export */ VersionedMessage: () => (/* binding */ VersionedMessage),\n/* harmony export */ VersionedTransaction: () => (/* binding */ VersionedTransaction),\n/* harmony export */ VoteAccount: () => (/* binding */ VoteAccount),\n/* harmony export */ VoteAuthorizationLayout: () => (/* binding */ VoteAuthorizationLayout),\n/* harmony export */ VoteInit: () => (/* binding */ VoteInit),\n/* harmony export */ VoteInstruction: () => (/* binding */ VoteInstruction),\n/* harmony export */ VoteProgram: () => (/* binding */ VoteProgram),\n/* harmony export */ clusterApiUrl: () => (/* binding */ clusterApiUrl),\n/* harmony export */ sendAndConfirmRawTransaction: () => (/* binding */ sendAndConfirmRawTransaction),\n/* harmony export */ sendAndConfirmTransaction: () => (/* binding */ sendAndConfirmTransaction)\n/* harmony export */ });\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\");\n/* harmony import */ var _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @noble/curves/ed25519 */ \"./node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.js\");\n/* harmony import */ var bn_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bn.js */ \"./node_modules/bn.js/lib/bn.js\");\n/* harmony import */ var bn_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(bn_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var bs58__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! bs58 */ \"./node_modules/@solana/web3.js/node_modules/bs58/index.js\");\n/* harmony import */ var bs58__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(bs58__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @noble/hashes/sha256 */ \"./node_modules/@noble/hashes/esm/sha256.js\");\n/* harmony import */ var borsh__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! borsh */ \"./node_modules/borsh/lib/index.js\");\n/* harmony import */ var borsh__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(borsh__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @solana/buffer-layout */ \"./node_modules/@solana/buffer-layout/lib/Layout.js\");\n/* harmony import */ var bigint_buffer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! bigint-buffer */ \"./node_modules/bigint-buffer/dist/browser.js\");\n/* harmony import */ var superstruct__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! superstruct */ \"./node_modules/superstruct/dist/index.mjs\");\n/* harmony import */ var jayson_lib_client_browser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jayson/lib/client/browser */ \"./node_modules/jayson/lib/client/browser/index.js\");\n/* harmony import */ var jayson_lib_client_browser__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jayson_lib_client_browser__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var rpc_websockets__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rpc-websockets */ \"./node_modules/rpc-websockets/dist/index.browser.mjs\");\n/* harmony import */ var _noble_hashes_sha3__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @noble/hashes/sha3 */ \"./node_modules/@noble/hashes/esm/sha3.js\");\n/* harmony import */ var _noble_curves_secp256k1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @noble/curves/secp256k1 */ \"./node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n\n/**\n * Ed25519 Keypair\n */\n\nconst generatePrivateKey = _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_8__.ed25519.utils.randomPrivateKey;\nconst generateKeypair = () => {\n const privateScalar = _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_8__.ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey\n };\n};\nconst getPublicKey = _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_8__.ed25519.getPublicKey;\nfunction isOnCurve(publicKey) {\n try {\n _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_8__.ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nconst sign = (message, secretKey) => _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_8__.ed25519.sign(message, secretKey.slice(0, 32));\nconst verify = _noble_curves_ed25519__WEBPACK_IMPORTED_MODULE_8__.ed25519.verify;\n\nconst toBuffer = arr => {\n if (buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(arr);\n }\n};\n\n// Class wrapping a plain object\nclass Struct {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from((0,borsh__WEBPACK_IMPORTED_MODULE_3__.serialize)(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return (0,borsh__WEBPACK_IMPORTED_MODULE_3__.deserialize)(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return (0,borsh__WEBPACK_IMPORTED_MODULE_3__.deserializeUnchecked)(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nclass Enum extends Struct {\n constructor(properties) {\n super(properties);\n this.enum = '';\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\nconst SOLANA_SCHEMA = new Map();\n\nvar _PublicKey;\n\n/**\n * Maximum length of derived pubkey seed\n */\nconst MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nconst PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\n\n/**\n * JSON object representation of PublicKey class\n */\n\nfunction isPublicKeyData(value) {\n return value._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nclass PublicKey extends Struct {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n /** @internal */\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new (bn_js__WEBPACK_IMPORTED_MODULE_1___default())(decoded);\n } else {\n this._bn = new (bn_js__WEBPACK_IMPORTED_MODULE_1___default())(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey) {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return bs58__WEBPACK_IMPORTED_MODULE_2___default().encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b = this._bn.toArrayLike(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n const zeroPad = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey, seed, programId) {\n const buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([fromPublicKey.toBuffer(), buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(seed), programId.toBuffer()]);\n const publicKeyBytes = (0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_9__.sha256)(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([buffer, programId.toBuffer(), buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from('ProgramDerivedAddress')]);\n const publicKeyBytes = (0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_9__.sha256)(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n_PublicKey = PublicKey;\nPublicKey.default = new _PublicKey('11111111111111111111111111111111');\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']]\n});\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nclass Account {\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey) {\n /** @internal */\n this._publicKey = void 0;\n /** @internal */\n this._secretKey = void 0;\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey() {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey() {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n\nconst BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey('BPFLoader1111111111111111111111111111111111');\n\n/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nconst PACKET_DATA_SIZE = 1280 - 40 - 8;\nconst VERSION_PREFIX_MASK = 0x7f;\nconst SIGNATURE_LENGTH_IN_BYTES = 64;\n\nclass TransactionExpiredBlockheightExceededError extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredBlockheightExceededError.prototype, 'name', {\n value: 'TransactionExpiredBlockheightExceededError'\n});\nclass TransactionExpiredTimeoutError extends Error {\n constructor(signature, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is ` + 'unknown if it succeeded or failed. Check signature ' + `${signature} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError'\n});\nclass TransactionExpiredNonceInvalidError extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError'\n});\n\nclass MessageAccountKeys {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n const keyIndexMap = new Map();\n this.keySegments().flat().forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n const findKeyIndex = key => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined) throw new Error('Encountered an unknown instruction account key during compilation');\n return keyIndex;\n };\n return instructions.map(instruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n}\n\n/**\n * Layout for a public key\n */\nconst publicKey = (property = 'publicKey') => {\n return _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nconst signature = (property = 'signature') => {\n return _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(64, property);\n};\n/**\n * Layout for a Rust String type\n */\nconst rustString = (property = 'string') => {\n const rsl = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('length'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('lengthPadding'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.offset(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32(), -8), 'chars')], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b, offset) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n rslShim.encode = (str, b, offset) => {\n const data = {\n chars: buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(str, 'utf8')\n };\n return _encode(data, b, offset);\n };\n rslShim.alloc = str => {\n return _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32().span + _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32().span + buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(str, 'utf8').length;\n };\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nconst authorized = (property = 'authorized') => {\n return _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nconst lockup = (property = 'lockup') => {\n return _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('unixTimestamp'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('epoch'), publicKey('custodian')], property);\n};\n\n/**\n * Layout for a VoteInit object\n */\nconst voteInit = (property = 'voteInit') => {\n return _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([publicKey('nodePubkey'), publicKey('authorizedVoter'), publicKey('authorizedWithdrawer'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('commission')], property);\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nconst voteAuthorizeWithSeedArgs = (property = 'voteAuthorizeWithSeedArgs') => {\n return _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('voteAuthorizationType'), publicKey('currentAuthorityDerivedKeyOwnerPubkey'), rustString('currentAuthorityDerivedKeySeed'), publicKey('newAuthorized')], property);\n};\nfunction getAlloc(type, fields) {\n const getItemAlloc = item => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n let alloc = 0;\n type.layout.fields.forEach(item => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n}\n\nfunction decodeLength(bytes) {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift();\n len |= (elem & 0x7f) << size * 7;\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\nfunction encodeLength(bytes, len) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n\nfunction assert (condition, message) {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n\nclass CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = new Map();\n const getOrInsertDefault = pubkey => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n\n // sanity checks\n {\n assert(writableSigners.length > 0, 'Expected at least one writable signer key');\n const [payerAddress] = writableSigners[0];\n assert(payerAddress === this.payer.toBase58(), 'Expected first writable signer key to be the fee payer');\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, keyMeta => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, keyMeta => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry => entry.equals(key));\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n}\n\nconst END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nfunction guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nfunction guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n}\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\n\n/**\n * Message constructor arguments\n */\n\n/**\n * List of instructions to be processed atomically\n */\nclass Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return 'legacy';\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(ix => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58__WEBPACK_IMPORTED_MODULE_2___default().encode(ix.data)\n }));\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n isProgramId(index) {\n return this.indexToProgramIds.has(index);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map(instruction => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(PACKET_DATA_SIZE);\n buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach(instruction => {\n const instructionLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('programIdIndex'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(instruction.keyIndicesCount.length, 'keyIndicesCount'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('keyIndex'), instruction.keyIndices.length, 'keyIndices'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(instruction.dataLength.length, 'dataLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('userdatum'), instruction.data.length, 'data')]);\n const length = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(1, 'numRequiredSignatures'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(1, 'numReadonlySignedAccounts'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(1, 'numReadonlyUnsignedAccounts'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(keyCount.length, 'keyCount'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(publicKey('key'), numKeys, 'keys'), publicKey('recentBlockhash')]);\n const transaction = {\n numRequiredSignatures: buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(this.recentBlockhash)\n };\n let signData = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer) {\n // Slice up wire data\n let byteArray = [...buffer];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()');\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58__WEBPACK_IMPORTED_MODULE_2___default().encode(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: bs58__WEBPACK_IMPORTED_MODULE_2___default().encode(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new Message(messageArgs);\n }\n}\n\n/**\n * Message constructor arguments\n */\n\nclass MessageV0 {\n constructor(args) {\n this.header = void 0;\n this.staticAccountKeys = void 0;\n this.recentBlockhash = void 0;\n this.compiledInstructions = void 0;\n this.addressTableLookups = void 0;\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n get version() {\n return 0;\n }\n get numAccountKeysFromLookups() {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n getAccountKeys(args) {\n let accountKeysFromLookups;\n if (args && 'accountKeysFromLookups' in args && args.accountKeysFromLookups) {\n if (this.numAccountKeysFromLookups != args.accountKeysFromLookups.writable.length + args.accountKeysFromLookups.readonly.length) {\n throw new Error('Failed to get account keys because of a mismatch in the number of account keys from lookups');\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (args && 'addressLookupTableAccounts' in args && args.addressLookupTableAccounts) {\n accountKeysFromLookups = this.resolveAddressTableLookups(args.addressLookupTableAccounts);\n } else if (this.addressTableLookups.length > 0) {\n throw new Error('Failed to get account keys because address table lookups were not resolved');\n }\n return new MessageAccountKeys(this.staticAccountKeys, accountKeysFromLookups);\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce((count, lookup) => count + lookup.writableIndexes.length, 0);\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n resolveAddressTableLookups(addressLookupTableAccounts) {\n const accountKeysFromLookups = {\n writable: [],\n readonly: []\n };\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account => account.key.equals(tableLookup.accountKey));\n if (!tableAccount) {\n throw new Error(`Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`);\n }\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(tableAccount.state.addresses[index]);\n } else {\n throw new Error(`Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(tableAccount.state.addresses[index]);\n } else {\n throw new Error(`Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n }\n return accountKeysFromLookups;\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const addressTableLookups = new Array();\n const accountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array()\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {\n writable,\n readonly\n }] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys, accountKeysFromLookups);\n const compiledInstructions = accountKeys.compileInstructions(args.instructions);\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n serialize() {\n const encodedStaticAccountKeysLength = Array();\n encodeLength(encodedStaticAccountKeysLength, this.staticAccountKeys.length);\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n encodeLength(encodedInstructionsLength, this.compiledInstructions.length);\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n encodeLength(encodedAddressTableLookupsLength, this.addressTableLookups.length);\n const messageLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('prefix'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('numRequiredSignatures'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('numReadonlySignedAccounts'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('numReadonlyUnsignedAccounts')], 'header'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(encodedStaticAccountKeysLength.length, 'staticAccountKeysLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(publicKey(), this.staticAccountKeys.length, 'staticAccountKeys'), publicKey('recentBlockhash'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(encodedInstructionsLength.length, 'instructionsLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(serializedInstructions.length, 'serializedInstructions'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(encodedAddressTableLookupsLength.length, 'addressTableLookupsLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(serializedAddressTableLookups.length, 'serializedAddressTableLookups')]);\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode({\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(encodedAddressTableLookupsLength),\n serializedAddressTableLookups\n }, serializedMessage);\n return serializedMessage.slice(0, serializedMessageLength);\n }\n serializeInstructions() {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n encodeLength(encodedAccountKeyIndexesLength, instruction.accountKeyIndexes.length);\n const encodedDataLength = Array();\n encodeLength(encodedDataLength, instruction.data.length);\n const instructionLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('programIdIndex'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(encodedAccountKeyIndexesLength.length, 'encodedAccountKeyIndexesLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8(), instruction.accountKeyIndexes.length, 'accountKeyIndexes'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(encodedDataLength.length, 'encodedDataLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(instruction.data.length, 'data')]);\n serializedLength += instructionLayout.encode({\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(encodedAccountKeyIndexesLength),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data\n }, serializedInstructions, serializedLength);\n }\n return serializedInstructions.slice(0, serializedLength);\n }\n serializeAddressTableLookups() {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n encodeLength(encodedWritableIndexesLength, lookup.writableIndexes.length);\n const encodedReadonlyIndexesLength = Array();\n encodeLength(encodedReadonlyIndexesLength, lookup.readonlyIndexes.length);\n const addressTableLookupLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([publicKey('accountKey'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(encodedWritableIndexesLength.length, 'encodedWritableIndexesLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8(), lookup.writableIndexes.length, 'writableIndexes'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(encodedReadonlyIndexesLength.length, 'encodedReadonlyIndexesLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8(), lookup.readonlyIndexes.length, 'readonlyIndexes')]);\n serializedLength += addressTableLookupLayout.encode({\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(encodedWritableIndexesLength),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(encodedReadonlyIndexesLength),\n readonlyIndexes: lookup.readonlyIndexes\n }, serializedAddressTableLookups, serializedLength);\n }\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n static deserialize(serializedMessage) {\n let byteArray = [...serializedMessage];\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(prefix !== maskedPrefix, `Expected versioned message but received legacy message`);\n const version = maskedPrefix;\n assert(version === 0, `Expected versioned message with version 0 but found version ${version}`);\n const header = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray)\n };\n const staticAccountKeys = [];\n const staticAccountKeysLength = decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)));\n }\n const recentBlockhash = bs58__WEBPACK_IMPORTED_MODULE_2___default().encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const instructionCount = decodeLength(byteArray);\n const compiledInstructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength);\n const dataLength = decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data\n });\n }\n const addressTableLookupsCount = decodeLength(byteArray);\n const addressTableLookups = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = decodeLength(byteArray);\n const writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength);\n const readonlyIndexesLength = decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes\n });\n }\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n}\n\n// eslint-disable-next-line no-redeclare\nconst VersionedMessage = {\n deserializeMessageVersion(serializedMessage) {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n deserialize: serializedMessage => {\n const version = VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(`Transaction message version ${version} deserialization is not supported`);\n }\n }\n};\n\n/** @internal */\n\n/**\n * Transaction signature as base-58 encoded string\n */\n\nlet TransactionStatus = /*#__PURE__*/function (TransactionStatus) {\n TransactionStatus[TransactionStatus[\"BLOCKHEIGHT_EXCEEDED\"] = 0] = \"BLOCKHEIGHT_EXCEEDED\";\n TransactionStatus[TransactionStatus[\"PROCESSED\"] = 1] = \"PROCESSED\";\n TransactionStatus[TransactionStatus[\"TIMED_OUT\"] = 2] = \"TIMED_OUT\";\n TransactionStatus[TransactionStatus[\"NONCE_INVALID\"] = 3] = \"NONCE_INVALID\";\n return TransactionStatus;\n}({});\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\n\n/**\n * Configuration object for Transaction.serialize()\n */\n\n/**\n * @internal\n */\n\n/**\n * Transaction Instruction class\n */\nclass TransactionInstruction {\n constructor(opts) {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n this.keys = void 0;\n /**\n * Program Id to execute\n */\n this.programId = void 0;\n /**\n * Program input\n */\n this.data = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\n\n/**\n * @internal\n */\n\n/**\n * Transaction class\n */\nclass Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n\n // Construct a transaction using a durable nonce\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n this.signatures = [];\n this.feePayer = void 0;\n /**\n * The instructions to atomically execute\n */\n this.instructions = [];\n /**\n * A recent transaction id. Must be populated by the caller\n */\n this.recentBlockhash = void 0;\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n this.lastValidBlockHeight = void 0;\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n this.nonceInfo = void 0;\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n this.minNonceContextSlot = void 0;\n /**\n * @internal\n */\n this._message = void 0;\n /**\n * @internal\n */\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey\n }) => {\n return publicKey.toJSON();\n })\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n items.forEach(item => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(`Transaction instruction index ${i} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower'\n };\n return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn('Transaction references a signature that is unnecessary, ' + 'only the fee payer and instruction signer accounts should sign a transaction. ' + 'This behavior is deprecated and will throw an error in the next major version release.');\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map(instruction => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta => accountKeys.indexOf(meta.pubkey.toString())),\n data: bs58__WEBPACK_IMPORTED_MODULE_2___default().encode(data)\n };\n });\n compiledInstructions.forEach(instruction => {\n assert(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => assert(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n\n /**\n * @internal\n */\n _compile() {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n if (valid) return message;\n }\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey\n }));\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n const seen = new Set();\n this.signatures = signers.filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map(publicKey => ({\n signature: null,\n publicKey\n }));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message, ...signers) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey, signature) {\n assert(signature.length === 64);\n const index = this.signatures.findIndex(sigpair => pubkey.equals(sigpair.publicKey));\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index].signature = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n\n /**\n * @internal\n */\n _getMessageSignednessErrors(message, requireAllSignatures) {\n const errors = {};\n for (const {\n signature,\n publicKey\n } of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey);\n }\n } else {\n if (!verify(signature, message, publicKey.toBytes())) {\n (errors.invalid ||= []).push(publicKey);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : undefined;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = 'Signature verification failed.';\n if (sigErrors.invalid) {\n errorMessage += `\\nInvalid signature for public key${sigErrors.invalid.length === 1 ? '' : '(s)'} [\\`${sigErrors.invalid.map(p => p.toBase58()).join('`, `')}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\\nMissing signature for public key${sigErrors.missing.length === 1 ? '' : '(s)'} [\\`${sigErrors.missing.map(p => p.toBase58()).join('`, `')}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(transactionLength);\n assert(signatures.length < 256);\n buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature\n }, index) => {\n if (signature !== null) {\n assert(signature.length === 64, `signature has invalid length`);\n buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(signature).copy(wireTransaction, signatureCount.length + index * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n assert(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n assert(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n assert(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n assert(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer) {\n // Slice up wire data\n let byteArray = [...buffer];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58__WEBPACK_IMPORTED_MODULE_2___default().encode(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(signature)));\n }\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message, signatures = []) {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature: signature == bs58__WEBPACK_IMPORTED_MODULE_2___default().encode(DEFAULT_SIGNATURE) ? null : bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(signature),\n publicKey: message.accountKeys[index]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some(keyObj => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(instruction.data)\n }));\n });\n transaction._message = message;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n}\n\nclass TransactionMessage {\n constructor(args) {\n this.payerKey = void 0;\n this.instructions = void 0;\n this.recentBlockhash = void 0;\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n static decompile(message, args) {\n const {\n header,\n compiledInstructions,\n recentBlockhash\n } = message;\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n } = header;\n const numWritableSignedAccounts = numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n const numWritableUnsignedAccounts = message.staticAccountKeys.length - numRequiredSignatures - numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error('Failed to decompile message because no account keys were found');\n }\n const instructions = [];\n for (const compiledIx of compiledInstructions) {\n const keys = [];\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(`Failed to find key for account key index ${keyIndex}`);\n }\n const isSigner = keyIndex < numRequiredSignatures;\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable = keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable = keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups.writable.length;\n }\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable\n });\n }\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(`Failed to find program id for program id index ${compiledIx.programIdIndex}`);\n }\n instructions.push(new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys\n }));\n }\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash\n });\n }\n compileToLegacyMessage() {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions\n });\n }\n compileToV0Message(addressLookupTableAccounts) {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts\n });\n }\n}\n\n/**\n * Versioned transaction class\n */\nclass VersionedTransaction {\n get version() {\n return this.message.version;\n }\n constructor(message, signatures) {\n this.signatures = void 0;\n this.message = void 0;\n if (signatures !== undefined) {\n assert(signatures.length === message.header.numRequiredSignatures, 'Expected signatures length to be equal to the number of required signatures');\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n serialize() {\n const serializedMessage = this.message.serialize();\n const encodedSignaturesLength = Array();\n encodeLength(encodedSignaturesLength, this.signatures.length);\n const transactionLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(encodedSignaturesLength.length, 'encodedSignaturesLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(signature(), this.signatures.length, 'signatures'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(serializedMessage.length, 'serializedMessage')]);\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode({\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage\n }, serializedTransaction);\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n static deserialize(serializedTransaction) {\n let byteArray = [...serializedTransaction];\n const signatures = [];\n const signaturesLength = decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)));\n }\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n sign(signers) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey => pubkey.equals(signer.publicKey));\n assert(signerIndex >= 0, `Cannot sign with non signer key ${signer.publicKey.toBase58()}`);\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n addSignature(publicKey, signature) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n const signerIndex = signerPubkeys.findIndex(pubkey => pubkey.equals(publicKey));\n assert(signerIndex >= 0, `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`);\n this.signatures[signerIndex] = signature;\n }\n}\n\n// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nconst NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nconst DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nconst NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nconst MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n\nconst SYSVAR_CLOCK_PUBKEY = new PublicKey('SysvarC1ock11111111111111111111111111111111');\nconst SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey('SysvarEpochSchedu1e111111111111111111111111');\nconst SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey('Sysvar1nstructions1111111111111111111111111');\nconst SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey('SysvarRecentB1ockHashes11111111111111111111');\nconst SYSVAR_RENT_PUBKEY = new PublicKey('SysvarRent111111111111111111111111111111111');\nconst SYSVAR_REWARDS_PUBKEY = new PublicKey('SysvarRewards111111111111111111111111111111');\nconst SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey('SysvarS1otHashes111111111111111111111111111');\nconst SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey('SysvarS1otHistory11111111111111111111111111');\nconst SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey('SysvarStakeHistory1111111111111111111111111');\n\nclass SendTransactionError extends Error {\n constructor({\n action,\n signature,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \\n${JSON.stringify(logs.slice(-10), null, 2)}. ` : '';\n const guideText = '\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.';\n let message;\n switch (action) {\n case 'send':\n message = `Transaction ${signature} resulted in an error. \\n` + `${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case 'simulate':\n message = `Simulation failed. \\nMessage: ${transactionMessage}. \\n` + maybeLogsOutput + guideText;\n break;\n default:\n {\n message = `Unknown action '${(a => a)(action)}'`;\n }\n }\n super(message);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : undefined;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : undefined\n };\n }\n\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === 'object' && 'then' in cachedLogs) {\n return undefined;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then(tx => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error('Log messages not found'));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016\n};\nclass SolanaJSONRPCError extends Error {\n constructor({\n code,\n message,\n data\n }, customMessage) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = void 0;\n this.data = void 0;\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nasync function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn('sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' + 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' + 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.');\n }\n status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: 'send',\n signature: signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\n\n// zzz\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\n/**\n * @internal\n */\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nfunction encodeData(type, fields) {\n const allocLength = type.layout.span >= 0 ? type.layout.span : getAlloc(type, fields);\n const data = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type.index\n }, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nfunction decodeData$1(type, buffer) {\n let data;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n if (data.instruction !== type.index) {\n throw new Error(`invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`);\n }\n return data;\n}\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nconst FeeCalculatorLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('version'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('state'), publicKey('authorizedPubkey'), publicKey('nonce'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([FeeCalculatorLayout], 'feeCalculator')]);\nconst NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\n\n/**\n * NonceAccount class\n */\nclass NonceAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.authorizedPubkey = void 0;\n this.nonce = void 0;\n this.feeCalculator = void 0;\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(buffer) {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator\n });\n }\n}\n\nconst encodeDecode = layout => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {\n decode,\n encode\n };\n};\nconst bigInt = length => property => {\n const layout = (0,_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob)(length, property);\n const {\n encode,\n decode\n } = encodeDecode(layout);\n const bigIntLayout = layout;\n bigIntLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return (0,bigint_buffer__WEBPACK_IMPORTED_MODULE_5__.toBigIntLE)(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(src));\n };\n bigIntLayout.encode = (bigInt, buffer, offset) => {\n const src = (0,bigint_buffer__WEBPACK_IMPORTED_MODULE_5__.toBufferLE)(bigInt, length);\n return encode(src, buffer, offset);\n };\n return bigIntLayout;\n};\nconst u64 = bigInt(8);\n\n/**\n * Create account system transaction params\n */\n\n/**\n * Transfer system transaction params\n */\n\n/**\n * Assign system transaction params\n */\n\n/**\n * Create account with seed system transaction params\n */\n\n/**\n * Create nonce account system transaction params\n */\n\n/**\n * Create nonce account with seed system transaction params\n */\n\n/**\n * Initialize nonce account system instruction params\n */\n\n/**\n * Advance nonce account system instruction params\n */\n\n/**\n * Withdraw nonce account system transaction params\n */\n\n/**\n * Authorize nonce account system transaction params\n */\n\n/**\n * Allocate account system transaction params\n */\n\n/**\n * Allocate account with seed system transaction params\n */\n\n/**\n * Assign account with seed system transaction params\n */\n\n/**\n * Transfer with seed system transaction params\n */\n\n/** Decoded transfer system transaction instruction */\n\n/** Decoded transferWithSeed system transaction instruction */\n\n/**\n * System Instruction class\n */\nclass SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Create, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Transfer, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n space\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Allocate, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base,\n seed,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Assign, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n base,\n seed,\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n authorized\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized)\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized)\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nconst SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('lamports'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('space'), publicKey('programId')])\n },\n Assign: {\n index: 1,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('programId')])\n },\n Transfer: {\n index: 2,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), u64('lamports')])\n },\n CreateWithSeed: {\n index: 3,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('base'), rustString('seed'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('lamports'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('space'), publicKey('programId')])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('lamports')])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('authorized')])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('authorized')])\n },\n Allocate: {\n index: 8,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('space')])\n },\n AllocateWithSeed: {\n index: 9,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('base'), rustString('seed'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('space'), publicKey('programId')])\n },\n AssignWithSeed: {\n index: 10,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('base'), rustString('seed'), publicKey('programId')])\n },\n TransferWithSeed: {\n index: 11,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), u64('lamports'), rustString('seed'), publicKey('programId')])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n }\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nclass SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (!params.basePubkey.equals(params.fromPubkey)) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n}\nSystemProgram.programId = new PublicKey('11111111111111111111111111111111');\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nclass Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * (\n // Every transaction requires two signatures (payer + program)\n Math.ceil(dataLength / Loader.chunkSize) + 1 +\n // Add one for Create transaction\n 1) // Add one for Finalize transaction\n ;\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(program.publicKey, 'confirmed');\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed'\n });\n }\n }\n const dataLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('offset'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('bytesLength'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('bytesLengthPadding'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('byte'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.offset(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32(), -8), 'bytes')]);\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset,\n bytes: bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed'\n }));\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')]);\n const data = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 1 // Finalize instruction\n }, data);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n\n // success\n return true;\n }\n}\nLoader.chunkSize = CHUNK_SIZE;\n\n/**\n * @deprecated Deprecated since Solana v1.17.20.\n */\nconst BPF_LOADER_PROGRAM_ID = new PublicKey('BPFLoader2111111111111111111111111111111111');\n\n/**\n * Factory class for transactions to interact with a program loader\n *\n * @deprecated Deprecated since Solana v1.17.20.\n */\nclass BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(connection, payer, program, elf, loaderProgramId) {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nvar fastStableStringify = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n\nvar fastStableStringify$1 = /*@__PURE__*/getDefaultExportFromCjs(fastStableStringify);\n\nconst MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n) {\n if (n === 0) return 1;\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 >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nclass EpochSchedule {\n constructor(slotsPerEpoch, leaderScheduleSlotOffset, warmup, firstNormalEpoch, firstNormalSlot) {\n /** The maximum number of slots in each epoch */\n this.slotsPerEpoch = void 0;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n this.leaderScheduleSlotOffset = void 0;\n /** Indicates whether epochs start short and grow */\n this.warmup = void 0;\n /** The first epoch with `slotsPerEpoch` slots */\n this.firstNormalEpoch = void 0;\n /** The first slot of `firstNormalEpoch` */\n this.firstNormalSlot = void 0;\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n getEpoch(slot) {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n getEpochAndSlotIndex(slot) {\n if (slot < this.firstNormalSlot) {\n const epoch = trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) - trailingZeros(MINIMUM_SLOT_PER_EPOCH) - 1;\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n getFirstSlotInEpoch(epoch) {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (epoch - this.firstNormalEpoch) * this.slotsPerEpoch + this.firstNormalSlot;\n }\n }\n getLastSlotInEpoch(epoch) {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n getSlotsInEpoch(epoch) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n\nvar fetchImpl = globalThis.fetch;\n\nclass RpcWebSocketClient extends rpc_websockets__WEBPACK_IMPORTED_MODULE_7__.CommonClient {\n constructor(address, options, generate_request_id) {\n const webSocketFactory = url => {\n const rpc = (0,rpc_websockets__WEBPACK_IMPORTED_MODULE_7__.WebSocket)(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options\n });\n if ('socket' in rpc) {\n this.underlyingSocket = rpc.socket;\n } else {\n this.underlyingSocket = rpc;\n }\n return rpc;\n };\n super(webSocketFactory, address, options, generate_request_id);\n this.underlyingSocket = void 0;\n }\n call(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(new Error('Tried to call a JSON-RPC method `' + args[0] + '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' + readyState + ')'));\n }\n notify(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(new Error('Tried to send a JSON-RPC notification `' + args[0] + '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' + readyState + ')'));\n }\n}\n\n/**\n * @internal\n */\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nfunction decodeData(type, data) {\n let decoded;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n if (decoded.typeIndex !== type.index) {\n throw new Error(`invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`);\n }\n return decoded;\n}\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\nclass AddressLookupTableAccount {\n constructor(args) {\n this.key = void 0;\n this.state = void 0;\n this.key = args.key;\n this.state = args.state;\n }\n isActive() {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n static deserialize(accountData) {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {\n addresses\n } = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(publicKey(), numSerializedAddresses, 'addresses')]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority: meta.authority.length !== 0 ? new PublicKey(meta.authority[0]) : undefined,\n addresses: addresses.map(address => new PublicKey(address))\n };\n }\n}\nconst LookupTableMetaLayout = {\n index: 1,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('typeIndex'), u64('deactivationSlot'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('lastExtendedSlot'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('lastExtendedStartIndex'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8(),\n // option\n _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(publicKey(), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.offset(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8(), -1), 'authority')])\n};\n\nconst URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\nfunction makeWebsocketUrl(endpoint) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [_,\n // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish, portWithColon, rest] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort = portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explicitly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to agave-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n\nconst PublicKeyFromString = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.coerce)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.instance)(PublicKey), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(), value => new PublicKey(value));\nconst RawAccountDataResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.tuple)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('base64')]);\nconst BufferFromRawAccountData = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.coerce)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.instance)(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer), RawAccountDataResult, value => buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(value[0], 'base64'));\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nconst BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\n\n/** @internal */\n/** @internal */\n/** @internal */\n/** @internal */\n\n/** @internal */\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\n\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\n\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\n\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\n\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\n\n/**\n * @internal\n */\n\n/**\n * Extra contextual information for RPC responses\n */\n\n/**\n * Options for sending transactions\n */\n\n/**\n * Options for confirming transactions\n */\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\n\n/**\n * Options for getSignaturesForAddress\n */\n\n/**\n * RPC Response with extra contextual information\n */\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\n\n/**\n * This type represents all transaction confirmation strategies\n */\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(commitmentOrConfig) {\n let commitment;\n let config;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {\n commitment: specifiedCommitment,\n ...specifiedConfig\n } = commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {\n commitment,\n config\n };\n}\n\n/**\n * @internal\n */\nfunction applyDefaultMemcmpEncodingToFilters(filters) {\n return filters.map(filter => 'memcmp' in filter ? {\n ...filter,\n memcmp: {\n ...filter.memcmp,\n encoding: filter.memcmp.encoding ?? 'base58'\n }\n } : filter);\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result) {\n return (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n jsonrpc: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('2.0'),\n id: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n result\n }), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n jsonrpc: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('2.0'),\n id: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n error: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n code: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.unknown)(),\n message: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n data: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.any)())\n })\n })]);\n}\nconst UnknownRpcResult = createRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.unknown)());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema) {\n return (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.coerce)(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(value.result, schema)\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value) {\n return jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n context: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n }),\n value\n }));\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value) {\n return (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n context: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n }),\n value\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(version, response) {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(accountKey => new PublicKey(accountKey)),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(ix.data)\n })),\n addressTableLookups: response.addressTableLookups\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\n\n// Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\n\n/**\n * Configuration object for changing query behavior\n */\n\n/**\n * Information describing a cluster node\n */\n\n/**\n * Information describing a vote account\n */\n\n/**\n * A collection of cluster vote accounts\n */\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\n\nconst GetInflationGovernorResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n foundation: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n foundationTerm: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n initial: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n taper: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n terminal: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/**\n * The inflation reward for an epoch\n */\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n epoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n effectiveSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n amount: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n postBalance: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n commission: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()))\n}))));\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n prioritizationFee: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n}));\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n total: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n validator: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n foundation: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n epoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/**\n * Information about the current epoch\n */\n\nconst GetEpochInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n epoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n slotIndex: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n slotsInEpoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n absoluteSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n blockHeight: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n transactionCount: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n});\nconst GetEpochScheduleResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n slotsPerEpoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n leaderScheduleSlotOffset: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n warmup: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n firstNormalEpoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n firstNormalSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\n\nconst GetLeaderScheduleResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.record)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({}), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n err: TransactionErrorResult\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('receivedSignature');\n\n/**\n * Version info for a node\n */\n\nconst VersionResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n 'solana-core': (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n 'feature-set': (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n});\nconst ParsedInstructionStruct = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n program: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n programId: PublicKeyFromString,\n parsed: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.unknown)()\n});\nconst PartiallyDecodedInstructionStruct = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n programId: PublicKeyFromString,\n accounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(PublicKeyFromString),\n data: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()\n});\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n err: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({}), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()])),\n logs: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)())),\n accounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n executable: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n owner: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n lamports: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n data: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n rentEpoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n }))))),\n unitsConsumed: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n returnData: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n programId: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n data: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.tuple)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('base64')])\n }))),\n innerInstructions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n index: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n instructions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n}));\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\n\n/**\n * A processed transaction from the RPC API\n */\n\n/**\n * A processed transaction from the RPC API\n */\n\n/**\n * A processed transaction message from the RPC API\n */\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0.\n */\n\n/**\n * A partially decoded transaction instruction\n */\n\n/**\n * A parsed transaction message account\n */\n\n/**\n * A parsed transaction instruction\n */\n\n/**\n * A parsed address table lookup\n */\n\n/**\n * A parsed transaction message\n */\n\n/**\n * A parsed transaction\n */\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\n\n/**\n * A parsed transaction on the ledger with meta\n */\n\n/**\n * A processed block fetched from the RPC API\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\n\n/**\n * A block with parsed transactions\n */\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\n\n/**\n * A processed block fetched from the RPC API\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0.\n */\n\n/**\n * A Block on the ledger with signatures only\n */\n\n/**\n * recent block production information\n */\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n byIdentity: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.record)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())),\n range: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n firstSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n lastSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n })\n}));\n\n/**\n * A performance sample\n */\n\nfunction createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent) {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent;\n {\n if (httpAgent != null) {\n console.warn('You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' + 'It has been ignored; `httpAgent` is only used in Node environments.');\n }\n }\n let fetchWithMiddleware;\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise((resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) => resolve([modifiedInfo, modifiedInit]));\n } catch (error) {\n reject(error);\n }\n });\n return await fetch(...modifiedFetchArgs);\n };\n }\n const clientBrowser = new (jayson_lib_client_browser__WEBPACK_IMPORTED_MODULE_6___default())(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign({\n 'Content-Type': 'application/json'\n }, httpHeaders || {}, COMMON_HTTP_HEADERS)\n };\n try {\n let too_many_requests_retries = 5;\n let res;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.error(`Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`);\n await sleep(waitTime);\n waitTime *= 2;\n }\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n return clientBrowser;\n}\nfunction createRpcRequest(client) {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\nfunction createRpcBatchRequest(client) {\n return requests => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n const batch = requests.map(params => {\n return client.request(params.methodName, params.args);\n });\n client.request(batch, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)());\n\n/**\n * Supply\n */\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n total: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n circulating: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n nonCirculating: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n nonCirculatingAccounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(PublicKeyFromString)\n}));\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n amount: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n uiAmount: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n decimals: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n uiAmountString: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)())\n});\n\n/**\n * Token address and balance.\n */\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n address: PublicKeyFromString,\n amount: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n uiAmount: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n decimals: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n uiAmountString: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)())\n})));\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n pubkey: PublicKeyFromString,\n account: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n executable: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n owner: PublicKeyFromString,\n lamports: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n data: BufferFromRawAccountData,\n rentEpoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n })\n})));\nconst ParsedAccountDataResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n program: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parsed: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.unknown)(),\n space: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n pubkey: PublicKeyFromString,\n account: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n executable: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n owner: PublicKeyFromString,\n lamports: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n data: ParsedAccountDataResult,\n rentEpoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n })\n})));\n\n/**\n * Pair of an account address and its balance\n */\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n lamports: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n address: PublicKeyFromString\n})));\n\n/**\n * @internal\n */\nconst AccountInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n executable: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n owner: PublicKeyFromString,\n lamports: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n data: BufferFromRawAccountData,\n rentEpoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n});\nconst ParsedOrRawAccountData = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.coerce)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.instance)(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer), ParsedAccountDataResult]), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([RawAccountDataResult, ParsedAccountDataResult]), value => {\n if (Array.isArray(value)) {\n return (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n});\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n executable: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n owner: PublicKeyFromString,\n lamports: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n data: ParsedOrRawAccountData,\n rentEpoch: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\nconst KeyedParsedAccountInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n state: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('active'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('inactive'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('activating'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('deactivating')]),\n active: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n inactive: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n signature: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n err: TransactionErrorResult,\n memo: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()))\n})));\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n signature: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n err: TransactionErrorResult,\n memo: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()))\n})));\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n subscription: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n result: notificationResultAndContext(AccountInfoResult)\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n subscription: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n parent: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n root: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n subscription: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n result: SlotInfoResult\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\n\n/**\n * @internal\n */\nconst SlotUpdateResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n type: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('firstShredReceived'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('completed'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('optimisticConfirmation'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('root')]),\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n timestamp: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n}), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n type: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('createdBank'),\n parent: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n timestamp: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n}), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n type: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('frozen'),\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n timestamp: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n stats: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n numTransactionEntries: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n numSuccessfulTransactions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n numFailedTransactions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n maxTransactionsPerEntry: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n })\n}), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n type: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('dead'),\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n timestamp: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n err: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()\n})]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n subscription: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n result: SlotUpdateResult\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n subscription: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n result: notificationResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([SignatureStatusResult, SignatureReceivedResult]))\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n subscription: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n result: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\nconst ContactInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n pubkey: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n gossip: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n tpu: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n rpc: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n version: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)())\n});\nconst VoteAccountInfoResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n votePubkey: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n nodePubkey: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n activatedStake: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n epochVoteAccount: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n epochCredits: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.tuple)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()])),\n commission: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n lastVote: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n rootSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n current: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(VoteAccountInfoResult),\n delinquent: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(VoteAccountInfoResult)\n}));\nconst ConfirmationStatus = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('processed'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('confirmed'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('finalized')]);\nconst SignatureStatusResponse = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n confirmations: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n err: TransactionErrorResult,\n confirmationStatus: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(ConfirmationStatus)\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(SignatureStatusResponse)));\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)());\nconst AddressTableLookupStruct = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accountKey: PublicKeyFromString,\n writableIndexes: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n readonlyIndexes: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n});\nconst ConfirmedTransactionResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n signatures: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n message: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accountKeys: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n header: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n numRequiredSignatures: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n numReadonlySignedAccounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n numReadonlyUnsignedAccounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n }),\n instructions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n data: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n programIdIndex: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n })),\n recentBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n addressTableLookups: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(AddressTableLookupStruct))\n })\n});\nconst AnnotatedAccountKey = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n pubkey: PublicKeyFromString,\n signer: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n writable: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)(),\n source: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('transaction'), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('lookupTable')]))\n});\nconst ConfirmedTransactionAccountsModeResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accountKeys: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(AnnotatedAccountKey),\n signatures: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)())\n});\nconst ParsedInstructionResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n parsed: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.unknown)(),\n program: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n programId: PublicKeyFromString\n});\nconst RawInstructionResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(PublicKeyFromString),\n data: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n programId: PublicKeyFromString\n});\nconst InstructionResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([RawInstructionResult, ParsedInstructionResult]);\nconst UnknownInstructionResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n parsed: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.unknown)(),\n program: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n programId: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()\n}), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n data: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n programId: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()\n})]);\nconst ParsedOrRawInstruction = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.coerce)(InstructionResult, UnknownInstructionResult, value => {\n if ('accounts' in value) {\n return (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(value, RawInstructionResult);\n } else {\n return (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(value, ParsedInstructionResult);\n }\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n signatures: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n message: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accountKeys: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(AnnotatedAccountKey),\n instructions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(ParsedOrRawInstruction),\n recentBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n addressTableLookups: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(AddressTableLookupStruct)))\n })\n});\nconst TokenBalanceResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accountIndex: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n mint: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n owner: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n uiTokenAmount: TokenAmountResult\n});\nconst LoadedAddressesResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n writable: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(PublicKeyFromString),\n readonly: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(PublicKeyFromString)\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n err: TransactionErrorResult,\n fee: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n innerInstructions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n index: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n instructions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n accounts: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n data: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n programIdIndex: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n }))\n })))),\n preBalances: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n postBalances: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n logMessages: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()))),\n preTokenBalances: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(TokenBalanceResult))),\n postTokenBalances: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(TokenBalanceResult))),\n loadedAddresses: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(LoadedAddressesResult),\n computeUnitsConsumed: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n err: TransactionErrorResult,\n fee: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n innerInstructions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n index: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n instructions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(ParsedOrRawInstruction)\n })))),\n preBalances: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n postBalances: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n logMessages: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()))),\n preTokenBalances: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(TokenBalanceResult))),\n postTokenBalances: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(TokenBalanceResult))),\n loadedAddresses: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(LoadedAddressesResult),\n computeUnitsConsumed: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n});\nconst TransactionVersionStruct = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.union)([(0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)(0), (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.literal)('legacy')]);\n\n/** @internal */\nconst RewardsResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n pubkey: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n lamports: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n postBalance: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n rewardType: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n commission: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()))\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n previousBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parentSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n transactions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n transaction: ConfirmedTransactionResult,\n meta: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ConfirmedTransactionMetaResult),\n version: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(TransactionVersionStruct)\n })),\n rewards: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(RewardsResult)),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n blockHeight: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n previousBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parentSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n rewards: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(RewardsResult)),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n blockHeight: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n previousBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parentSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n transactions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ConfirmedTransactionMetaResult),\n version: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(TransactionVersionStruct)\n })),\n rewards: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(RewardsResult)),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n blockHeight: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n previousBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parentSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n transactions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n transaction: ParsedConfirmedTransactionResult,\n meta: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ParsedConfirmedTransactionMetaResult),\n version: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(TransactionVersionStruct)\n })),\n rewards: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(RewardsResult)),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n blockHeight: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n previousBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parentSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n transactions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ParsedConfirmedTransactionMetaResult),\n version: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(TransactionVersionStruct)\n })),\n rewards: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(RewardsResult)),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n blockHeight: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n previousBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parentSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n rewards: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(RewardsResult)),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()),\n blockHeight: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n})));\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n previousBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parentSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n transactions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n transaction: ConfirmedTransactionResult,\n meta: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ConfirmedTransactionMetaResult)\n })),\n rewards: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(RewardsResult)),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n previousBlockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n parentSlot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n signatures: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())\n})));\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n meta: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ConfirmedTransactionMetaResult),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())),\n transaction: ConfirmedTransactionResult,\n version: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(TransactionVersionStruct)\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n transaction: ParsedConfirmedTransactionResult,\n meta: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ParsedConfirmedTransactionMetaResult),\n blockTime: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())),\n version: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)(TransactionVersionStruct)\n})));\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n feeCalculator: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n lamportsPerSignature: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n })\n}));\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n blockhash: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n lastValidBlockHeight: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n}));\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.boolean)());\nconst PerfSampleResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n slot: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n numTransactions: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n numSlots: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)(),\n samplePeriodSecs: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(PerfSampleResult));\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n feeCalculator: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n lamportsPerSignature: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n })\n})));\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)());\n\n/**\n * Information about the latest slot being processed by a node\n */\n\n/**\n * Parsed account data\n */\n\n/**\n * Stake Activation data\n */\n\n/**\n * Data slice argument for getProgramAccounts\n */\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\n\n/**\n * A filter object for getProgramAccounts\n */\n\n/**\n * Configuration object for getProgramAccounts requests\n */\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\n\n/**\n * Configuration object for getMultipleAccounts\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getNonce`\n */\n\n/**\n * Configuration object for `getNonceAndContext`\n */\n\n/**\n * Information describing an account\n */\n\n/**\n * Account information identified by pubkey\n */\n\n/**\n * Callback function for account change notifications\n */\n\n/**\n * Callback function for program account change notifications\n */\n\n/**\n * Callback function for slot change notifications\n */\n\n/**\n * Callback function for slot update notifications\n */\n\n/**\n * Callback function for signature status notifications\n */\n\n/**\n * Signature status notification with transaction result\n */\n\n/**\n * Signature received notification\n */\n\n/**\n * Callback function for signature notifications\n */\n\n/**\n * Signature subscription options\n */\n\n/**\n * Callback function for root change notifications\n */\n\n/**\n * @internal\n */\nconst LogsResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n err: TransactionErrorResult,\n logs: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n signature: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()\n});\n\n/**\n * Logs result.\n */\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n result: notificationResultAndContext(LogsResult),\n subscription: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()\n});\n\n/**\n * Filter for log subscriptions.\n */\n\n/**\n * Callback function for log notifications.\n */\n\n/**\n * Signature result\n */\n\n/**\n * Transaction error\n */\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\n\n/**\n * Signature status\n */\n\n/**\n * A confirmed signature with its status\n */\n\n/**\n * An object defining headers to be passed to the RPC server\n */\n\n/**\n * The type of the JavaScript `fetch()` API\n */\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\n\n/**\n * Configuration for instantiating a Connection\n */\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${\"1.0.0-maintenance\"}`\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nclass Connection {\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(endpoint, _commitmentOrConfig) {\n /** @internal */\n this._commitment = void 0;\n /** @internal */\n this._confirmTransactionInitialTimeout = void 0;\n /** @internal */\n this._rpcEndpoint = void 0;\n /** @internal */\n this._rpcWsEndpoint = void 0;\n /** @internal */\n this._rpcClient = void 0;\n /** @internal */\n this._rpcRequest = void 0;\n /** @internal */\n this._rpcBatchRequest = void 0;\n /** @internal */\n this._rpcWebSocket = void 0;\n /** @internal */\n this._rpcWebSocketConnected = false;\n /** @internal */\n this._rpcWebSocketHeartbeat = null;\n /** @internal */\n this._rpcWebSocketIdleTimeout = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */\n this._rpcWebSocketGeneration = 0;\n /** @internal */\n this._disableBlockhashCaching = false;\n /** @internal */\n this._pollingBlockhash = false;\n /** @internal */\n this._blockhashInfo = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: []\n };\n /** @internal */\n this._nextClientSubscriptionId = 0;\n /** @internal */\n this._subscriptionDisposeFunctionsByClientSubscriptionId = {};\n /** @internal */\n this._subscriptionHashByClientSubscriptionId = {};\n /** @internal */\n this._subscriptionStateChangeCallbacksByHash = {};\n /** @internal */\n this._subscriptionCallbacksByServerSubscriptionId = {};\n /** @internal */\n this._subscriptionsByHash = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */\n this._subscriptionsAutoDisposedByRpc = new Set();\n /*\n * Returns the current block height of the node\n */\n this.getBlockHeight = (() => {\n const requestPromises = {};\n return async commitmentOrConfig => {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const requestHash = fastStableStringify$1(args);\n requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block height information');\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (_commitmentOrConfig && typeof _commitmentOrConfig === 'string') {\n this._commitment = _commitmentOrConfig;\n } else if (_commitmentOrConfig) {\n this._commitment = _commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout = _commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = _commitmentOrConfig.wsEndpoint;\n httpHeaders = _commitmentOrConfig.httpHeaders;\n fetch = _commitmentOrConfig.fetch;\n fetchMiddleware = _commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = _commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = _commitmentOrConfig.httpAgent;\n }\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n this._rpcClient = createRpcClient(endpoint, httpHeaders, fetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent);\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on('accountNotification', this._wsOnAccountNotification.bind(this));\n this._rpcWebSocket.on('programNotification', this._wsOnProgramAccountNotification.bind(this));\n this._rpcWebSocket.on('slotNotification', this._wsOnSlotNotification.bind(this));\n this._rpcWebSocket.on('slotsUpdatesNotification', this._wsOnSlotUpdatesNotification.bind(this));\n this._rpcWebSocket.on('signatureNotification', this._wsOnSignatureNotification.bind(this));\n this._rpcWebSocket.on('rootNotification', this._wsOnRootNotification.bind(this));\n this._rpcWebSocket.on('logsNotification', this._wsOnLogsNotification.bind(this));\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment() {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint() {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(publicKey, commitmentOrConfig) {\n /** @internal */\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get balance for ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(publicKey, commitmentOrConfig) {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig).then(x => x.value).catch(e => {\n throw new Error('failed to get balance of account ' + publicKey.toBase58() + ': ' + e);\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot) {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get block time for slot ${slot}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot() {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get minimum ledger slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock() {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get first available block');\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(config) {\n let configArg = {};\n if (typeof config === 'string') {\n configArg = {\n commitment: config\n };\n } else if (config) {\n configArg = {\n ...config,\n commitment: config && config.commitment || this.commitment\n };\n } else {\n configArg = {\n commitment: this.commitment\n };\n }\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(tokenMintAddress, commitment) {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(tokenAddress, commitment) {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token account balance');\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(ownerAddress, filter, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n let _args = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(ownerAddress, filter, commitment) {\n let _args = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(config) {\n const arg = {\n ...config,\n commitment: config && config.commitment || this.commitment\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(mintAddress, commitment) {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(publicKey, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(AccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(publicKey, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ParsedAccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(publicKey, commitmentOrConfig) {\n try {\n const res = await this.getAccountInfoAndContext(publicKey, commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get info about account ' + publicKey.toBase58() + ': ' + e);\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(publicKeys, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(ParsedAccountInfoResult))));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)(AccountInfoResult))));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(publicKeys, commitmentOrConfig) {\n const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig);\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n *\n * @deprecated Deprecated since RPC v1.18; will be removed in a future version.\n */\n async getStakeActivation(publicKey, commitmentOrConfig, epoch) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, undefined /* encoding */, {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch\n });\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get Stake Activation ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(configOrCommitment);\n const {\n encoding,\n ...configWithoutEncoding\n } = config || {};\n const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64', {\n ...configWithoutEncoding,\n ...(configWithoutEncoding.filters ? {\n filters: applyDefaultMemcmpEncodingToFilters(configWithoutEncoding.filters)\n } : null)\n });\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(KeyedAccountInfoResult);\n const res = configWithoutEncoding.withContext === true ? (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext(baseSchema)) : (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs([programId.toBase58()], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(KeyedParsedAccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(strategy, commitment) {\n let rawSignature;\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy;\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n let decodedSignature;\n try {\n decodedSignature = bs58__WEBPACK_IMPORTED_MODULE_2___default().decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n assert(decodedSignature.length === 64, 'signature has invalid length');\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n }\n }\n getCancellationPromise(signal) {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n getTransactionConfirmationPromise({\n commitment,\n signature\n }) {\n let signatureSubscriptionId;\n let disposeSignatureSubscriptionStateChangeObserver;\n let done = false;\n const confirmationPromise = new Promise((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(signature, (result, context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result\n };\n resolve({\n __type: TransactionStatus.PROCESSED,\n response\n });\n }, commitment);\n const subscriptionSetupPromise = new Promise(resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver = this._onSubscriptionStateChange(signatureSubscriptionId, nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n });\n }\n });\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {\n context,\n value\n } = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root':\n {\n if (value.confirmationStatus === 'processed' || value.confirmationStatus === 'confirmed') {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value\n }\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {\n abortConfirmation,\n confirmationPromise\n };\n }\n async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {\n abortSignal,\n lastValidBlockHeight,\n signature\n }\n }) {\n let done = false;\n const expiryPromise = new Promise(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED\n });\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature\n }\n }) {\n let done = false;\n const expiryPromise = new Promise(resolve => {\n let currentNonceValue = nonceValue;\n let lastCheckedSlot = null;\n const getCurrentNonceValue = async () => {\n try {\n const {\n context,\n value: nonceAccount\n } = await this.getNonceAndContext(nonceAccountPubkey, {\n commitment,\n minContextSlot\n });\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus;\n while (true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (status.context.slot < (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {\n confirmationStatus\n } = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (confirmationStatus !== 'processed' && confirmationStatus !== 'confirmed' && confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (confirmationStatus !== 'confirmed' && confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (_ => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {\n err: signatureStatus.value.err\n }\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature\n }) {\n let timeoutId;\n const expiryPromise = new Promise(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip':\n {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n }\n timeoutId = setTimeout(() => resolve({\n __type: TransactionStatus.TIMED_OUT,\n timeoutMs\n }), timeoutMs);\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n let result;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(signature, outcome.timeoutMs / 1000);\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes() {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(startSlot, limit) {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(signature, config) {\n const {\n context,\n value: values\n } = await this.getSignatureStatuses([signature], config);\n assert(values.length === 1);\n const value = values[0];\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(signatures, config) {\n const params = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction count');\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment) {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(addresses, epoch, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([addresses.map(pubkey => pubkey.toBase58())], commitment, undefined /* encoding */, {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch\n });\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate() {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule() {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(epochSchedule.slotsPerEpoch, epochSchedule.leaderScheduleSlotOffset, epochSchedule.warmup, epochSchedule.firstNormalEpoch, epochSchedule.firstNormalSlot);\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule() {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(dataLength, commitment) {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest('getMinimumBalanceForRentExemption', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(limit) {\n const unsafeRes = await this._rpcRequest('getRecentPerformanceSamples', limit ? [limit] : []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent performance samples');\n }\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(blockhash, commitment) {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest('getFeeCalculatorForBlockhash', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {\n context,\n value\n } = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(message, commitment) {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.nullable)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(config) {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest('getRecentPrioritizationFees', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent prioritization fees');\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(commitment) {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(commitmentOrConfig) {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(blockhash, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs([blockhash], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to determine if the blockhash `' + blockhash + '`is valid');\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion() {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash() {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(slot, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts':\n {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none':\n {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default:\n {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {\n result\n } = res;\n return result ? {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta,\n version\n }) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(version, transaction.message)\n },\n version\n }))\n } : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e, 'failed to get confirmed block');\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(slot, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts':\n {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none':\n {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default:\n {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e, 'failed to get block');\n }\n }\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(configOrCommitment) {\n let extra;\n let commitment;\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {\n commitment: c,\n ...rest\n } = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block production information');\n }\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(signature, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n const result = res.result;\n if (!result) return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(signature, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed', config);\n return {\n methodName: 'getTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined /* encoding */, config);\n return {\n methodName: 'getTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n });\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetConfirmedBlockRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n const block = {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta\n }) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message\n }\n };\n })\n };\n return {\n ...block,\n transactions: block.transactions.map(({\n transaction,\n meta\n }) => {\n return {\n meta,\n transaction: Transaction.populate(transaction.message, transaction.signatures)\n };\n })\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(startSlot, endSlot, commitment) {\n const args = this._buildArgsAtLeastConfirmed(endSlot !== undefined ? [startSlot, endSlot] : [startSlot], commitment);\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResult((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.array)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {\n transactionDetails: 'signatures',\n rewards: false\n });\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {\n transactionDetails: 'signatures',\n rewards: false\n });\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(signature, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n const result = res.result;\n if (!result) return result;\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures)\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(signature, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(signatures, commitment) {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');\n return {\n methodName: 'getConfirmedTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed transactions');\n }\n return res.result;\n });\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(address, startSlot, endSlot) {\n let options = {};\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(startSlot, 'finalized');\n if (block.signatures.length > 0) {\n options.until = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(address, options);\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.\n */\n async getConfirmedSignaturesForAddress2(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);\n const unsafeRes = await this._rpcRequest('getConfirmedSignaturesForAddress2', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed signatures for address');\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signatures for address');\n }\n return res.result;\n }\n async getAddressLookupTable(accountKey, config) {\n const {\n context,\n value: accountInfo\n } = await this.getAccountInfoAndContext(accountKey, config);\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data)\n });\n }\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(nonceAccount, commitmentOrConfig) {\n const {\n context,\n value: accountInfo\n } = await this.getAccountInfoAndContext(nonceAccount, commitmentOrConfig);\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(nonceAccount, commitmentOrConfig) {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig).then(x => x.value).catch(e => {\n throw new Error('failed to get nonce for account ' + nonceAccount.toBase58() + ': ' + e);\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(to, lamports) {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [to.toBase58(), lamports]);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `airdrop to ${to.toBase58()} failed`);\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(disableCache) {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash() {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash ? cachedLatestBlockhash.blockhash : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: []\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n throw new Error(`Unable to obtain a new blockhash after ${Date.now() - startTime}ms`);\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(config) {\n const {\n commitment,\n config: configArg\n } = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, jsonRpcResultAndContext((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.number)()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get stake minimum delegation`);\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n const config = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {\n config.innerInstructions = configOrSigners.innerInstructions;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n if (!signers) break;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.simulatedSignatures.includes(signature) && !this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config = {\n encoding: 'base64',\n commitment: this.commitment\n };\n if (includeAccounts) {\n const addresses = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map(key => key.toBase58());\n config['accounts'] = {\n encoding: 'base64',\n addresses\n };\n }\n if (signers) {\n config.sigVerify = true;\n }\n if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {\n config.innerInstructions = configOrSigners.innerInstructions;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError({\n action: 'simulate',\n signature: '',\n transactionMessage: res.error.message,\n logs: logs\n });\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(transaction, signersOrOptions, options) {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(rawTransaction, options) {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(encodedTransaction, options);\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(encodedTransaction, options) {\n const config = {\n encoding: 'base64'\n };\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment = skipPreflight === true ? 'processed' // FIXME Remove when https://github.com/anza-xyz/agave/pull/483 is deployed.\n : options && options.preflightCommitment || this.commitment;\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs = undefined;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError({\n action: skipPreflight ? 'send' : 'simulate',\n signature: '',\n transactionMessage: res.error.message,\n logs: logs\n });\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(this._subscriptionsByHash).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending'\n });\n });\n }\n\n /**\n * @internal\n */\n _setSubscription(hash, nextSubscription) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n _onSubscriptionStateChange(clientSubscriptionId, callback) {\n const hash = this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash] ||= new Set();\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(`Error when closing socket connection: ${err.message}`);\n }\n }\n }, 500);\n }\n return;\n }\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[subscription.serverSubscriptionId];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {\n args,\n method\n } = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing'\n });\n const serverSubscriptionId = await this._rpcWebSocket.call(method, args);\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed'\n });\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${method} error for argument`, args, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending'\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {\n serverSubscriptionId,\n unsubscribeMethod\n } = subscription;\n if (this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(serverSubscriptionId);\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing'\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing'\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [serverSubscriptionId]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed'\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed'\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n }\n }));\n }\n\n /**\n * @internal\n */\n _handleServerNotification(serverSubscriptionId, callbackArgs) {\n const callbacks = this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs);\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification) {\n const {\n result,\n subscription\n } = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(notification, AccountNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n\n /**\n * @internal\n */\n _makeSubscription(subscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args) {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify$1([subscriptionConfig.method, args]);\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending'\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(subscription !== undefined, `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`);\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n\n /** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n onAccountChange(publicKey, callback, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',\n // Apply connection/server default.\n 'base64', config);\n return this._makeSubscription({\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'account change');\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification) {\n const {\n result,\n subscription\n } = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(notification, ProgramAccountNotificationResult);\n this._handleServerNotification(subscription, [{\n accountId: result.value.pubkey,\n accountInfo: result.value.account\n }, result.context]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n\n /** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',\n // Apply connection/server default.\n 'base64' /* encoding */, config ? config : maybeFilters ? {\n filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)\n } : undefined /* extra */);\n return this._makeSubscription({\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeProgramAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'program account change');\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(filter, callback, commitment) {\n const args = this._buildArgs([typeof filter === 'object' ? {\n mentions: [filter.toString()]\n } : filter], commitment || this._commitment || 'finalized' // Apply connection/server default.\n );\n return this._makeSubscription({\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param clientSubscriptionId client subscription id to deregister.\n */\n async removeOnLogsListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification) {\n const {\n result,\n subscription\n } = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification) {\n const {\n result,\n subscription\n } = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback) {\n return this._makeSubscription({\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'slot change');\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification) {\n const {\n result,\n subscription\n } = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(notification, SlotUpdateNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback) {\n return this._makeSubscription({\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotUpdateListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'slot update');\n }\n\n /**\n * @internal\n */\n\n async _unsubscribeClientSubscription(clientSubscriptionId, subscriptionName) {\n const dispose = this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n if (dispose) {\n await dispose();\n } else {\n console.warn('Ignored unsubscribe request because an active subscription with id ' + `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` + 'could not be found.');\n }\n }\n _buildArgs(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error('Using Connection with default commitment: `' + this._commitment + '`, but method requires at least `confirmed`');\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification) {\n const {\n result,\n subscription\n } = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(notification, SignatureNotificationResult);\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(subscription, result.value === 'receivedSignature' ? [{\n type: 'received'\n }, result.context] : [{\n type: 'status',\n result: result.value\n }, result.context]);\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(signature, callback, commitment) {\n const args = this._buildArgs([signature], commitment || this._commitment || 'finalized' // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe'\n }, args);\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(signature, callback, options) {\n const {\n commitment,\n ...extra\n } = {\n ...options,\n commitment: options && options.commitment || this._commitment || 'finalized' // Apply connection/server default.\n };\n const args = this._buildArgs([signature], commitment, undefined /* encoding */, extra);\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe'\n }, args);\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSignatureListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'signature result');\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification) {\n const {\n result,\n subscription\n } = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.create)(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback) {\n return this._makeSubscription({\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeRootChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'root change');\n }\n}\n\n/**\n * Keypair signer interface\n */\n\n/**\n * An account keypair used for signing transactions.\n */\nclass Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({\n publicKey,\n secretKey\n });\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({\n publicKey,\n secretKey\n });\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nconst LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), u64('recentSlot'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('bumpSeed')])\n },\n FreezeLookupTable: {\n index: 1,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n },\n ExtendLookupTable: {\n index: 2,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), u64(), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(publicKey(), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.offset(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32(), -8), 'addresses')])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n },\n CloseLookupTable: {\n index: 4,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n }\n});\nclass AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [layoutType, layout] of Object.entries(LOOKUP_TABLE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == index) {\n type = layoutType;\n break;\n }\n }\n if (!type) {\n throw new Error('Invalid Instruction. Should be a LookupTable Instruction');\n }\n return type;\n }\n static decodeCreateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n const {\n recentSlot\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable, instruction.data);\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot)\n };\n }\n static decodeExtendLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(`invalid instruction; found ${instruction.keys.length} keys, expected at least 2`);\n }\n const {\n addresses\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable, instruction.data);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer))\n };\n }\n static decodeCloseLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey\n };\n }\n static decodeFreezeLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n static decodeDeactivateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error('invalid instruction; programId is not AddressLookupTable Program');\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\nclass AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), (0,bigint_buffer__WEBPACK_IMPORTED_MODULE_5__.toBufferLE)(BigInt(params.recentSlot), 8)], this.programId);\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static extendLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static deactivateLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static closeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n}\nAddressLookupTableProgram.programId = new PublicKey('AddressLookupTab1e1111111111111111111111111');\n\n/**\n * Compute Budget Instruction class\n */\nclass ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a ComputeBudgetInstruction');\n }\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units,\n additionalFee\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits, instruction.data);\n return {\n units,\n additionalFee\n };\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n bytes\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame, instruction.data);\n return {\n bytes\n };\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit, instruction.data);\n return {\n units\n };\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n microLamports\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice, instruction.data);\n return {\n microLamports\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error('invalid instruction; programId is not ComputeBudgetProgram');\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\n\n/**\n * Request units instruction params\n */\n\n/**\n * Request heap frame instruction params\n */\n\n/**\n * Set compute unit limit instruction params\n */\n\n/**\n * Set compute unit price instruction params\n */\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nconst COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('units'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('additionalFee')])\n },\n RequestHeapFrame: {\n index: 1,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('bytes')])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('units')])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('instruction'), u64('microLamports')])\n }\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nclass ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n}\nComputeBudgetProgram.programId = new PublicKey('ComputeBudget111111111111111111111111111111');\n\nconst PRIVATE_KEY_BYTES$1 = 64;\nconst PUBLIC_KEY_BYTES$1 = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\n\nconst ED25519_INSTRUCTION_LAYOUT = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('numSignatures'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('padding'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('signatureOffset'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('signatureInstructionIndex'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('publicKeyOffset'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('publicKeyInstructionIndex'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('messageDataOffset'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('messageDataSize'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('messageInstructionIndex')]);\nclass Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey,\n message,\n signature,\n instructionIndex\n } = params;\n assert(publicKey.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey.length} bytes`);\n assert(signature.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n const instructionData = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(messageDataOffset + message.length);\n const index = instructionIndex == null ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index\n }, instructionData);\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message,\n instructionIndex\n } = params;\n assert(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\nEd25519Program.programId = new PublicKey('Ed25519SigVerify111111111111111111111111111');\n\nconst ecdsaSign = (msgHash, privKey) => {\n const signature = _noble_curves_secp256k1__WEBPACK_IMPORTED_MODULE_11__.secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery];\n};\n_noble_curves_secp256k1__WEBPACK_IMPORTED_MODULE_11__.secp256k1.utils.isValidPrivateKey;\nconst publicKeyCreate = _noble_curves_secp256k1__WEBPACK_IMPORTED_MODULE_11__.secp256k1.getPublicKey;\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\n\nconst SECP256K1_INSTRUCTION_LAYOUT = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('numSignatures'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('signatureOffset'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('signatureInstructionIndex'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('ethAddressOffset'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('ethAddressInstructionIndex'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('messageDataOffset'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u16('messageDataSize'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('messageInstructionIndex'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(20, 'ethAddress'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.blob(64, 'signature'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('recoveryId')]);\nclass Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey) {\n assert(publicKey.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`);\n try {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from((0,_noble_hashes_sha3__WEBPACK_IMPORTED_MODULE_12__.keccak_256)(toBuffer(publicKey))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex\n } = params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n assert(ethAddress.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n const instructionData = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message,\n instructionIndex\n } = params;\n assert(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(privateKey, false /* isCompressed */).slice(1); // throw away leading byte\n const messageHash = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from((0,_noble_hashes_sha3__WEBPACK_IMPORTED_MODULE_12__.keccak_256)(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\nSecp256k1Program.programId = new PublicKey('KeccakSecp256k11111111111111111111111111111');\n\nvar _Lockup;\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nconst STAKE_CONFIG_ID = new PublicKey('StakeConfig11111111111111111111111111111111');\n\n/**\n * Stake account authority info\n */\nclass Authorized {\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker, withdrawer) {\n /** stake authority */\n this.staker = void 0;\n /** withdraw authority */\n this.withdrawer = void 0;\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n/**\n * Stake account lockup info\n */\nclass Lockup {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n /** Unix timestamp of lockup expiration */\n this.unixTimestamp = void 0;\n /** Epoch of lockup expiration */\n this.epoch = void 0;\n /** Lockup custodian authority */\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n}\n_Lockup = Lockup;\nLockup.default = new _Lockup(0, 0, PublicKey.default);\n/**\n * Create stake account transaction params\n */\n/**\n * Create stake account with seed transaction params\n */\n/**\n * Initialize stake instruction params\n */\n/**\n * Delegate stake instruction params\n */\n/**\n * Authorize stake instruction params\n */\n/**\n * Authorize stake instruction params using a derived key\n */\n/**\n * Split stake instruction params\n */\n/**\n * Split with seed transaction params\n */\n/**\n * Withdraw stake instruction params\n */\n/**\n * Deactivate stake instruction params\n */\n/**\n * Merge stake instruction params\n */\n/**\n * Stake Instruction class\n */\nclass StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized,\n lockup\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Initialize, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(new PublicKey(authorized.staker), new PublicKey(authorized.withdrawer)),\n lockup: new Lockup(lockup.unixTimestamp, lockup.epoch, new PublicKey(lockup.custodian))\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n stakeAuthorizationType\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Split, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nconst STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('newAuthorized'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('stakeAuthorizationType')])\n },\n Delegate: {\n index: 2,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n },\n Split: {\n index: 3,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('lamports')])\n },\n Withdraw: {\n index: 4,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('lamports')])\n },\n Deactivate: {\n index: 5,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n },\n Merge: {\n index: 7,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('newAuthorized'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('stakeAuthorizationType'), rustString('authoritySeed'), publicKey('authorityOwner')])\n }\n});\n\n/**\n * Stake authorization type\n */\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nconst StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nclass StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized,\n lockup: maybeLockup\n } = params;\n const lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized,\n lockup\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized,\n lockup\n }));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized,\n lockup\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized,\n lockup\n }));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params,\n // Compute the cost of allocating the new stake account in lamports\n rentExemptReserve) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params,\n // If this stake account is new, compute the cost of allocating it in lamports\n rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n}\nStakeProgram.programId = new PublicKey('Stake11111111111111111111111111111111111111');\n/**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeStateV2::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeStateV2.html\n */\nStakeProgram.space = 200;\n\n/**\n * Vote account info\n */\nclass VoteInit {\n /** [0, 100] */\n\n constructor(nodePubkey, authorizedVoter, authorizedWithdrawer, commission) {\n this.nodePubkey = void 0;\n this.authorizedVoter = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\n\n/**\n * InitializeAccount instruction params\n */\n\n/**\n * Authorize instruction params\n */\n\n/**\n * AuthorizeWithSeed instruction params\n */\n\n/**\n * Withdraw from vote account transaction params\n */\n\n/**\n * Update validator identity (node pubkey) vote account instruction params.\n */\n\n/**\n * Vote Instruction class\n */\nclass VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n const {\n voteInit\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.InitializeAccount, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(new PublicKey(voteInit.nodePubkey), new PublicKey(voteInit.authorizedVoter), new PublicKey(voteInit.authorizedWithdrawer), voteInit.commission)\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n voteAuthorizationType\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n }\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType\n }\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(currentAuthorityDerivedKeyOwnerPubkey),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n },\n votePubkey: instruction.keys[0].pubkey\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\n\n/** @internal */\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), publicKey('newAuthorized'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('voteAuthorizationType')])\n },\n Withdraw: {\n index: 3,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.ns64('lamports')])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction')])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('instruction'), voteAuthorizeWithSeedArgs()])\n }\n});\n\n/**\n * VoteAuthorize type\n */\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nconst VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nclass VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit.authorizedWithdrawer.toBuffer()),\n commission: voteInit.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error('Withdraw will leave vote account with insufficient funds.');\n }\n return VoteProgram.withdraw(params);\n }\n\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData(type);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n}\nVoteProgram.programId = new PublicKey('Vote111111111111111111111111111111111111111');\n/**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\nVoteProgram.space = 3762;\n\nconst VALIDATOR_INFO_KEY = new PublicKey('Va1idator1nfo111111111111111111111111111111');\n\n/**\n * @internal\n */\n\n/**\n * Info used to identity validators.\n */\n\nconst InfoString = (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.type)({\n name: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)(),\n website: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n details: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n iconUrl: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)()),\n keybaseUsername: (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.optional)((0,superstruct__WEBPACK_IMPORTED_MODULE_10__.string)())\n});\n\n/**\n * ValidatorInfo class\n */\nclass ValidatorInfo {\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key, info) {\n /**\n * validator public key\n */\n this.key = void 0;\n /**\n * validator information\n */\n this.info = void 0;\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(buffer) {\n let byteArray = [...buffer];\n const configKeyCount = decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n const configKeys = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({\n publicKey,\n isSigner\n });\n }\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo = rustString().decode(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(byteArray));\n const info = JSON.parse(rawInfo);\n (0,superstruct__WEBPACK_IMPORTED_MODULE_10__.assert)(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n return null;\n }\n}\n\nconst VOTE_PROGRAM_ID = new PublicKey('Vote111111111111111111111111111111111111111');\n\n/**\n * History of how many credits earned by the end of each epoch\n */\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([publicKey('nodePubkey'), publicKey('authorizedWithdrawer'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('commission'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64(),\n// votes.length\n_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('slot'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32('confirmationCount')]), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.offset(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32(), -8), 'votes'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('rootSlotValid'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('rootSlot'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64(),\n// authorizedVoters.length\n_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('epoch'), publicKey('authorizedVoter')]), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.offset(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32(), -8), 'authorizedVoters'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([publicKey('authorizedPubkey'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('epochOfLastAuthorizedSwitch'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('targetEpoch')]), 32, 'buf'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('idx'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u8('isEmpty')], 'priorVoters'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64(),\n// epochCredits.length\n_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.seq(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('epoch'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('credits'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('prevCredits')]), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.offset(_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.u32(), -8), 'epochCredits'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.struct([_solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('slot'), _solana_buffer_layout__WEBPACK_IMPORTED_MODULE_4__.nu64('timestamp')], 'lastTimestamp')]);\n/**\n * VoteAccount class\n */\nclass VoteAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.nodePubkey = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.rootSlot = void 0;\n this.votes = void 0;\n this.authorizedVoters = void 0;\n this.priorVoters = void 0;\n this.epochCredits = void 0;\n this.lastTimestamp = void 0;\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(buffer) {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n let rootSlot = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp\n });\n }\n}\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch\n}) {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter)\n };\n}\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch\n}) {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch\n };\n}\nfunction getPriorVoters({\n buf,\n idx,\n isEmpty\n}) {\n if (isEmpty) {\n return [];\n }\n return [...buf.slice(idx + 1).map(parsePriorVoters), ...buf.slice(0, idx).map(parsePriorVoters)];\n}\n\nconst endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/'\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/'\n }\n};\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nfunction clusterApiUrl(cluster, tls) {\n const key = tls === false ? 'http' : 'https';\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\n\n// eslint-disable-next-line no-redeclare\nasync function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {\n let confirmationStrategy;\n let options;\n if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, 'lastValidBlockHeight')) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, 'nonceValue')) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy ? connection.confirmTransaction(confirmationStrategy, commitment) : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: sendOptions?.skipPreflight ? 'send' : 'simulate',\n signature: signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Raw transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\n\n/**\n * There are 1-billion lamports in one SOL\n */\nconst LAMPORTS_PER_SOL = 1000000000;\n\n\n//# sourceMappingURL=index.browser.esm.js.map\n\n\n//# sourceURL=webpack://my-component/./node_modules/@solana/web3.js/lib/index.browser.esm.js?"); + +/***/ }), + +/***/ "./node_modules/@solana/web3.js/node_modules/base-x/src/index.js": +/*!***********************************************************************!*\ + !*** ./node_modules/@solana/web3.js/node_modules/base-x/src/index.js ***! + \***********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +eval("\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 = (__webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").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\n\n//# sourceURL=webpack://my-component/./node_modules/@solana/web3.js/node_modules/base-x/src/index.js?"); + +/***/ }), + +/***/ "./node_modules/@solana/web3.js/node_modules/bs58/index.js": +/*!*****************************************************************!*\ + !*** ./node_modules/@solana/web3.js/node_modules/bs58/index.js ***! + \*****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("var basex = __webpack_require__(/*! base-x */ \"./node_modules/@solana/web3.js/node_modules/base-x/src/index.js\")\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n//# sourceURL=webpack://my-component/./node_modules/@solana/web3.js/node_modules/bs58/index.js?"); + +/***/ }), + +/***/ "./src/main.js": +/*!*********************!*\ + !*** ./src/main.js ***! + \*********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Wallet: () => (/* binding */ Wallet)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ \"./node_modules/react-dom/client.js\");\n/* harmony import */ var _solana_wallet_adapter_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @solana/wallet-adapter-react */ \"./node_modules/@solana/wallet-adapter-react/lib/esm/ConnectionProvider.js\");\n/* harmony import */ var _solana_wallet_adapter_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @solana/wallet-adapter-react */ \"./node_modules/@solana/wallet-adapter-react/lib/esm/WalletProvider.js\");\n/* harmony import */ var _solana_wallet_adapter_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @solana/wallet-adapter-react */ \"./node_modules/@solana/wallet-adapter-react/lib/esm/useWallet.js\");\n/* harmony import */ var _solana_wallet_adapter_react_ui__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @solana/wallet-adapter-react-ui */ \"./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModalProvider.js\");\n/* harmony import */ var _solana_wallet_adapter_react_ui__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @solana/wallet-adapter-react-ui */ \"./node_modules/@solana/wallet-adapter-react-ui/lib/esm/BaseWalletMultiButton.js\");\n/* harmony import */ var _solana_web3_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solana/web3.js */ \"./node_modules/@solana/web3.js/lib/index.browser.esm.js\");\n/* harmony import */ var _solana_spl_token__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @solana/spl-token */ \"./node_modules/@solana/spl-token/lib/esm/constants.js\");\n/* harmony import */ var _solana_spl_token__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @solana/spl-token */ \"./node_modules/@solana/spl-token/lib/esm/state/account.js\");\n/* harmony import */ var exceljs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! exceljs */ \"./node_modules/exceljs/dist/exceljs.min.js\");\n/* harmony import */ var exceljs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(exceljs__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\n\n\n\n\n\n\n\n\n\nwindow.Buffer = buffer__WEBPACK_IMPORTED_MODULE_4__.Buffer;\n\n// Default styles that can be overridden by your app\n__webpack_require__(/*! ../src/styles.css */ \"./src/styles.css\");\nvar LABELS = {\n \"change-wallet\": \"Change wallet\",\n connecting: \"Connecting ...\",\n \"copy-address\": \"Copy address\",\n copied: \"Copied\",\n disconnect: \"Disconnect\",\n \"has-wallet\": \"Connect\",\n \"no-wallet\": \"Connect\"\n};\nvar Wallet = () => {\n var endpoint = \"http://localhost:8899\";\n var wallets = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => [],\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_solana_wallet_adapter_react__WEBPACK_IMPORTED_MODULE_6__.ConnectionProvider, {\n endpoint: endpoint,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_solana_wallet_adapter_react__WEBPACK_IMPORTED_MODULE_7__.WalletProvider, {\n wallets: wallets,\n autoConnect: true,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_solana_wallet_adapter_react_ui__WEBPACK_IMPORTED_MODULE_8__.WalletModalProvider, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_solana_wallet_adapter_react_ui__WEBPACK_IMPORTED_MODULE_9__.BaseWalletMultiButton, {\n labels: LABELS\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(Dispatcher, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(SignTransaction, {})]\n })\n })\n });\n};\nfunction MountWalletAdapter() {\n var container = document.getElementById(\"ore-wallet-adapter\");\n var root = react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot(container);\n root.render( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(Wallet, {}));\n}\nwindow.MountWalletAdapter = MountWalletAdapter;\nvar connection = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_2__.Connection(\"https://solemn-distinguished-grass.solana-mainnet.quiknode.pro/1f1a1a918a36aea5a0f6ee9366fe1c4e1e7b1e63/\");\nvar tokenMintAddress = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_2__.PublicKey(\"oreoU2P8bN6jkk3jbaiVxYnG1dCXcYxwhwyK9jSybcp\");\nvar exportToExcel = data => {\n var sheetName = \"holders_address.xlsx\";\n var headerName = \"RequestsList\";\n\n // 获取sheet对象,设置当前sheet的样式\n // showGridLines: false 表示不显示表格边框\n var workbook = new (exceljs__WEBPACK_IMPORTED_MODULE_3___default().Workbook)();\n var sheet = workbook.addWorksheet(sheetName, {\n views: [{\n showGridLines: false\n }]\n });\n\n // 获取每一列的header\n var columnArr = [];\n for (var i in data[0]) {\n var tempObj = {\n name: \"\"\n };\n tempObj.name = i;\n columnArr.push(tempObj);\n }\n\n // 设置表格的主要数据部分\n sheet.addTable({\n name: headerName,\n ref: \"A1\",\n headerRow: true,\n totalsRow: false,\n style: {\n theme: \"TableStyleMedium\",\n showRowStripes: false,\n width: 200\n },\n columns: columnArr ? columnArr : [{\n name: \"\"\n }],\n rows: data.map(e => {\n var arr = [];\n for (var _i in e) {\n arr.push(e[_i]);\n }\n return arr;\n })\n });\n sheet.getCell(\"A1\").font = {\n size: 20,\n bold: true\n };\n\n // 设置每一列的宽度\n sheet.columns = sheet.columns.map(e => {\n return {\n width: 60\n };\n });\n var table = sheet.getTable(headerName);\n for (var _i2 = 0; _i2 < table.table.columns.length; _i2++) {\n // 表格主体数据是从A5开始绘制的,一共有三列。这里是获取A5到,B5,C5单元格,定义表格的头部样式\n sheet.getCell(\"\".concat(String.fromCharCode(65 + _i2), \"1\")).font = {\n size: 12\n };\n sheet.getCell(\"\".concat(String.fromCharCode(65 + _i2), \"1\")).fill = {\n type: \"pattern\",\n pattern: \"solid\",\n fgColor: {\n argb: \"c5d9f1\"\n }\n };\n\n // 获取表格数据部分,定义其样式\n for (var j = 0; j < table.table.rows.length; j++) {\n var rowCell = sheet.getCell(\"\".concat(String.fromCharCode(65 + _i2)).concat(j + 6));\n rowCell.alignment = {\n wrapText: true\n };\n rowCell.border = {\n bottom: {\n style: \"thin\",\n color: {\n argb: \"a6a6a6\"\n }\n }\n };\n }\n }\n table.commit();\n var writeFile = (fileName, content) => {\n var link = document.createElement(\"a\");\n var blob = new Blob([content], {\n type: \"application/vnd.ms-excel;charset=utf-8;\"\n });\n link.download = fileName;\n link.href = URL.createObjectURL(blob);\n link.click();\n };\n\n // 表格的数据绘制完成,定义下载方法,将数据导出到Excel文件\n workbook.xlsx.writeBuffer().then(buffer => {\n writeFile(sheetName, buffer);\n });\n};\n\n// 获取与Token Mint地址关联的所有Token账户\nfunction getTokenHolders() {\n return _getTokenHolders.apply(this, arguments);\n}\nfunction _getTokenHolders() {\n _getTokenHolders = _asyncToGenerator(function* () {\n try {\n // 获取Token账户与Mint地址关联的过滤器\n var filters = [{\n dataSize: 165 // SPL Token账户的数据大小为165字节\n }, {\n memcmp: {\n offset: 0,\n // 代币Mint地址在Token账户数据中的偏移\n bytes: tokenMintAddress.toBase58()\n }\n }];\n\n // 获取与指定Mint地址相关的所有Token账户\n var accounts = yield connection.getProgramAccounts(_solana_spl_token__WEBPACK_IMPORTED_MODULE_10__.TOKEN_PROGRAM_ID, {\n filters: filters\n });\n var HolderCount = 0;\n var HolderUsers = [];\n var Decimals = 10n ** 11n;\n accounts.forEach((account, index) => {\n var tokenAccountInfo = _solana_spl_token__WEBPACK_IMPORTED_MODULE_11__.AccountLayout.decode(account.account.data);\n var holderAddress = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_2__.PublicKey(tokenAccountInfo.owner);\n var tokenAmount = BigInt(tokenAccountInfo.amount);\n var adjustedAmount = tokenAmount / Decimals;\n if (adjustedAmount > 10) {\n // console.log(`Holder ${index + 1}:`);\n // console.log(` Address: ${holderAddress.toBase58()}`);\n // console.log(` Amount: ${adjustedAmount}`); // Assuming 9 decimals for SPL token standard\n // console.log(`持有总数:${HolderCount}`);\n HolderCount++;\n HolderUsers.push({\n Address: holderAddress.toBase58(),\n Amount: \"\".concat(adjustedAmount)\n });\n }\n });\n var container = document.getElementById(\"ore-holders-list\");\n var root = react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot(container);\n root.render( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n class: \"flex flex-col gap-16 overflow-visible\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n class: \"flex flex-col grow gap-2 sm:gap-4 max-w-full\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"h2\", {\n class: \"text-lg sm:text-xl md:text-2xl font-bold\",\n children: \"Token Holders Total\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"div\", {\n class: \"flex flex-row grow justify-between max-w-full\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n class: \"flex flex-row my-auto gap-2.5 md:gap-4 truncate\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"div\", {\n class: \"flex rounded-full text-gray-300 bg-gray-200 dark:bg-gray-700 dark:text-gray-900 my-auto w-7 h-7 sm:w-8 sm:h-8 md:w-10 md:h-10\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"currentColor\",\n class: \"h-1/2 m-auto\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z\"\n })\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"h2\", {\n class: \"text-3xl sm:text-4xl md:text-5xl\",\n children: [HolderCount, \" > 10 ORE\"]\n })]\n })\n })]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n class: \"flex flex-col gap-4 grow w-full h-2/3 pb-20 min-h-16 rounded justify-start\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n class: \"flex items-center justify-between\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"h2\", {\n class: \"text-lg md:text-2xl font-bold my-auto\",\n children: \"Holders\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"button\", {\n class: \"rounded-full transition-colors my-auto px-2 py-1 sm:py-2 text-white bg-green-500 hover:bg-green-600 active:bg-green-700\",\n onClick: () => {\n exportToExcel(HolderUsers);\n },\n children: \"Export\"\n })]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"ul\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"li\", {\n class: \"flex flex-row justify-between py-3 gap-3 w-full font-semibold\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"div\", {\n children: \"Address\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"div\", {\n children: \"Amount(ORE)\"\n })]\n }), HolderUsers.map((holder, index) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"li\", {\n class: \"flex flex-row justify-between py-3 gap-3 w-full px-2 rounded hover-100 active-200 transition-colors\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"div\", {\n class: \"break-words\",\n style: {\n width: \"80%\"\n },\n children: holder.Address\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"div\", {\n class: \"flex-none\",\n children: holder.Amount\n })]\n }, index))]\n })]\n })]\n }));\n } catch (error) {\n console.error(\"Error getting token holders:\", error);\n var _container = document.getElementById(\"ore-holders-list\");\n var _root = react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot(_container);\n _root.render( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"h2\", {\n children: \"Token Holders\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"p\", {\n children: [\"Error getting token holders: \", error]\n })]\n }));\n }\n });\n return _getTokenHolders.apply(this, arguments);\n}\nwindow.getTokenHolders = getTokenHolders;\nfunction Dispatcher() {\n var {\n publicKey\n } = (0,_solana_wallet_adapter_react__WEBPACK_IMPORTED_MODULE_12__.useWallet)();\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {\n var msg;\n if (publicKey) {\n msg = publicKey.toBuffer().toJSON().data;\n } else {\n msg = null;\n }\n try {\n var event = new CustomEvent(\"ore-pubkey\", {\n detail: {\n pubkey: msg\n }\n });\n window.dispatchEvent(event);\n } catch (err) {\n console.log(err);\n }\n return;\n }, [publicKey]);\n}\nfunction SignTransaction() {\n var {\n publicKey,\n signTransaction\n } = (0,_solana_wallet_adapter_react__WEBPACK_IMPORTED_MODULE_12__.useWallet)();\n var callback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (msg) {\n try {\n var tx = _solana_web3_js__WEBPACK_IMPORTED_MODULE_2__.Transaction.from(Buffer.from(msg.b64, \"base64\"));\n var signed = yield signTransaction(tx);\n return signed.serialize().toString(\"base64\");\n } catch (err) {\n console.log(err);\n }\n });\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }(), [publicKey]);\n window.OreTxSigner = callback;\n return;\n}\n\n//# sourceURL=webpack://my-component/./src/main.js?"); + +/***/ }), + +/***/ "./node_modules/base-x/src/index.js": +/*!******************************************!*\ + !*** ./node_modules/base-x/src/index.js ***! + \******************************************/ +/***/ ((module) => { + +"use strict"; +eval("\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.\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 (source instanceof Uint8Array) {\n } else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength)\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source)\n }\n if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\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 new Uint8Array() }\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 = new Uint8Array(zeroes + (size - it4))\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\n\n//# sourceURL=webpack://my-component/./node_modules/base-x/src/index.js?"); + +/***/ }), + +/***/ "./node_modules/base64-js/index.js": +/*!*****************************************!*\ + !*** ./node_modules/base64-js/index.js ***! + \*****************************************/ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +eval("\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\n\n//# sourceURL=webpack://my-component/./node_modules/base64-js/index.js?"); + +/***/ }), + +/***/ "./node_modules/bigint-buffer/dist/browser.js": +/*!****************************************************!*\ + !*** ./node_modules/bigint-buffer/dist/browser.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n\n\n//# sourceURL=webpack://my-component/./node_modules/bigint-buffer/dist/browser.js?"); + +/***/ }), + +/***/ "./node_modules/bn.js/lib/bn.js": +/*!**************************************!*\ + !*** ./node_modules/bn.js/lib/bn.js ***! + \**************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("/* module decorator */ module = __webpack_require__.nmd(module);\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 = (__webpack_require__(/*! buffer */ \"?8131\").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})( false || module, this);\n\n\n//# sourceURL=webpack://my-component/./node_modules/bn.js/lib/bn.js?"); + +/***/ }), + +/***/ "./node_modules/borsh/lib/index.js": +/*!*****************************************!*\ + !*** ./node_modules/borsh/lib/index.js ***! + \*****************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\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 __decorate = (this && this.__decorate) || function (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};\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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(__webpack_require__(/*! bn.js */ \"./node_modules/bn.js/lib/bn.js\"));\nconst bs58_1 = __importDefault(__webpack_require__(/*! bs58 */ \"./node_modules/borsh/node_modules/bs58/index.js\"));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(__webpack_require__(/*! text-encoding-utf-8 */ \"./node_modules/text-encoding-utf-8/lib/encoding.lib.js\"));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n\n\n//# sourceURL=webpack://my-component/./node_modules/borsh/lib/index.js?"); + +/***/ }), + +/***/ "./node_modules/borsh/node_modules/base-x/src/index.js": +/*!*************************************************************!*\ + !*** ./node_modules/borsh/node_modules/base-x/src/index.js ***! + \*************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +eval("\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 = (__webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").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\n\n//# sourceURL=webpack://my-component/./node_modules/borsh/node_modules/base-x/src/index.js?"); + +/***/ }), + +/***/ "./node_modules/borsh/node_modules/bs58/index.js": +/*!*******************************************************!*\ + !*** ./node_modules/borsh/node_modules/bs58/index.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("var basex = __webpack_require__(/*! base-x */ \"./node_modules/borsh/node_modules/base-x/src/index.js\")\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n//# sourceURL=webpack://my-component/./node_modules/borsh/node_modules/bs58/index.js?"); + +/***/ }), + +/***/ "./node_modules/bs58/index.js": +/*!************************************!*\ + !*** ./node_modules/bs58/index.js ***! + \************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("const basex = __webpack_require__(/*! base-x */ \"./node_modules/base-x/src/index.js\")\nconst ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n//# sourceURL=webpack://my-component/./node_modules/bs58/index.js?"); + +/***/ }), + +/***/ "./node_modules/buffer/index.js": +/*!**************************************!*\ + !*** ./node_modules/buffer/index.js ***! + \**************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; +eval("/*!\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\n\nconst base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nconst ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\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\n//# sourceURL=webpack://my-component/./node_modules/buffer/index.js?"); + +/***/ }), + +/***/ "./node_modules/css-loader/dist/cjs.js!./src/styles.css": +/*!**************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js!./src/styles.css ***! + \**************************************************************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap);\"]);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.wallet-adapter-button {\n background-color: transparent;\n border: none;\n color: !inherit;\n cursor: pointer;\n display: flex;\n align-items: center;\n font-family: 'Geist', 'ui-sans-serif', 'system-ui';\n font-size: 14px;\n font-weight: 600;\n height: 32px;\n line-height: 32px;\n padding: 0 16px;\n border-radius: 9999px;\n margin: auto 0px;\n @media (min-width: 640px) {\n font-size: 16px;\n height: 40px;\n line-height: 40px;\n padding: 0 20px;\n }\n}\n\n.wallet-adapter-button-trigger {\n background-color: transparent;\n}\n\n.wallet-adapter-button:not([disabled]):focus-visible {\n outline-color: white;\n}\n\n.wallet-adapter-button:not([disabled]):hover {\n background-color: transparent;\n}\n\n.wallet-adapter-button[disabled] {\n background: #404144;\n color: #999;\n cursor: not-allowed;\n}\n\n.wallet-adapter-button-end-icon,\n.wallet-adapter-button-start-icon,\n.wallet-adapter-button-end-icon img,\n.wallet-adapter-button-start-icon img {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n @media (min-width: 640px) {\n width: 24px;\n height: 24px;\n }\n}\n\n.wallet-adapter-button-end-icon {\n margin-left: 0px;\n}\n\n.wallet-adapter-button-start-icon {\n margin-right: 8px;\n margin-left: 0px;\n @media (min-width: 640px) {\n margin-right: 12px;\n }\n}\n\n.wallet-adapter-collapse {\n width: 100%;\n}\n\n.wallet-adapter-dropdown {\n position: relative;\n display: inline-block;\n}\n\n.wallet-adapter-dropdown-list {\n position: absolute;\n z-index: 99;\n display: grid;\n grid-template-rows: 1fr;\n grid-row-gap: 10px;\n padding: 10px;\n top: 100%;\n right: 0;\n margin: 0;\n list-style: none;\n background: #2c2d30;\n border-radius: 10px;\n box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.6);\n opacity: 0;\n visibility: hidden;\n transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;\n font-family: 'Geist', 'ui-sans-serif', 'system-ui';\n}\n\n.wallet-adapter-dropdown-list-active {\n opacity: 1;\n visibility: visible;\n transform: translateY(10px);\n}\n\n.wallet-adapter-dropdown-list-item {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border: none;\n outline: none;\n cursor: pointer;\n white-space: nowrap;\n box-sizing: border-box;\n padding: 0 20px;\n width: 100%;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 600;\n height: 37px;\n color: #fff !important;\n}\n\n.wallet-adapter-dropdown-list-item:not([disabled]):hover {\n background-color: #1a1f2e;\n}\n\n.wallet-adapter-modal-collapse-button svg {\n align-self: center;\n fill: #999;\n}\n\n.wallet-adapter-modal-collapse-button.wallet-adapter-modal-collapse-button-active svg {\n transform: rotate(180deg);\n transition: transform ease-in 150ms;\n}\n\n.wallet-adapter-modal {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n opacity: 0;\n transition: opacity linear 150ms;\n background: rgba(0, 0, 0, 0.5);\n color: #fff;\n z-index: 1040;\n overflow-y: auto;\n}\n\n.wallet-adapter-modal.wallet-adapter-modal-fade-in {\n opacity: 1;\n}\n\n.wallet-adapter-modal-button-close {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 18px;\n right: 18px;\n padding: 12px;\n cursor: pointer;\n background: #1a1f2e;\n border: none;\n border-radius: 50%;\n}\n\n.wallet-adapter-modal-button-close:focus-visible {\n outline-color: white;\n}\n\n.wallet-adapter-modal-button-close svg {\n fill: #777;\n transition: fill 200ms ease 0s;\n}\n\n.wallet-adapter-modal-button-close:hover svg {\n fill: #fff;\n}\n\n.wallet-adapter-modal-overlay {\n background: rgba(0, 0, 0, 0.5);\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n\n.wallet-adapter-modal-container {\n display: flex;\n margin: 3rem;\n min-height: calc(100vh - 6rem); /* 100vh - 2 * margin */\n align-items: center;\n justify-content: center;\n}\n\n@media (max-width: 480px) {\n .wallet-adapter-modal-container {\n margin: 1rem;\n min-height: calc(100vh - 2rem); /* 100vh - 2 * margin */\n }\n}\n\n.wallet-adapter-modal-wrapper {\n box-sizing: border-box;\n position: relative;\n display: flex;\n align-items: center;\n flex-direction: column;\n z-index: 1050;\n max-width: 400px;\n border-radius: 10px;\n background: #10141f;\n box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.6);\n /* font-family: 'DM Sans', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; */\n font-family: 'Geist', 'ui-sans-serif', 'system-ui';\n flex: 1;\n}\n\n.wallet-adapter-modal-wrapper .wallet-adapter-button {\n width: 100%;\n}\n\n.wallet-adapter-modal-title {\n font-weight: 500;\n font-size: 24px;\n line-height: 36px;\n margin: 0;\n padding: 64px 48px 48px 48px;\n text-align: center;\n color: #fff;\n}\n\n@media (max-width: 374px) {\n .wallet-adapter-modal-title {\n font-size: 18px;\n }\n}\n\n.wallet-adapter-modal-list {\n margin: 0 0 12px 0;\n padding: 0;\n width: 100%;\n list-style: none;\n}\n\n.wallet-adapter-modal-list .wallet-adapter-button {\n font-weight: 400;\n border-radius: 0;\n font-size: 18px;\n}\n\n.wallet-adapter-modal-list .wallet-adapter-button-end-icon,\n.wallet-adapter-modal-list .wallet-adapter-button-start-icon,\n.wallet-adapter-modal-list .wallet-adapter-button-end-icon img,\n.wallet-adapter-modal-list .wallet-adapter-button-start-icon img {\n width: 28px;\n height: 28px;\n}\n\n.wallet-adapter-modal-list .wallet-adapter-button span {\n margin-left: auto;\n font-size: 14px;\n opacity: .6;\n}\n\n.wallet-adapter-modal-list-more {\n cursor: pointer;\n border: none;\n padding: 12px 24px 24px 12px;\n align-self: flex-end;\n display: flex;\n align-items: center;\n background-color: transparent;\n color: #fff;\n}\n\n.wallet-adapter-modal-list-more svg {\n transition: all 0.1s ease;\n fill: rgba(255, 255, 255, 1);\n margin-left: 0.5rem;\n}\n\n.wallet-adapter-modal-list-more-icon-rotate {\n transform: rotate(180deg);\n}\n\n.wallet-adapter-modal-middle {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 0 24px 24px 24px;\n box-sizing: border-box;\n}\n\n.wallet-adapter-modal-middle-button {\n display: block;\n cursor: pointer;\n margin-top: 48px;\n width: 100%;\n background-color: #512da8;\n padding: 12px;\n font-size: 18px;\n border: none;\n border-radius: 8px;\n color: #fff;\n}\n`, \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://my-component/./src/styles.css?./node_modules/css-loader/dist/cjs.js"); + +/***/ }), + +/***/ "./node_modules/css-loader/dist/runtime/api.js": +/*!*****************************************************!*\ + !*** ./node_modules/css-loader/dist/runtime/api.js ***! + \*****************************************************/ +/***/ ((module) => { + +"use strict"; +eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};\n\n//# sourceURL=webpack://my-component/./node_modules/css-loader/dist/runtime/api.js?"); + +/***/ }), + +/***/ "./node_modules/css-loader/dist/runtime/noSourceMaps.js": +/*!**************************************************************!*\ + !*** ./node_modules/css-loader/dist/runtime/noSourceMaps.js ***! + \**************************************************************/ +/***/ ((module) => { + +"use strict"; +eval("\n\nmodule.exports = function (i) {\n return i[1];\n};\n\n//# sourceURL=webpack://my-component/./node_modules/css-loader/dist/runtime/noSourceMaps.js?"); + +/***/ }), + +/***/ "./node_modules/eventemitter3/index.js": +/*!*********************************************!*\ + !*** ./node_modules/eventemitter3/index.js ***! + \*********************************************/ +/***/ ((module) => { + +"use strict"; +eval("\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif (true) {\n module.exports = EventEmitter;\n}\n\n\n//# sourceURL=webpack://my-component/./node_modules/eventemitter3/index.js?"); + +/***/ }), + +/***/ "./node_modules/exceljs/dist/exceljs.min.js": +/*!**************************************************!*\ + !*** ./node_modules/exceljs/dist/exceljs.min.js ***! + \**************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("/*! ExcelJS 19-10-2023 */\n\n!function(e){if(true)module.exports=e();else {}}((function(){return function e(t,r,n){function i(o,a){if(!r[o]){if(!t[o]){var l=undefined;if(!a&&l)return require(o,!0);if(s)return s(o,!0);var c=new Error(\"Cannot find module '\"+o+\"'\");throw c.code=\"MODULE_NOT_FOUND\",c}var u=r[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,r,n)}return r[o].exports}for(var s=undefined,o=0;o{const s=this.workbook.addWorksheet(t.sheetName),o=t.dateFormats||[\"YYYY-MM-DD[T]HH:mm:ssZ\",\"YYYY-MM-DD[T]HH:mm:ss\",\"MM-DD-YYYY\",\"YYYY-MM-DD\"],l=t.map||function(e){if(\"\"===e)return null;const t=Number(e);if(!Number.isNaN(t)&&t!==1/0)return t;const r=o.reduce((t,r)=>{if(t)return t;const n=a(e,r,!0);return n.isValid()?n:null},null);if(r)return new Date(r.valueOf());const n=u[e];return void 0!==n?n:e},c=i.parse(t.parserOptions).on(\"data\",e=>{s.addRow(e.map(l))}).on(\"end\",()=>{c.emit(\"worksheet\",s)});c.on(\"worksheet\",r).on(\"error\",n),e.pipe(c)})}createInputStream(){throw new Error(\"`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md\")}write(e,t){return new Promise((r,n)=>{t=t||{};const s=this.workbook.getWorksheet(t.sheetName||t.sheetId),o=i.format(t.formatterOptions);e.on(\"finish\",()=>{r()}),o.on(\"error\",n),o.pipe(e);const{dateFormat:l,dateUTC:c}=t,u=t.map||(e=>{if(e){if(e.text||e.hyperlink)return e.hyperlink||e.text||\"\";if(e.formula||e.result)return e.result||\"\";if(e instanceof Date)return l?c?a.utc(e).format(l):a(e).format(l):c?a.utc(e).format():a(e).format();if(e.error)return e.error;if(\"object\"==typeof e)return JSON.stringify(e)}return e}),h=void 0===t.includeEmptyRows||t.includeEmptyRows;let f=1;s&&s.eachRow((e,t)=>{if(h)for(;f++2&&void 0!==arguments[2]?arguments[2]:0;if(this.worksheet=e,t)if(\"string\"==typeof t){const e=n.decodeAddress(t);this.nativeCol=e.col+r,this.nativeColOff=0,this.nativeRow=e.row+r,this.nativeRowOff=0}else void 0!==t.nativeCol?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):void 0!==t.col?(this.col=t.col+r,this.row=t.row+r):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(e){return e instanceof i||null==e?e:new i(e)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(e){this.nativeCol=Math.floor(e),this.nativeColOff=Math.floor((e-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(e){this.nativeRow=Math.floor(e),this.nativeRowOff=Math.floor((e-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(e){this.nativeCol=e.nativeCol,this.nativeColOff=e.nativeColOff,this.nativeRow=e.nativeRow,this.nativeRowOff=e.nativeRowOff}}t.exports=i},{\"../utils/col-cache\":19}],3:[function(e,t,r){\"use strict\";const n=e(\"../utils/col-cache\"),i=e(\"../utils/under-dash\"),s=e(\"./enums\"),{slideFormula:o}=e(\"../utils/shared-formula\"),a=e(\"./note\");class l{constructor(e,t,r){if(!e||!t)throw new Error(\"A Cell needs a Row\");this._row=e,this._column=t,n.validateAddress(r),this._address=r,this._value=c.create(l.Types.Null,this),this.style=this._mergeStyle(e.style,t.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(e){this.style.numFmt=e}get font(){return this.style.font}set font(e){this.style.font=e}get alignment(){return this.style.alignment}set alignment(e){this.style.alignment=e}get border(){return this.style.border}set border(e){this.style.border=e}get fill(){return this.style.fill}set fill(e){this.style.fill=e}get protection(){return this.style.protection}set protection(e){this.style.protection=e}_mergeStyle(e,t,r){const n=e&&e.numFmt||t&&t.numFmt;n&&(r.numFmt=n);const i=e&&e.font||t&&t.font;i&&(r.font=i);const s=e&&e.alignment||t&&t.alignment;s&&(r.alignment=s);const o=e&&e.border||t&&t.border;o&&(r.border=o);const a=e&&e.fill||t&&t.fill;a&&(r.fill=a);const l=e&&e.protection||t&&t.protection;return l&&(r.protection=l),r}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===l.Types.Merge}merge(e,t){this._value.release(),this._value=c.create(l.Types.Merge,this,e),t||(this.style=e.style)}unmerge(){this.type===l.Types.Merge&&(this._value.release(),this._value=c.create(l.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(e){return this._value.type===l.Types.Merge&&this._value.isMergedTo(e)}get master(){return this.type===l.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===l.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(e){this.type!==l.Types.Merge?(this._value.release(),this._value=c.create(c.getType(e),this,e)):this._value.master.value=e}get note(){return this._comment&&this._comment.note}set note(e){this._comment=new a(e)}get text(){return this._value.toString()}get html(){return i.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(e){this.type===l.Types.String&&(this._value=c.create(l.Types.Hyperlink,this,{text:this._value.value,hyperlink:e}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:e}=this._row;return{sheetName:e.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(e){this.names=[e]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(e){const{definedNames:t}=this.workbook;t.removeAllNames(this.fullAddress),e.forEach(e=>{t.addEx(this.fullAddress,e)})}addName(e){this.workbook.definedNames.addEx(this.fullAddress,e)}removeName(e){this.workbook.definedNames.removeEx(this.fullAddress,e)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(e){this._dataValidations.add(this.address,e)}get model(){const{model:e}=this._value;return e.style=this.style,this._comment&&(e.comment=this._comment.model),e}set model(e){if(this._value.release(),this._value=c.create(e.type,this),this._value.model=e,e.comment)switch(e.comment.type){case\"note\":this._comment=a.fromModel(e.comment)}e.style?this.style=e.style:this.style={}}}l.Types=s.ValueType;const c={getType:e=>null==e?l.Types.Null:e instanceof String||\"string\"==typeof e?l.Types.String:\"number\"==typeof e?l.Types.Number:\"boolean\"==typeof e?l.Types.Boolean:e instanceof Date?l.Types.Date:e.text&&e.hyperlink?l.Types.Hyperlink:e.formula||e.sharedFormula?l.Types.Formula:e.richText?l.Types.RichText:e.sharedString?l.Types.SharedString:e.error?l.Types.Error:l.Types.JSON,types:[{t:l.Types.Null,f:class{constructor(e){this.model={address:e.address,type:l.Types.Null}}get value(){return null}set value(e){}get type(){return l.Types.Null}get effectiveType(){return l.Types.Null}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return\"\"}release(){}toString(){return\"\"}}},{t:l.Types.Number,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Number,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.Number}get effectiveType(){return l.Types.Number}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.String,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.String,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.String}get effectiveType(){return l.Types.String}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return`\"${this.model.value.replace(/\"/g,'\"\"')}\"`}release(){}toString(){return this.model.value}}},{t:l.Types.Date,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Date,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.Date}get effectiveType(){return l.Types.Date}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.Hyperlink,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Hyperlink,text:t?t.text:void 0,hyperlink:t?t.hyperlink:void 0},t&&t.tooltip&&(this.model.tooltip=t.tooltip)}get value(){const e={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(e.tooltip=this.model.tooltip),e}set value(e){this.model={text:e.text,hyperlink:e.hyperlink},e.tooltip&&(this.model.tooltip=e.tooltip)}get text(){return this.model.text}set text(e){this.model.text=e}get hyperlink(){return this.model.hyperlink}set hyperlink(e){this.model.hyperlink=e}get type(){return l.Types.Hyperlink}get effectiveType(){return l.Types.Hyperlink}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:l.Types.Formula,f:class{constructor(e,t){this.cell=e,this.model={address:e.address,type:l.Types.Formula,shareType:t?t.shareType:void 0,ref:t?t.ref:void 0,formula:t?t.formula:void 0,sharedFormula:t?t.sharedFormula:void 0,result:t?t.result:void 0}}_copyModel(e){const t={},r=r=>{const n=e[r];n&&(t[r]=n)};return r(\"formula\"),r(\"result\"),r(\"ref\"),r(\"shareType\"),r(\"sharedFormula\"),t}get value(){return this._copyModel(this.model)}set value(e){this.model=this._copyModel(e)}validate(e){switch(c.getType(e)){case l.Types.Null:case l.Types.String:case l.Types.Number:case l.Types.Date:break;case l.Types.Hyperlink:case l.Types.Formula:default:throw new Error(\"Cannot process that type of result value\")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\\d{1,4}:[A-Z]{1,3}\\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\\d{1,4}:[A-Z]{1,3}\\d{1,4}/g,\"\").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(e){this.model.formula=e}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(e){this.model.result=e}get type(){return l.Types.Formula}get effectiveType(){const e=this.model.result;return null==e?s.ValueType.Null:e instanceof String||\"string\"==typeof e?s.ValueType.String:\"number\"==typeof e?s.ValueType.Number:e instanceof Date?s.ValueType.Date:e.text&&e.hyperlink?s.ValueType.Hyperlink:e.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(e){this.model.address=e}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:e}=this.cell,t=e.findCell(this.model.sharedFormula);this._translatedFormula=t&&o(t.formula,t.address,this.model.address)}return this._translatedFormula}toCsvString(){return\"\"+(this.model.result||\"\")}release(){}toString(){return this.model.result?this.model.result.toString():\"\"}}},{t:l.Types.Merge,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Merge,master:t?t.address:void 0},this._master=t,t&&t.addMergeRef()}get value(){return this._master.value}set value(e){e instanceof l?(this._master&&this._master.releaseMergeRef(),e.addMergeRef(),this._master=e):this._master.value=e}isMergedTo(e){return e===this._master}get master(){return this._master}get type(){return l.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return\"\"}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:l.Types.JSON,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.String,value:JSON.stringify(t),rawValue:t}}get value(){return this.model.rawValue}set value(e){this.model.rawValue=e,this.model.value=JSON.stringify(e)}get type(){return l.Types.String}get effectiveType(){return l.Types.String}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:l.Types.SharedString,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.SharedString,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.SharedString}get effectiveType(){return l.Types.SharedString}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.RichText,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.String,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}toString(){return this.model.value.richText.map(e=>e.text).join(\"\")}get type(){return l.Types.RichText}get effectiveType(){return l.Types.RichText}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return`\"${this.text.replace(/\"/g,'\"\"')}\"`}release(){}}},{t:l.Types.Boolean,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Boolean,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.Boolean}get effectiveType(){return l.Types.Boolean}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.Error,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Error,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.Error}get effectiveType(){return l.Types.Error}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((e,t)=>(e[t.t]=t.f,e),[]),create(e,t,r){const n=this.types[e];if(!n)throw new Error(\"Could not create Value of type \"+e);return new n(t,r)}};t.exports=l},{\"../utils/col-cache\":19,\"../utils/shared-formula\":23,\"../utils/under-dash\":26,\"./enums\":7,\"./note\":9}],4:[function(e,t,r){\"use strict\";const n=e(\"../utils/under-dash\"),i=e(\"./enums\"),s=e(\"../utils/col-cache\");class o{constructor(e,t,r){this._worksheet=e,this._number=t,!1!==r&&(this.defn=r)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return void 0!==this.width&&9!==this.width}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(e){e?(this.key=e.key,this.width=void 0!==e.width?e.width:9,this.outlineLevel=e.outlineLevel,e.style?this.style=e.style:this.style={},this.header=e.header,this._hidden=!!e.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(e){void 0!==e?(this._header=e,this.headers.forEach((e,t)=>{this._worksheet.getCell(t+1,this.number).value=e})):this._header=void 0}get key(){return this._key}set key(e){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=e,e&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(e){return this.width===e.width&&this.hidden===e.hidden&&this.outlineLevel===e.outlineLevel&&n.isEqual(this.style,e.style)}get isDefault(){if(this.isCustomWidth)return!1;if(this.hidden)return!1;if(this.outlineLevel)return!1;const e=this.style;return!e||!(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection)}get headerCount(){return this.headers.length}eachCell(e,t){const r=this.number;t||(t=e,e=null),this._worksheet.eachRow(e,(e,n)=>{t(e.getCell(r),n)})}get values(){const e=[];return this.eachCell((t,r)=>{t&&t.type!==i.ValueType.Null&&(e[r]=t.value)}),e}set values(e){if(!e)return;const t=this.number;let r=0;e.hasOwnProperty(\"0\")&&(r=1),e.forEach((e,n)=>{this._worksheet.getCell(n+r,t).value=e})}_applyStyle(e,t){return this.style[e]=t,this.eachCell(r=>{r[e]=t}),t}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle(\"numFmt\",e)}get font(){return this.style.font}set font(e){this._applyStyle(\"font\",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle(\"alignment\",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle(\"protection\",e)}get border(){return this.style.border}set border(e){this._applyStyle(\"border\",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle(\"fill\",e)}static toModel(e){const t=[];let r=null;return e&&e.forEach((e,n)=>{e.isDefault?r&&(r=null):r&&e.equivalentTo(r)?r.max=n+1:(r={min:n+1,max:n+1,width:void 0!==e.width?e.width:9,style:e.style,isCustomWidth:e.isCustomWidth,hidden:e.hidden,outlineLevel:e.outlineLevel,collapsed:e.collapsed},t.push(r))}),t.length?t:void 0}static fromModel(e,t){const r=[];let n=1,i=0;for(t=(t=t||[]).sort((function(e,t){return e.min-t.min}));i{t.removeCellEx(e)})}forEach(e){n.each(this.matrixMap,(t,r)=>{t.forEach(t=>{e(r,t)})})}getNames(e){return this.getNamesEx(i.decodeEx(e))}getNamesEx(e){return n.map(this.matrixMap,(t,r)=>t.findCellEx(e)&&r).filter(Boolean)}_explore(e,t){t.mark=!1;const{sheetName:r}=t,n=new o(t.row,t.col,t.row,t.col,r);let i,s;function a(i,s){const o=e.findCellAt(r,i,t.col);return!(!o||!o.mark)&&(n[s]=i,o.mark=!1,!0)}for(s=t.row-1;a(s,\"top\");s--);for(s=t.row+1;a(s,\"bottom\");s++);function l(t,i){const o=[];for(s=n.top;s<=n.bottom;s++){const n=e.findCellAt(r,s,t);if(!n||!n.mark)return!1;o.push(n)}n[i]=t;for(let e=0;e{e.mark=!0});return{name:e,ranges:t.map(e=>e.mark&&this._explore(t,e)).filter(Boolean).map(e=>e.$shortRange)}}normaliseMatrix(e,t){e.forEachInSheet(t,(e,t,r)=>{e&&(e.row===t&&e.col===r||(e.row=t,e.col=r,e.address=i.n2l(r)+t))})}spliceRows(e,t,r,i){n.each(this.matrixMap,n=>{n.spliceRows(e,t,r,i),this.normaliseMatrix(n,e)})}spliceColumns(e,t,r,i){n.each(this.matrixMap,n=>{n.spliceColumns(e,t,r,i),this.normaliseMatrix(n,e)})}get model(){return n.map(this.matrixMap,(e,t)=>this.getRanges(t,e)).filter(e=>e.ranges.length)}set model(e){const t=this.matrixMap={};e.forEach(e=>{const r=t[e.name]=new s;e.ranges.forEach(e=>{a.test(e.split(\"!\").pop()||\"\")&&r.addCell(e)})})}}},{\"../utils/cell-matrix\":18,\"../utils/col-cache\":19,\"../utils/under-dash\":26,\"./range\":10}],7:[function(e,t,r){\"use strict\";t.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:\"#N/A\",Ref:\"#REF!\",Name:\"#NAME?\",DivZero:\"#DIV/0!\",Null:\"#NULL!\",Value:\"#VALUE!\",Num:\"#NUM!\"}}},{}],8:[function(e,t,r){\"use strict\";const n=e(\"../utils/col-cache\"),i=e(\"./anchor\");t.exports=class{constructor(e,t){this.worksheet=e,this.model=t}get model(){switch(this.type){case\"background\":return{type:this.type,imageId:this.imageId};case\"image\":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error(\"Invalid Image Type\")}}set model(e){let{type:t,imageId:r,range:s,hyperlinks:o}=e;if(this.type=t,this.imageId=r,\"image\"===t)if(\"string\"==typeof s){const e=n.decode(s);this.range={tl:new i(this.worksheet,{col:e.left,row:e.top},-1),br:new i(this.worksheet,{col:e.right,row:e.bottom},0),editAs:\"oneCell\"}}else this.range={tl:new i(this.worksheet,s.tl,0),br:s.br&&new i(this.worksheet,s.br,0),ext:s.ext,editAs:s.editAs,hyperlinks:o||s.hyperlinks}}}},{\"../utils/col-cache\":19,\"./anchor\":2}],9:[function(e,t,r){\"use strict\";const n=e(\"../utils/under-dash\");class i{constructor(e){this.note=e}get model(){let e=null;switch(typeof this.note){case\"string\":e={type:\"note\",note:{texts:[{text:this.note}]}};break;default:e={type:\"note\",note:this.note}}return n.deepMerge({},i.DEFAULT_CONFIGS,e)}set model(e){const{note:t}=e,{texts:r}=t;1===r.length&&1===Object.keys(r[0]).length?this.note=r[0].text:this.note=t}static fromModel(e){const t=new i;return t.model=e,t}}i.DEFAULT_CONFIGS={note:{margins:{insetmode:\"auto\",inset:[.13,.13,.25,.25]},protection:{locked:\"True\",lockText:\"True\"},editAs:\"absolute\"}},t.exports=i},{\"../utils/under-dash\":26}],10:[function(e,t,r){\"use strict\";const n=e(\"../utils/col-cache\");class i{constructor(){this.decode(arguments)}setTLBR(e,t,r,i,s){if(arguments.length<4){const i=n.decodeAddress(e),o=n.decodeAddress(t);this.model={top:Math.min(i.row,o.row),left:Math.min(i.col,o.col),bottom:Math.max(i.row,o.row),right:Math.max(i.col,o.col),sheetName:r},this.setTLBR(i.row,i.col,o.row,o.col,s)}else this.model={top:Math.min(e,r),left:Math.min(t,i),bottom:Math.max(e,r),right:Math.max(t,i),sheetName:s}}decode(e){switch(e.length){case 5:this.setTLBR(e[0],e[1],e[2],e[3],e[4]);break;case 4:this.setTLBR(e[0],e[1],e[2],e[3]);break;case 3:this.setTLBR(e[0],e[1],e[2]);break;case 2:this.setTLBR(e[0],e[1]);break;case 1:{const t=e[0];if(t instanceof i)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{const e=n.decodeEx(t);e.top?this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName}:this.model={top:e.row,left:e.col,bottom:e.row,right:e.col,sheetName:e.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error(\"Invalid number of arguments to _getDimensions() - \"+e.length)}}get top(){return this.model.top||1}set top(e){this.model.top=e}get left(){return this.model.left||1}set left(e){this.model.left=e}get bottom(){return this.model.bottom||1}set bottom(e){this.model.bottom=e}get right(){return this.model.right||1}set right(e){this.model.right=e}get sheetName(){return this.model.sheetName}set sheetName(e){this.model.sheetName=e}get _serialisedSheetName(){const{sheetName:e}=this.model;return e?/^[a-zA-Z0-9]*$/.test(e)?e+\"!\":`'${e}'!`:\"\"}expand(e,t,r,n){(!this.model.top||ethis.bottom)&&(this.bottom=r),(!this.model.right||n>this.right)&&(this.right=n)}expandRow(e){if(e){const{dimensions:t,number:r}=e;t&&this.expand(r,t.min,r,t.max)}}expandToAddress(e){const t=n.decodeEx(e);this.expand(t.row,t.col,t.row,t.col)}get tl(){return n.n2l(this.left)+this.top}get $t$l(){return`$${n.n2l(this.left)}$${this.top}`}get br(){return n.n2l(this.right)+this.bottom}get $b$r(){return`$${n.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(e){return(!e.sheetName||!this.sheetName||e.sheetName===this.sheetName)&&(!(e.bottomthis.bottom)&&(!(e.rightthis.right))))}contains(e){const t=n.decodeEx(e);return this.containsEx(t)}containsEx(e){return(!e.sheetName||!this.sheetName||e.sheetName===this.sheetName)&&(e.row>=this.top&&e.row<=this.bottom&&e.col>=this.left&&e.col<=this.right)}forEachAddress(e){for(let t=this.left;t<=this.right;t++)for(let r=this.top;r<=this.bottom;r++)e(n.encodeAddress(r,t),r,t)}}t.exports=i},{\"../utils/col-cache\":19}],11:[function(e,t,r){\"use strict\";const n=e(\"../utils/under-dash\"),i=e(\"./enums\"),s=e(\"../utils/col-cache\"),o=e(\"./cell\");t.exports=class{constructor(e,t){this._worksheet=e,this._number=t,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(e){return this._cells[e-1]}getCellEx(e){let t=this._cells[e.col-1];if(!t){const r=this._worksheet.getColumn(e.col);t=new o(this,r,e.address),this._cells[e.col-1]=t}return t}getCell(e){if(\"string\"==typeof e){const t=this._worksheet.getColumnKey(e);e=t?t.number:s.l2n(e)}return this._cells[e-1]||this.getCellEx({address:s.encodeAddress(this._number,e),row:this._number,col:e})}splice(e,t){const r=e+t;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s0)for(l=a;l>=r;l--)c=this._cells[l-1],c?(u=this.getCell(l+o),u.value=c.value,u.style=c.style,u._comment=c._comment):this._cells[l+o-1]=void 0;for(l=0;l{e&&e.type!==i.ValueType.Null&&t(e,r+1)})}addPageBreak(e,t){const r=this._worksheet,n=Math.max(0,e-1)||0,i=Math.max(0,t-1)||16838,s={id:this._number,max:i,man:1};n&&(s.min=n),r.rowBreaks.push(s)}get values(){const e=[];return this._cells.forEach(t=>{t&&t.type!==i.ValueType.Null&&(e[t.col]=t.value)}),e}set values(e){if(this._cells=[],e)if(e instanceof Array){let t=0;e.hasOwnProperty(\"0\")&&(t=1),e.forEach((e,r)=>{void 0!==e&&(this.getCellEx({address:s.encodeAddress(this._number,r+t),row:this._number,col:r+t}).value=e)})}else this._worksheet.eachColumnKey((t,r)=>{void 0!==e[r]&&(this.getCellEx({address:s.encodeAddress(this._number,t.number),row:this._number,col:t.number}).value=e[r])});else;}get hasValues(){return n.some(this._cells,e=>e&&e.type!==i.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let e=0;return this.eachCell(()=>{e++}),e}get dimensions(){let e=0,t=0;return this._cells.forEach(r=>{r&&r.type!==i.ValueType.Null&&((!e||e>r.col)&&(e=r.col),t0?{min:e,max:t}:null}_applyStyle(e,t){return this.style[e]=t,this._cells.forEach(r=>{r&&(r[e]=t)}),t}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle(\"numFmt\",e)}get font(){return this.style.font}set font(e){this._applyStyle(\"font\",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle(\"alignment\",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle(\"protection\",e)}get border(){return this.style.border}set border(e){this._applyStyle(\"border\",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle(\"fill\",e)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const e=[];let t=0,r=0;return this._cells.forEach(n=>{if(n){const i=n.model;i&&((!t||t>n.col)&&(t=n.col),r{switch(e.type){case o.Types.Merge:break;default:{let r;if(e.address)r=s.decodeAddress(e.address);else if(t){const{row:e}=t,n=t.col+1;r={row:e,col:n,address:s.encodeAddress(e,n),$col$row:`$${s.n2l(n)}$${e}`}}t=r;this.getCellEx(r).model=e;break}}}),e.height?this.height=e.height:delete this.height,this.hidden=e.hidden,this.outlineLevel=e.outlineLevel||0,this.style=e.style&&JSON.parse(JSON.stringify(e.style))||{}}}},{\"../utils/col-cache\":19,\"../utils/under-dash\":26,\"./cell\":3,\"./enums\":7}],12:[function(e,t,r){\"use strict\";const n=e(\"../utils/col-cache\");class i{constructor(e,t,r){this.table=e,this.column=t,this.index=r}_set(e,t){this.table.cacheState(),this.column[e]=t}get name(){return this.column.name}set name(e){this._set(\"name\",e)}get filterButton(){return this.column.filterButton}set filterButton(e){this.column.filterButton=e}get style(){return this.column.style}set style(e){this.column.style=e}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(e){this._set(\"totalsRowLabel\",e)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(e){this._set(\"totalsRowFunction\",e)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(e){this._set(\"totalsRowResult\",e)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(e){this._set(\"totalsRowFormula\",e)}}t.exports=class{constructor(e,t){this.worksheet=e,t&&(this.table=t,this.validate(),this.store())}getFormula(e){switch(e.totalsRowFunction){case\"none\":return null;case\"average\":return`SUBTOTAL(101,${this.table.name}[${e.name}])`;case\"countNums\":return`SUBTOTAL(102,${this.table.name}[${e.name}])`;case\"count\":return`SUBTOTAL(103,${this.table.name}[${e.name}])`;case\"max\":return`SUBTOTAL(104,${this.table.name}[${e.name}])`;case\"min\":return`SUBTOTAL(105,${this.table.name}[${e.name}])`;case\"stdDev\":return`SUBTOTAL(106,${this.table.name}[${e.name}])`;case\"var\":return`SUBTOTAL(107,${this.table.name}[${e.name}])`;case\"sum\":return`SUBTOTAL(109,${this.table.name}[${e.name}])`;case\"custom\":return e.totalsRowFormula;default:throw new Error(\"Invalid Totals Row Function: \"+e.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:e}=this,t=(e,t,r)=>{void 0===e[t]&&(e[t]=r)};t(e,\"headerRow\",!0),t(e,\"totalsRow\",!1),t(e,\"style\",{}),t(e.style,\"theme\",\"TableStyleMedium2\"),t(e.style,\"showFirstColumn\",!1),t(e.style,\"showLastColumn\",!1),t(e.style,\"showRowStripes\",!1),t(e.style,\"showColumnStripes\",!1);const r=(e,t)=>{if(!e)throw new Error(t)};r(e.ref,\"Table must have ref\"),r(e.columns,\"Table must have column definitions\"),r(e.rows,\"Table must have row definitions\"),e.tl=n.decodeAddress(e.ref);const{row:i,col:s}=e.tl;r(i>0,\"Table must be on valid row\"),r(s>0,\"Table must be on valid col\");const{width:o,filterHeight:a,tableHeight:l}=this;e.autoFilterRef=n.encode(i,s,i+a-1,s+o-1),e.tableRef=n.encode(i,s,i+l-1,s+o-1),e.columns.forEach((e,n)=>{r(e.name,`Column ${n} must have a name`),0===n?t(e,\"totalsRowLabel\",\"Total\"):(t(e,\"totalsRowFunction\",\"none\"),e.totalsRowFormula=this.getFormula(e))})}store(){const e=(e,t)=>{t&&Object.keys(t).forEach(r=>{e[r]=t[r]})},{worksheet:t,table:r}=this,{row:n,col:i}=r.tl;let s=0;if(r.headerRow){const o=t.getRow(n+s++);r.columns.forEach((t,r)=>{const{style:n,name:s}=t,a=o.getCell(i+r);a.value=s,e(a,n)})}if(r.rows.forEach(o=>{const a=t.getRow(n+s++);o.forEach((t,n)=>{const s=a.getCell(i+n);s.value=t,e(s,r.columns[n].style)})}),r.totalsRow){const o=t.getRow(n+s++);r.columns.forEach((t,r)=>{const n=o.getCell(i+r);if(0===r)n.value=t.totalsRowLabel;else{const e=this.getFormula(t);n.value=e?{formula:t.totalsRowFormula,result:t.totalsRowResult}:null}e(n,t.style)})}}load(e){const{table:t}=this,{row:r,col:n}=t.tl;let i=0;if(t.headerRow){const s=e.getRow(r+i++);t.columns.forEach((e,t)=>{s.getCell(n+t).value=e.name})}if(t.rows.forEach(t=>{const s=e.getRow(r+i++);t.forEach((e,t)=>{s.getCell(n+t).value=e})}),t.totalsRow){const s=e.getRow(r+i++);t.columns.forEach((e,t)=>{const r=s.getCell(n+t);if(0===t)r.value=e.totalsRowLabel;else{this.getFormula(e)&&(r.value={formula:e.totalsRowFormula,result:e.totalsRowResult})}})}}get model(){return this.table}set model(e){this.table=e}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const e=n.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.rows.splice(e,t)}getColumn(e){const t=this.table.columns[e];return new i(this,t,e)}addColumn(e,t,r){this.cacheState(),void 0===r?(this.table.columns.push(e),this.table.rows.forEach((e,r)=>{e.push(t[r])})):(this.table.columns.splice(r,0,e),this.table.rows.forEach((e,n)=>{e.splice(r,0,t[n])}))}removeColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.columns.splice(e,t),this.table.rows.forEach(r=>{r.splice(e,t)})}_assign(e,t,r){this.cacheState(),e[t]=r}get ref(){return this.table.ref}set ref(e){this._assign(this.table,\"ref\",e)}get name(){return this.table.name}set name(e){this.table.name=e}get displayName(){return this.table.displyName||this.table.name}set displayNamename(e){this.table.displayName=e}get headerRow(){return this.table.headerRow}set headerRow(e){this._assign(this.table,\"headerRow\",e)}get totalsRow(){return this.table.totalsRow}set totalsRow(e){this._assign(this.table,\"totalsRow\",e)}get theme(){return this.table.style.name}set theme(e){this.table.style.name=e}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(e){this.table.style.showFirstColumn=e}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(e){this.table.style.showLastColumn=e}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(e){this.table.style.showRowStripes=e}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(e){this.table.style.showColumnStripes=e}}},{\"../utils/col-cache\":19}],13:[function(e,t,r){\"use strict\";const n=e(\"./worksheet\"),i=e(\"./defined-names\"),s=e(\"../xlsx/xlsx\"),o=e(\"../csv/csv\");t.exports=class{constructor(){this.category=\"\",this.company=\"\",this.created=new Date,this.description=\"\",this.keywords=\"\",this.manager=\"\",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject=\"\",this.title=\"\",this.views=[],this.media=[],this._definedNames=new i}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new o(this)),this._csv}get nextId(){for(let e=1;e(t&&t.orderNo)>e?t.orderNo:e,0),s=Object.assign({},t,{id:r,name:e,orderNo:i+1,workbook:this}),o=new n(s);return this._worksheets[r]=o,o}removeWorksheetEx(e){delete this._worksheets[e.id]}removeWorksheet(e){const t=this.getWorksheet(e);t&&t.destroy()}getWorksheet(e){return void 0===e?this._worksheets.find(Boolean):\"number\"==typeof e?this._worksheets[e]:\"string\"==typeof e?this._worksheets.find(t=>t&&t.name===e):void 0}get worksheets(){return this._worksheets.slice(1).sort((e,t)=>e.orderNo-t.orderNo).filter(Boolean)}eachSheet(e){this.worksheets.forEach(t=>{e(t,t.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(e){const t=this.media.length;return this.media.push(Object.assign({},e,{type:\"image\"})),t}getImage(e){return this.media[e]}get model(){return{creator:this.creator||\"Unknown\",lastModifiedBy:this.lastModifiedBy||\"Unknown\",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(e=>e.model),sheets:this.worksheets.map(e=>e.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(e){this.creator=e.creator,this.lastModifiedBy=e.lastModifiedBy,this.lastPrinted=e.lastPrinted,this.created=e.created,this.modified=e.modified,this.company=e.company,this.manager=e.manager,this.title=e.title,this.subject=e.subject,this.keywords=e.keywords,this.category=e.category,this.description=e.description,this.language=e.language,this.revision=e.revision,this.contentStatus=e.contentStatus,this.properties=e.properties,this.calcProperties=e.calcProperties,this._worksheets=[],e.worksheets.forEach(t=>{const{id:r,name:i,state:s}=t,o=e.sheets&&e.sheets.findIndex(e=>e.id===r);(this._worksheets[r]=new n({id:r,name:i,orderNo:o,state:s,workbook:this})).model=t}),this._definedNames.model=e.definedNames,this.views=e.views,this._themes=e.themes,this.media=e.media||[]}}},{\"../csv/csv\":1,\"../xlsx/xlsx\":144,\"./defined-names\":6,\"./worksheet\":14}],14:[function(e,t,r){\"use strict\";const n=e(\"../utils/under-dash\"),i=e(\"../utils/col-cache\"),s=e(\"./range\"),o=e(\"./row\"),a=e(\"./column\"),l=e(\"./enums\"),c=e(\"./image\"),u=e(\"./table\"),h=e(\"./data-validations\"),f=e(\"../utils/encryptor\"),{copyStyle:d}=e(\"../utils/copy-style\");t.exports=class{constructor(e){e=e||{},this._workbook=e.workbook,this.id=e.id,this.orderNo=e.orderNo,this.name=e.name,this.state=e.state||\"visible\",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},e.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:\"portrait\",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!e.pageSetup||!e.pageSetup.fitToWidth&&!e.pageSetup.fitToHeight||e.pageSetup.scale),pageOrder:\"downThenOver\",blackAndWhite:!1,draft:!1,cellComments:\"None\",errors:\"displayed\",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},e.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},e.headerFooter),this.dataValidations=new h,this.views=e.views||[],this.autoFilter=e.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(e){if(void 0===e&&(e=\"sheet\"+this.id),this._name!==e){if(\"string\"!=typeof e)throw new Error(\"The name has to be a string.\");if(\"\"===e)throw new Error(\"The name can't be empty.\");if(\"History\"===e)throw new Error('The name \"History\" is protected. Please use a different name.');if(/[*?:/\\\\[\\]]/.test(e))throw new Error(`Worksheet name ${e} cannot include any of the following characters: * ? : \\\\ / [ ]`);if(/(^')|('$)/.test(e))throw new Error(\"The first or last character of worksheet name cannot be a single quotation mark: \"+e);if(e&&e.length>31&&(console.warn(`Worksheet name ${e} exceeds 31 chars. This will be truncated`),e=e.substring(0,31)),this._workbook._worksheets.find(t=>t&&t.name.toLowerCase()===e.toLowerCase()))throw new Error(\"Worksheet name already exists: \"+e);this._name=e}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const e=new s;return this._rows.forEach(t=>{if(t){const r=t.dimensions;r&&e.expand(t.number,r.min,t.number,r.max)}}),e}get columns(){return this._columns}set columns(e){this._headerRowCount=e.reduce((e,t)=>{const r=(t.header?1:t.headers&&t.headers.length)||0;return Math.max(e,r)},0);let t=1;const r=this._columns=[];e.forEach(e=>{const n=new a(this,t++,!1);r.push(n),n.defn=e})}getColumnKey(e){return this._keys[e]}setColumnKey(e,t){this._keys[e]=t}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){n.each(this._keys,e)}getColumn(e){if(\"string\"==typeof e){const t=this._keys[e];if(t)return t;e=i.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let t=this._columns.length+1;for(;t<=e;)this._columns.push(new a(this,t++))}return this._columns[e-1]}spliceColumns(e,t){const r=this._rows.length;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s0)for(let n=0;n{r.push(e[n]||null)});const s=this.getRow(n+1);s.splice.apply(s,r)}else this._rows.forEach(r=>{r&&r.splice(e,t)});const o=i.length-t,a=e+t,l=this._columns.length;if(o<0)for(let t=e+i.length;t<=l;t++)this.getColumn(t).defn=this.getColumn(t-o).defn;else if(o>0)for(let e=l;e>=a;e--)this.getColumn(e+o).defn=this.getColumn(e).defn;for(let t=e;t{e=Math.max(e,t.cellCount)}),e}get actualColumnCount(){const e=[];let t=0;return this.eachRow(r=>{r.eachCell(r=>{let{col:n}=r;e[n]||(e[n]=!0,t++)})}),t}_commitRow(){}get _lastRowNumber(){const e=this._rows;let t=e.length;for(;t>0&&void 0===e[t-1];)t--;return t}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(e){return this._rows[e-1]}findRows(e,t){return this._rows.slice(e-1,e-1+t)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let e=0;return this.eachRow(()=>{e++}),e}getRow(e){let t=this._rows[e-1];return t||(t=this._rows[e-1]=new o(this,e)),t}getRows(e,t){if(t<1)return;const r=[];for(let n=e;n1&&void 0!==arguments[1]?arguments[1]:\"n\";const r=this._nextRow,n=this.getRow(r);return n.values=e,this._setStyleOption(r,\"i\"===t[0]?t:\"n\"),n}addRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"n\";const r=[];return e.forEach(e=>{r.push(this.addRow(e,t))}),r}insertRow(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"n\";return this.spliceRows(e,0,t),this._setStyleOption(e,r),this.getRow(e)}insertRows(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"n\";if(this.spliceRows(e,0,...t),\"n\"!==r)for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:\"n\";\"o\"===t[0]&&void 0!==this.findRow(e+1)?this._copyStyle(e+1,e,\"+\"===t[1]):\"i\"===t[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e,\"+\"===t[1])}_copyStyle(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.getRow(e),i=this.getRow(t);i.style=d(n.style),n.eachCell({includeEmpty:r},(e,t)=>{i.getCell(t).style=d(e.style)}),i.height=n.height}duplicateRow(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this._rows[e-1],i=new Array(t).fill(n.values);this.spliceRows(e+1,r?0:t,...i);for(let r=0;r{t.getCell(r).style=e.style})}}spliceRows(e,t){const r=e+t;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s{e.getCell(r).style=t.style}),this._rows[c-1]=void 0}else this._rows[c+a-1]=void 0;else if(a>0)for(c=l;c>=r;c--)if(u=this._rows[c-1],u){const e=this.getRow(c+a);e.values=u.values,e.style=u.style,e.height=u.height,u.eachCell({includeEmpty:!0},(t,r)=>{if(e.getCell(r).style=t.style,\"MergeValue\"===t._value.constructor.name){const e=this.getRow(t._row._number+o).getCell(r),n=t._value._master,i=this.getRow(n._row._number+o).getCell(n._column._number);e.merge(i)}})}else this._rows[c+a-1]=void 0;for(c=0;c{e&&e.hasValues&&t(e,e.number)})}getSheetValues(){const e=[];return this._rows.forEach(t=>{t&&(e[t.number]=t.values)}),e}findCell(e,t){const r=i.getAddress(e,t),n=this._rows[r.row-1];return n?n.findCell(r.col):void 0}getCell(e,t){const r=i.getAddress(e,t);return this.getRow(r.row).getCellEx(r)}mergeCells(){for(var e=arguments.length,t=new Array(e),r=0;r{if(t.intersects(e))throw new Error(\"Cannot merge already merged cells\")});const r=this.getCell(e.top,e.left);for(let n=e.top;n<=e.bottom;n++)for(let i=e.left;i<=e.right;i++)(n>e.top||i>e.left)&&this.getCell(n,i).merge(r,t);this._merges[r.address]=e}_unMergeMaster(e){const t=this._merges[e.address];if(t){for(let e=t.top;e<=t.bottom;e++)for(let r=t.left;r<=t.right;r++)this.getCell(e,r).unmerge();delete this._merges[e.address]}}get hasMerges(){return n.some(this._merges,Boolean)}unMergeCells(){for(var e=arguments.length,t=new Array(e),r=0;r3&&void 0!==arguments[3]?arguments[3]:\"shared\";const s=i.decode(e),{top:o,left:a,bottom:l,right:c}=s,u=c-a+1,h=i.encodeAddress(o,a),f=\"shared\"===n;let d;d=\"function\"==typeof r?r:Array.isArray(r)?Array.isArray(r[0])?(e,t)=>r[e-o][t-a]:(e,t)=>r[(e-o)*u+(t-a)]:()=>{};let p=!0;for(let r=o;r<=l;r++)for(let i=a;i<=c;i++)p?(this.getCell(r,i).value={shareType:n,formula:t,ref:e,result:d(r,i)},p=!1):this.getCell(r,i).value=f?{sharedFormula:h,result:d(r,i)}:d(r,i)}addImage(e,t){const r={type:\"image\",imageId:e,range:t};this._media.push(new c(this,r))}getImages(){return this._media.filter(e=>\"image\"===e.type)}addBackgroundImage(e){const t={type:\"background\",imageId:e};this._media.push(new c(this,t))}getBackgroundImageId(){const e=this._media.find(e=>\"background\"===e.type);return e&&e.imageId}protect(e,t){return new Promise(r=>{this.sheetProtection={sheet:!0},t&&\"spinCount\"in t&&(t.spinCount=Number.isFinite(t.spinCount)?Math.round(Math.max(0,t.spinCount)):1e5),e&&(this.sheetProtection.algorithmName=\"SHA-512\",this.sheetProtection.saltValue=f.randomBytes(16).toString(\"base64\"),this.sheetProtection.spinCount=t&&\"spinCount\"in t?t.spinCount:1e5,this.sheetProtection.hashValue=f.convertPasswordToHash(e,\"SHA512\",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),t&&(this.sheetProtection=Object.assign(this.sheetProtection,t),!e&&\"spinCount\"in t&&delete this.sheetProtection.spinCount),r()})}unprotect(){this.sheetProtection=null}addTable(e){const t=new u(this,e);return this.tables[e.name]=t,t}getTable(e){return this.tables[e]}removeTable(e){delete this.tables[e]}getTables(){return Object.values(this.tables)}addConditionalFormatting(e){this.conditionalFormattings.push(e)}removeConditionalFormatting(e){\"number\"==typeof e?this.conditionalFormattings.splice(e,1):this.conditionalFormattings=e instanceof Function?this.conditionalFormattings.filter(e):[]}get tabColor(){return console.trace(\"worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor\"),this.properties.tabColor}set tabColor(e){console.trace(\"worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor\"),this.properties.tabColor=e}get model(){const e={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(e=>e.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(e=>e.model),conditionalFormattings:this.conditionalFormattings};e.cols=a.toModel(this.columns);const t=e.rows=[],r=e.dimensions=new s;return this._rows.forEach(e=>{const n=e&&e.model;n&&(r.expand(n.number,n.min,n.number,n.max),t.push(n))}),e.merges=[],n.each(this._merges,t=>{e.merges.push(t.range)}),e}_parseRows(e){this._rows=[],e.rows.forEach(e=>{const t=new o(this,e.number);this._rows[t.number-1]=t,t.model=e})}_parseMergeCells(e){n.each(e.mergeCells,e=>{this.mergeCellsWithoutStyle(e)})}set model(e){this.name=e.name,this._columns=a.fromModel(this,e.cols),this._parseRows(e),this._parseMergeCells(e),this.dataValidations=new h(e.dataValidations),this.properties=e.properties,this.pageSetup=e.pageSetup,this.headerFooter=e.headerFooter,this.views=e.views,this.autoFilter=e.autoFilter,this._media=e.media.map(e=>new c(this,e)),this.sheetProtection=e.sheetProtection,this.tables=e.tables.reduce((e,t)=>{const r=new u;return r.model=t,e[t.name]=r,e},{}),this.conditionalFormattings=e.conditionalFormattings}}},{\"../utils/col-cache\":19,\"../utils/copy-style\":20,\"../utils/encryptor\":21,\"../utils/under-dash\":26,\"./column\":4,\"./data-validations\":5,\"./enums\":7,\"./image\":8,\"./range\":10,\"./row\":11,\"./table\":12}],15:[function(e,t,r){\"use strict\";e(\"core-js/modules/es.promise\"),e(\"core-js/modules/es.promise.finally\"),e(\"core-js/modules/es.object.assign\"),e(\"core-js/modules/es.object.keys\"),e(\"core-js/modules/es.object.values\"),e(\"core-js/modules/es.symbol\"),e(\"core-js/modules/es.symbol.async-iterator\"),e(\"core-js/modules/es.array.iterator\"),e(\"core-js/modules/es.array.includes\"),e(\"core-js/modules/es.array.find-index\"),e(\"core-js/modules/es.array.find\"),e(\"core-js/modules/es.string.from-code-point\"),e(\"core-js/modules/es.string.includes\"),e(\"core-js/modules/es.number.is-nan\"),e(\"regenerator-runtime/runtime\");const n={Workbook:e(\"./doc/workbook\")},i=e(\"./doc/enums\");Object.keys(i).forEach(e=>{n[e]=i[e]}),t.exports=n},{\"./doc/enums\":7,\"./doc/workbook\":13,\"core-js/modules/es.array.find\":359,\"core-js/modules/es.array.find-index\":358,\"core-js/modules/es.array.includes\":360,\"core-js/modules/es.array.iterator\":361,\"core-js/modules/es.number.is-nan\":363,\"core-js/modules/es.object.assign\":364,\"core-js/modules/es.object.keys\":366,\"core-js/modules/es.object.values\":367,\"core-js/modules/es.promise\":372,\"core-js/modules/es.promise.finally\":371,\"core-js/modules/es.string.from-code-point\":376,\"core-js/modules/es.string.includes\":377,\"core-js/modules/es.symbol\":381,\"core-js/modules/es.symbol.async-iterator\":378,\"regenerator-runtime/runtime\":492}],16:[function(e,t,r){\"use strict\";const n=\"undefined\"==typeof TextDecoder?null:new TextDecoder(\"utf-8\");r.bufferToString=function(e){return\"string\"==typeof e?e:n?n.decode(e):e.toString()}},{}],17:[function(e,t,r){\"use strict\";const n=\"undefined\"==typeof TextEncoder?null:new TextEncoder(\"utf-8\"),{Buffer:i}=e(\"buffer\");r.stringToBuffer=function(e){return\"string\"!=typeof e?e:n?i.from(n.encode(e).buffer):i.from(e)}},{buffer:220}],18:[function(e,t,r){\"use strict\";const n=e(\"./under-dash\"),i=e(\"./col-cache\");t.exports=class{constructor(e){this.template=e,this.sheets={}}addCell(e){this.addCellEx(i.decodeEx(e))}getCell(e){return this.findCellEx(i.decodeEx(e),!0)}findCell(e){return this.findCellEx(i.decodeEx(e),!1)}findCellAt(e,t,r){const n=this.sheets[e],i=n&&n[t];return i&&i[r]}addCellEx(e){if(e.top)for(let t=e.top;t<=e.bottom;t++)for(let r=e.left;r<=e.right;r++)this.getCellAt(e.sheetName,t,r);else this.findCellEx(e,!0)}getCellEx(e){return this.findCellEx(e,!0)}findCellEx(e,t){const r=this.findSheet(e,t),n=this.findSheetRow(r,e,t);return this.findRowCell(n,e,t)}getCellAt(e,t,r){const n=this.sheets[e]||(this.sheets[e]=[]),s=n[t]||(n[t]=[]);return s[r]||(s[r]={sheetName:e,address:i.n2l(r)+t,row:t,col:r})}removeCellEx(e){const t=this.findSheet(e);if(!t)return;const r=this.findSheetRow(t,e);r&&delete r[e.col]}forEachInSheet(e,t){const r=this.sheets[e];r&&r.forEach((e,r)=>{e&&e.forEach((e,n)=>{e&&t(e,r,n)})})}forEach(e){n.each(this.sheets,(t,r)=>{this.forEachInSheet(r,e)})}map(e){const t=[];return this.forEach(r=>{t.push(e(r))}),t}findSheet(e,t){const r=e.sheetName;return this.sheets[r]?this.sheets[r]:t?this.sheets[r]=[]:void 0}findSheetRow(e,t,r){const{row:n}=t;return e&&e[n]?e[n]:r?e[n]=[]:void 0}findRowCell(e,t,r){const{col:n}=t;return e&&e[n]?e[n]:r?e[n]=this.template?Object.assign(t,JSON.parse(JSON.stringify(this.template))):t:void 0}spliceRows(e,t,r,n){const i=this.sheets[e];if(i){const e=[];for(let t=0;t{n.splice(t,r,...e)})}}}},{\"./col-cache\":19,\"./under-dash\":26}],19:[function(e,t,r){\"use strict\";const n=/^[A-Z]+\\d+$/,i={_dictionary:[\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\"],_l2nFill:0,_l2n:{},_n2l:[],_level:e=>e<=26?1:e<=676?2:3,_fill(e){let t,r,n,i,s,o=1;if(e>=4)throw new Error(\"Out of bounds. Excel supports columns from 1 to 16384\");if(this._l2nFill<1&&e>=1){for(;o<=26;)t=this._dictionary[o-1],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=1}if(this._l2nFill<2&&e>=2){for(o=27;o<=702;)r=o-27,n=r%26,i=Math.floor(r/26),t=this._dictionary[i]+this._dictionary[n],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=2}if(this._l2nFill<3&&e>=3){for(o=703;o<=16384;)r=o-703,n=r%26,i=Math.floor(r/26)%26,s=Math.floor(r/676),t=this._dictionary[s]+this._dictionary[i]+this._dictionary[n],this._n2l[o]=t,this._l2n[t]=o,o++;this._l2nFill=3}},l2n(e){if(this._l2n[e]||this._fill(e.length),!this._l2n[e])throw new Error(\"Out of bounds. Invalid column letter: \"+e);return this._l2n[e]},n2l(e){if(e<1||e>16384)throw new Error(e+\" is out of bounds. Excel supports columns from 1 to 16384\");return this._n2l[e]||this._fill(this._level(e)),this._n2l[e]},_hash:{},validateAddress(e){if(!n.test(e))throw new Error(\"Invalid Address: \"+e);return!0},decodeAddress(e){const t=e.length<5&&this._hash[e];if(t)return t;let r=!1,n=\"\",i=0,s=!1,o=\"\",a=0;for(let t,l=0;l=65&&t<=90)r=!0,n+=e[l],i=26*i+t-64;else if(t>=48&&t<=57)s=!0,o+=e[l],a=10*a+t-48;else if(s&&r&&36!==t)break;if(r){if(i>16384)throw new Error(\"Out of bounds. Invalid column letter: \"+n)}else i=void 0;s||(a=void 0);const l={address:e=n+o,col:i,row:a,$col$row:`$${n}$${o}`};return i<=100&&a<=100&&(this._hash[e]=l,this._hash[l.$col$row]=l),l},getAddress(e,t){if(t){const r=this.n2l(t)+e;return this.decodeAddress(r)}return this.decodeAddress(e)},decode(e){const t=e.split(\":\");if(2===t.length){const e=this.decodeAddress(t[0]),r=this.decodeAddress(t[1]),n={top:Math.min(e.row,r.row),left:Math.min(e.col,r.col),bottom:Math.max(e.row,r.row),right:Math.max(e.col,r.col)};return n.tl=this.n2l(n.left)+n.top,n.br=this.n2l(n.right)+n.bottom,n.dimensions=`${n.tl}:${n.br}`,n}return this.decodeAddress(e)},decodeEx(e){const t=e.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=t[1]||t[2],n=t[3],i=n.split(\":\");if(i.length>1){let e=this.decodeAddress(i[0]),t=this.decodeAddress(i[1]);const n=Math.min(e.row,t.row),s=Math.min(e.col,t.col),o=Math.max(e.row,t.row),a=Math.max(e.col,t.col);return e=this.n2l(s)+n,t=this.n2l(a)+o,{top:n,left:s,bottom:o,right:a,sheetName:r,tl:{address:e,col:s,row:n,$col$row:`$${this.n2l(s)}$${n}`,sheetName:r},br:{address:t,col:a,row:o,$col$row:`$${this.n2l(a)}$${o}`,sheetName:r},dimensions:`${e}:${t}`}}if(n.startsWith(\"#\"))return r?{sheetName:r,error:n}:{error:n};const s=this.decodeAddress(n);return r?{sheetName:r,...s}:s},encodeAddress:(e,t)=>i.n2l(t)+e,encode(){switch(arguments.length){case 2:return i.encodeAddress(arguments[0],arguments[1]);case 4:return`${i.encodeAddress(arguments[0],arguments[1])}:${i.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error(\"Can only encode with 2 or 4 arguments\")}},inRange(e,t){const[r,n,,i,s]=e,[o,a]=t;return o>=r&&o<=i&&a>=n&&a<=s}};t.exports=i},{}],20:[function(e,t,r){\"use strict\";const n=(e,t)=>({...e,...t.reduce((t,r)=>(e[r]&&(t[r]={...e[r]}),t),{})}),i=function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e[r]&&(t[r]=n(e[r],i))};r.copyStyle=e=>{if(!e)return e;if(t=e,0===Object.keys(t).length)return{};var t;const r={...e};return i(e,r,\"font\",[\"color\"]),i(e,r,\"alignment\"),i(e,r,\"protection\"),e.border&&(i(e,r,\"border\"),i(e.border,r.border,\"top\",[\"color\"]),i(e.border,r.border,\"left\",[\"color\"]),i(e.border,r.border,\"bottom\",[\"color\"]),i(e.border,r.border,\"right\",[\"color\"]),i(e.border,r.border,\"diagonal\",[\"color\"])),e.fill&&(i(e,r,\"fill\",[\"fgColor\",\"bgColor\",\"center\"]),e.fill.stops&&(r.fill.stops=e.fill.stops.map(e=>n(e,[\"color\"])))),r}},{}],21:[function(e,t,r){(function(r){(function(){\"use strict\";const n=e(\"crypto\"),i={hash(e){const t=n.createHash(e);for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;on.randomBytes(e)};t.exports=i}).call(this)}).call(this,e(\"buffer\").Buffer)},{buffer:220,crypto:390}],22:[function(e,t,r){\"use strict\";const{SaxesParser:n}=e(\"saxes\"),{PassThrough:i}=e(\"readable-stream\"),{bufferToString:s}=e(\"./browser-buffer-decode\");t.exports=async function*(e){e.pipe&&!e[Symbol.asyncIterator]&&(e=e.pipe(new i));const t=new n;let r;t.on(\"error\",e=>{r=e});let o=[];t.on(\"opentag\",e=>o.push({eventType:\"opentag\",value:e})),t.on(\"text\",e=>o.push({eventType:\"text\",value:e})),t.on(\"closetag\",e=>o.push({eventType:\"closetag\",value:e}));for await(const n of e){if(t.write(s(n)),r)throw r;yield o,o=[]}}},{\"./browser-buffer-decode\":16,\"readable-stream\":491,saxes:496}],23:[function(e,t,r){\"use strict\";const n=e(\"./col-cache\"),i=/(([a-z_\\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;t.exports={slideFormula:function(e,t,r){const o=n.decode(t),a=n.decode(r);return e.replace(i,(e,t,r,i,l)=>{if(l)return e;const c=s.exec(i);if(c){const r=c[1],i=c[2].toUpperCase(),s=c[3],l=c[4];if(i.length>3||3===i.length&&i>\"XFD\")return e;let u=n.l2n(i),h=parseInt(l,10);r||(u+=a.col-o.col),s||(h+=a.row-o.row);return(t||\"\")+(r||\"\")+n.n2l(u)+(s||\"\")+h}return e})}}},{\"./col-cache\":19}],24:[function(e,t,r){(function(r,n){(function(){\"use strict\";const i=e(\"readable-stream\"),s=e(\"./utils\"),o=e(\"./string-buf\");class a{constructor(e,t){this._data=e,this._encoding=t}get length(){return this.toBuffer().length}copy(e,t,r,n){return this.toBuffer().copy(e,t,r,n)}toBuffer(){return this._buffer||(this._buffer=n.from(this._data,this._encoding)),this._buffer}}class l{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,r,n){return this._data._buf.copy(e,t,r,n)}toBuffer(){return this._data.toBuffer()}}class c{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,r,n){this._data.copy(e,t,r,n)}toBuffer(){return this._data}}class u{constructor(e){this.size=e,this.buffer=n.alloc(e),this.iRead=0,this.iWrite=0}toBuffer(){if(0===this.iRead&&this.iWrite===this.size)return this.buffer;const e=n.alloc(this.iWrite-this.iRead);return this.buffer.copy(e,0,this.iRead,this.iWrite),e}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(e){let t;return 0===e?null:void 0===e||e>=this.length?(t=this.toBuffer(),this.iRead=this.iWrite,t):(t=n.alloc(e),this.buffer.copy(t,0,this.iRead,e),this.iRead+=e,t)}write(e,t,r){const n=Math.min(r,this.size-this.iWrite);return e.copy(this.buffer,this.iWrite,t,t+n),this.iWrite+=n,n}}const h=function(e){e=e||{},this.bufSize=e.bufSize||1048576,this.buffers=[],this.batch=e.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};s.inherits(h,i.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return n.concat(this.buffers.map(e=>e.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const e=this.buffers[this.buffers.length-1];if(!e.full)return e}const e=new u(this.bufSize);return this.buffers.push(e),e},async _pipe(e){await Promise.all(this.pipes.map((function(t){return new Promise(r=>{t.write(e.toBuffer(),()=>{r()})})})))},_writeToBuffers(e){let t=0;const r=e.length;for(;t1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(u),r.nextTick(i)):(await this._pipe(u),i());else this.paused||this.emit(\"data\",u.toBuffer()),this._writeToBuffers(u),this.emit(\"readable\");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(e,t,r){const n=e=>{e?r(e):(this._flush(),this.pipes.forEach(e=>{e.end()}),this.emit(\"finish\"))};e?this.write(e,t,n):n()},read(e){let t;if(e){for(t=[];e&&this.buffers.length&&!this.buffers[0].eod;){const r=this.buffers[0],n=r.read(e);e-=n.length,t.push(n),r.eod&&r.full&&this.buffers.shift()}return n.concat(t)}return t=this.buffers.map(e=>e.toBuffer()).filter(Boolean),this.buffers=[],n.concat(t)},setEncoding(e){this.encoding=e},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(e){this.pipes.push(e),!this.paused&&this.buffers.length&&this.end()},unpipe(e){this.pipes=this.pipes.filter(t=>t!==e)},unshift(){throw new Error(\"Not Implemented\")},wrap(){throw new Error(\"Not Implemented\")}}),t.exports=h}).call(this)}).call(this,e(\"_process\"),e(\"buffer\").Buffer)},{\"./string-buf\":25,\"./utils\":27,_process:467,buffer:220,\"readable-stream\":491}],25:[function(e,t,r){(function(e){(function(){\"use strict\";t.exports=class{constructor(t){this._buf=e.alloc(t&&t.size||16384),this._encoding=t&&t.encoding||\"utf8\",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=e.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(e){e=e||0,this._buffer=void 0,this._inPos=e}_grow(t){let r=2*this._buf.length;for(;r=this._buf.length-4;)this._grow(this._inPos+e.length),t=this._inPos+this._buf.write(e,this._inPos,this._encoding);this._inPos=t}addStringBuf(e){e.length&&(this._buffer=void 0,this.length+e.length>this.capacity&&this._grow(this.length+e.length),e._buf.copy(this._buf,this._inPos,0,e.length),this._inPos+=e.length)}}}).call(this)}).call(this,e(\"buffer\").Buffer)},{buffer:220}],26:[function(e,t,r){\"use strict\";const{toString:n}=Object.prototype,i=/[\"&<>]/,s={each:function(e,t){e&&(Array.isArray(e)?e.forEach(t):Object.keys(e).forEach(r=>{t(e[r],r)}))},some:function(e,t){return!!e&&(Array.isArray(e)?e.some(t):Object.keys(e).some(r=>t(e[r],r)))},every:function(e,t){return!e||(Array.isArray(e)?e.every(t):Object.keys(e).every(r=>t(e[r],r)))},map:function(e,t){return e?Array.isArray(e)?e.map(t):Object.keys(e).map(r=>t(e[r],r)):[]},keyBy:(e,t)=>e.reduce((e,r)=>(e[r[t]]=r,e),{}),isEqual:function(e,t){const r=typeof e,n=typeof t,i=Array.isArray(e),o=Array.isArray(t);let a;if(r!==n)return!1;switch(typeof e){case\"object\":if(i||o)return!(!i||!o)&&(e.length===t.length&&e.every((e,r)=>{const n=t[r];return s.isEqual(e,n)}));if(null===e||null===t)return e===t;if(a=Object.keys(e),Object.keys(t).length!==a.length)return!1;for(const e of a)if(!t.hasOwnProperty(e))return!1;return s.every(e,(e,r)=>{const n=t[r];return s.isEqual(e,n)});default:return e===t}},escapeHtml(e){const t=i.exec(e);if(!t)return e;let r=\"\",n=\"\",s=0,o=t.index;for(;o\":n=\">\";break;default:continue}s!==o&&(r+=e.substring(s,o)),s=o+1,r+=n}return s!==o?r+e.substring(s,o):r},strcmp:(e,t)=>et?1:0,isUndefined:e=>\"[object Undefined]\"===n.call(e),isObject:e=>\"[object Object]\"===n.call(e),deepMerge(){const e=arguments[0]||{},{length:t}=arguments;let r,n,i;function o(t,o){r=e[o],i=Array.isArray(t),s.isObject(t)||i?(i?(i=!1,n=r&&Array.isArray(r)?r:[]):n=r&&s.isObject(r)?r:{},e[o]=s.deepMerge(n,t)):s.isUndefined(t)||(e[o]=t)}for(let e=0;e&'\"\\x7F\\x00-\\x08\\x0B-\\x0C\\x0E-\\x1F]/,o={nop(){},promiseImmediate:e=>new Promise(t=>{r.setImmediate?n(()=>{t(e)}):setTimeout(()=>{t(e)},1)}),inherits:function(e,t,r,n){e.super_=t,n||(n=r,r=null),r&&Object.keys(r).forEach(t=>{Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))});const i={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};n&&Object.keys(n).forEach(e=>{i[e]=Object.getOwnPropertyDescriptor(n,e)}),e.prototype=Object.create(t.prototype,i)},dateToExcel:(e,t)=>25569+e.getTime()/864e5-(t?1462:0),excelToDate(e,t){const r=Math.round(24*(e-25569+(t?1462:0))*3600*1e3);return new Date(r)},parsePath(e){const t=e.lastIndexOf(\"/\");return{path:e.substring(0,t),name:e.substring(t+1)}},getRelsPath(e){const t=o.parsePath(e);return`${t.path}/_rels/${t.name}.rels`},xmlEncode(e){const t=s.exec(e);if(!t)return e;let r=\"\",n=\"\",i=0,o=t.index;for(;o=11&&13!==t)){n=\"\";break}continue}i!==o&&(r+=e.substring(i,o)),i=o+1,n&&(r+=n)}return i!==o?r+e.substring(i,o):r},xmlDecode:e=>e.replace(/&([a-z]*);/g,e=>{switch(e){case\"<\":return\"<\";case\">\":return\">\";case\"&\":return\"&\";case\"'\":return\"'\";case\""\":return'\"';default:return e}}),validInt(e){const t=parseInt(e,10);return Number.isNaN(t)?0:t},isDateFmt(e){if(!e)return!1;return null!==(e=(e=e.replace(/\\[[^\\]]*]/g,\"\")).replace(/\"[^\"]*\"/g,\"\")).match(/[ymdhMsb]+/)},fs:{exists:e=>new Promise(t=>{i.access(e,i.constants.F_OK,e=>{t(!e)})})},toIsoDateString:e=>e.toIsoString().subsstr(0,10),parseBoolean:e=>!0===e||\"true\"===e||1===e||\"1\"===e};t.exports=o}).call(this)}).call(this,\"undefined\"!=typeof __webpack_require__.g?__webpack_require__.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{},e(\"timers\").setImmediate)},{fs:216,timers:523}],28:[function(e,t,r){\"use strict\";const n=e(\"./under-dash\"),i=e(\"./utils\");function s(e,t,r){e.push(` ${t}=\"${i.xmlEncode(r.toString())}\"`)}function o(e,t){if(t){const r=[];n.each(t,(e,t)=>{void 0!==e&&s(r,t,e)}),e.push(r.join(\"\"))}}class a{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(e){const t=this._xml;t.push(\"\\n\")}openNode(e,t){const r=this.tos,n=this._xml;r&&this.open&&n.push(\">\"),this._stack.push(e),n.push(\"<\"),n.push(e),o(n,t),this.leaf=!0,this.open=!0}addAttribute(e,t){if(!this.open)throw new Error(\"Cannot write attributes to node if it is not open\");void 0!==t&&s(this._xml,e,t)}addAttributes(e){if(!this.open)throw new Error(\"Cannot write attributes to node if it is not open\");o(this._xml,e)}writeText(e){const t=this._xml;this.open&&(t.push(\">\"),this.open=!1),this.leaf=!1,t.push(i.xmlEncode(e.toString()))}writeXml(e){this.open&&(this._xml.push(\">\"),this.open=!1),this.leaf=!1,this._xml.push(e)}closeNode(){const e=this._stack.pop(),t=this._xml;this.leaf?t.push(\"/>\"):(t.push(\"\")),this.open=!1,this.leaf=!1}leafNode(e,t,r){this.openNode(e,t),void 0!==r&&this.writeText(r),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const e=this._rollbacks.pop();this._xml.length>e.xml&&this._xml.splice(e.xml,this._xml.length-e.xml),this._stack.length>e.stack&&this._stack.splice(e.stack,this._stack.length-e.stack),this.leaf=e.leaf,this.open=e.open}get xml(){return this.closeAll(),this._xml.join(\"\")}}a.StdDocAttributes={version:\"1.0\",encoding:\"UTF-8\",standalone:\"yes\"},t.exports=a},{\"./under-dash\":26,\"./utils\":27}],29:[function(e,t,r){(function(r){(function(){\"use strict\";const n=e(\"events\"),i=e(\"jszip\"),s=e(\"./stream-buf\"),{stringToBuffer:o}=e(\"./browser-buffer-encode\");class a extends n.EventEmitter{constructor(e){super(),this.options=Object.assign({type:\"nodebuffer\",compression:\"DEFLATE\"},e),this.zip=new i,this.stream=new s}append(e,t){t.hasOwnProperty(\"base64\")&&t.base64?this.zip.file(t.name,e,{base64:!0}):(r.browser&&\"string\"==typeof e&&(e=o(e)),this.zip.file(t.name,e))}async finalize(){const e=await this.zip.generateAsync(this.options);this.stream.end(e),this.emit(\"finish\")}read(e){return this.stream.read(e)}setEncoding(e){return this.stream.setEncoding(e)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(e,t){return this.stream.pipe(e,t)}unpipe(e){return this.stream.unpipe(e)}unshift(e){return this.stream.unshift(e)}wrap(e){return this.stream.wrap(e)}}t.exports={ZipWriter:a}}).call(this)}).call(this,e(\"_process\"))},{\"./browser-buffer-encode\":17,\"./stream-buf\":24,_process:467,events:422,jszip:441}],30:[function(e,t,r){\"use strict\";t.exports={0:{f:\"General\"},1:{f:\"0\"},2:{f:\"0.00\"},3:{f:\"#,##0\"},4:{f:\"#,##0.00\"},9:{f:\"0%\"},10:{f:\"0.00%\"},11:{f:\"0.00E+00\"},12:{f:\"# ?/?\"},13:{f:\"# ??/??\"},14:{f:\"mm-dd-yy\"},15:{f:\"d-mmm-yy\"},16:{f:\"d-mmm\"},17:{f:\"mmm-yy\"},18:{f:\"h:mm AM/PM\"},19:{f:\"h:mm:ss AM/PM\"},20:{f:\"h:mm\"},21:{f:\"h:mm:ss\"},22:{f:'m/d/yy \"h\":mm'},27:{\"zh-tw\":\"[$-404]e/m/d\",\"zh-cn\":'yyyy\"\\u5e74\"m\"\\u6708\"',\"ja-jp\":\"[$-411]ge.m.d\",\"ko-kr\":'yyyy\"\\u5e74\" mm\"\\u6708\" dd\"\\u65e5\"'},28:{\"zh-tw\":'[$-404]e\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"zh-cn\":'m\"\\u6708\"d\"\\u65e5\"',\"ja-jp\":'[$-411]ggge\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":\"mm-dd\"},29:{\"zh-tw\":'[$-404]e\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"zh-cn\":'m\"\\u6708\"d\"\\u65e5\"',\"ja-jp\":'[$-411]ggge\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":\"mm-dd\"},30:{\"zh-tw\":\"m/d/yy \",\"zh-cn\":\"m-d-yy\",\"ja-jp\":\"m/d/yy\",\"ko-kr\":\"mm-dd-yy\"},31:{\"zh-tw\":'yyyy\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"zh-cn\":'yyyy\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"ja-jp\":'yyyy\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":'yyyy\"\\ub144\" mm\"\\uc6d4\" dd\"\\uc77c\"'},32:{\"zh-tw\":'hh\"\\u6642\"mm\"\\u5206\"',\"zh-cn\":'h\"\\u65f6\"mm\"\\u5206\"',\"ja-jp\":'h\"\\u6642\"mm\"\\u5206\"',\"ko-kr\":'h\"\\uc2dc\" mm\"\\ubd84\"'},33:{\"zh-tw\":'hh\"\\u6642\"mm\"\\u5206\"ss\"\\u79d2\"',\"zh-cn\":'h\"\\u65f6\"mm\"\\u5206\"ss\"\\u79d2\"',\"ja-jp\":'h\"\\u6642\"mm\"\\u5206\"ss\"\\u79d2\"',\"ko-kr\":'h\"\\uc2dc\" mm\"\\ubd84\" ss\"\\ucd08\"'},34:{\"zh-tw\":'\\u4e0a\\u5348/\\u4e0b\\u5348 hh\"\\u6642\"mm\"\\u5206\"',\"zh-cn\":'\\u4e0a\\u5348/\\u4e0b\\u5348 h\"\\u65f6\"mm\"\\u5206\"',\"ja-jp\":'yyyy\"\\u5e74\"m\"\\u6708\"',\"ko-kr\":\"yyyy-mm-dd\"},35:{\"zh-tw\":'\\u4e0a\\u5348/\\u4e0b\\u5348 hh\"\\u6642\"mm\"\\u5206\"ss\"\\u79d2\"',\"zh-cn\":'\\u4e0a\\u5348/\\u4e0b\\u5348 h\"\\u65f6\"mm\"\\u5206\"ss\"\\u79d2\"',\"ja-jp\":'m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":\"yyyy-mm-dd\"},36:{\"zh-tw\":\"[$-404]e/m/d\",\"zh-cn\":'yyyy\"\\u5e74\"m\"\\u6708\"',\"ja-jp\":\"[$-411]ge.m.d\",\"ko-kr\":'yyyy\"\\u5e74\" mm\"\\u6708\" dd\"\\u65e5\"'},37:{f:\"#,##0 ;(#,##0)\"},38:{f:\"#,##0 ;[Red](#,##0)\"},39:{f:\"#,##0.00 ;(#,##0.00)\"},40:{f:\"#,##0.00 ;[Red](#,##0.00)\"},45:{f:\"mm:ss\"},46:{f:\"[h]:mm:ss\"},47:{f:\"mmss.0\"},48:{f:\"##0.0E+0\"},49:{f:\"@\"},50:{\"zh-tw\":\"[$-404]e/m/d\",\"zh-cn\":'yyyy\"\\u5e74\"m\"\\u6708\"',\"ja-jp\":\"[$-411]ge.m.d\",\"ko-kr\":'yyyy\"\\u5e74\" mm\"\\u6708\" dd\"\\u65e5\"'},51:{\"zh-tw\":'[$-404]e\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"zh-cn\":'m\"\\u6708\"d\"\\u65e5\"',\"ja-jp\":'[$-411]ggge\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":\"mm-dd\"},52:{\"zh-tw\":'\\u4e0a\\u5348/\\u4e0b\\u5348 hh\"\\u6642\"mm\"\\u5206\"',\"zh-cn\":'yyyy\"\\u5e74\"m\"\\u6708\"',\"ja-jp\":'yyyy\"\\u5e74\"m\"\\u6708\"',\"ko-kr\":\"yyyy-mm-dd\"},53:{\"zh-tw\":'\\u4e0a\\u5348/\\u4e0b\\u5348 hh\"\\u6642\"mm\"\\u5206\"ss\"\\u79d2\"',\"zh-cn\":'m\"\\u6708\"d\"\\u65e5\"',\"ja-jp\":'m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":\"yyyy-mm-dd\"},54:{\"zh-tw\":'[$-404]e\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"zh-cn\":'m\"\\u6708\"d\"\\u65e5\"',\"ja-jp\":'[$-411]ggge\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":\"mm-dd\"},55:{\"zh-tw\":'\\u4e0a\\u5348/\\u4e0b\\u5348 hh\"\\u6642\"mm\"\\u5206\"',\"zh-cn\":'\\u4e0a\\u5348/\\u4e0b\\u5348 h\"\\u65f6\"mm\"\\u5206\"',\"ja-jp\":'yyyy\"\\u5e74\"m\"\\u6708\"',\"ko-kr\":\"yyyy-mm-dd\"},56:{\"zh-tw\":'\\u4e0a\\u5348/\\u4e0b\\u5348 hh\"\\u6642\"mm\"\\u5206\"ss\"\\u79d2\"',\"zh-cn\":'\\u4e0a\\u5348/\\u4e0b\\u5348 h\"\\u65f6\"mm\"\\u5206\"ss\"\\u79d2\"',\"ja-jp\":'m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":\"yyyy-mm-dd\"},57:{\"zh-tw\":\"[$-404]e/m/d\",\"zh-cn\":'yyyy\"\\u5e74\"m\"\\u6708\"',\"ja-jp\":\"[$-411]ge.m.d\",\"ko-kr\":'yyyy\"\\u5e74\" mm\"\\u6708\" dd\"\\u65e5\"'},58:{\"zh-tw\":'[$-404]e\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"zh-cn\":'m\"\\u6708\"d\"\\u65e5\"',\"ja-jp\":'[$-411]ggge\"\\u5e74\"m\"\\u6708\"d\"\\u65e5\"',\"ko-kr\":\"mm-dd\"},59:{\"th-th\":\"t0\"},60:{\"th-th\":\"t0.00\"},61:{\"th-th\":\"t#,##0\"},62:{\"th-th\":\"t#,##0.00\"},67:{\"th-th\":\"t0%\"},68:{\"th-th\":\"t0.00%\"},69:{\"th-th\":\"t# ?/?\"},70:{\"th-th\":\"t# ??/??\"},81:{\"th-th\":\"d/m/bb\"}}},{}],31:[function(e,t,r){\"use strict\";t.exports={OfficeDocument:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",Worksheet:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\",CalcChain:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain\",SharedStrings:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings\",Styles:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\",Theme:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\",Hyperlink:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\",Image:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",CoreProperties:\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\",ExtenderProperties:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\",Comments:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments\",VmlDrawing:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing\",Table:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table\"}},{}],32:[function(e,t,r){\"use strict\";const n=e(\"../../utils/parse-sax\"),i=e(\"../../utils/xml-stream\");class s{prepare(){}render(){}parseOpen(e){}parseText(e){}parseClose(e){}reconcile(e,t){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(e=>{e instanceof s?e.reset():e.xform&&e.xform.reset()})}mergeModel(e){this.model=Object.assign(this.model||{},e)}async parse(e){for await(const t of e)for(const{eventType:e,value:r}of t)if(\"opentag\"===e)this.parseOpen(r);else if(\"text\"===e)this.parseText(r);else if(\"closetag\"===e&&!this.parseClose(r.name))return this.model;return this.model}async parseStream(e){return this.parse(n(e))}get xml(){return this.toXml(this.model)}toXml(e){const t=new i;return this.render(t,e),t.xml}static toAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0===e){if(r)return t}else if(r||e!==t)return e.toString()}static toStringAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return s.toAttribute(e,t,r)}static toStringValue(e,t){return void 0===e?t:e}static toBoolAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0===e){if(r)return t}else if(r||e!==t)return e?\"1\":\"0\"}static toBoolValue(e,t){return void 0===e?t:\"1\"===e}static toIntAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return s.toAttribute(e,t,r)}static toIntValue(e,t){return void 0===e?t:parseInt(e,10)}static toFloatAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return s.toAttribute(e,t,r)}static toFloatValue(e,t){return void 0===e?t:parseFloat(e)}}t.exports=s},{\"../../utils/parse-sax\":22,\"../../utils/xml-stream\":28}],33:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"../../../utils/col-cache\");function s(e){try{return i.decodeEx(e),!0}catch(e){return!1}}function o(e){const t=[];let r=!1,n=\"\";return e.split(\",\").forEach(e=>{if(!e)return;const i=(e.match(/'/g)||[]).length;if(!i)return void(r?n+=e+\",\":s(e)&&t.push(e));const o=i%2==0;!r&&o&&s(e)?t.push(e):r&&!o?(r=!1,s(n+e)&&t.push(n+e),n=\"\"):(r=!0,n+=e+\",\")}),t}t.exports=class extends n{render(e,t){e.openNode(\"definedName\",{name:t.name,localSheetId:t.localSheetId}),e.writeText(t.ranges.join(\",\")),e.closeNode()}parseOpen(e){switch(e.name){case\"definedName\":return this._parsedName=e.attributes.name,this._parsedLocalSheetId=e.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(e){this._parsedText.push(e)}parseClose(){return this.model={name:this._parsedName,ranges:o(this._parsedText.join(\"\"))},void 0!==this._parsedLocalSheetId&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{\"../../../utils/col-cache\":19,\"../base-xform\":32}],34:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/utils\"),i=e(\"../base-xform\");t.exports=class extends i{render(e,t){e.leafNode(\"sheet\",{sheetId:t.id,name:t.name,state:t.state,\"r:id\":t.rId})}parseOpen(e){return\"sheet\"===e.name&&(this.model={name:n.xmlDecode(e.attributes.name),id:parseInt(e.attributes.sheetId,10),state:e.attributes.state,rId:e.attributes[\"r:id\"]},!0)}parseText(){}parseClose(){return!1}}},{\"../../../utils/utils\":27,\"../base-xform\":32}],35:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{render(e,t){e.leafNode(\"calcPr\",{calcId:171027,fullCalcOnLoad:t.fullCalcOnLoad?1:void 0})}parseOpen(e){return\"calcPr\"===e.name&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],36:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{render(e,t){e.leafNode(\"workbookPr\",{date1904:t.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(e){return\"workbookPr\"===e.name&&(this.model={date1904:\"1\"===e.attributes.date1904},!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],37:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{render(e,t){const r={xWindow:t.x||0,yWindow:t.y||0,windowWidth:t.width||12e3,windowHeight:t.height||24e3,firstSheet:t.firstSheet,activeTab:t.activeTab};t.visibility&&\"visible\"!==t.visibility&&(r.visibility=t.visibility),e.leafNode(\"workbookView\",r)}parseOpen(e){if(\"workbookView\"===e.name){const t=this.model={},r=function(e,r,n){const i=void 0!==r?t[e]=r:n;void 0!==i&&(t[e]=i)},n=function(e,r,n){const i=void 0!==r?t[e]=parseInt(r,10):n;void 0!==i&&(t[e]=i)};return n(\"x\",e.attributes.xWindow,0),n(\"y\",e.attributes.yWindow,0),n(\"width\",e.attributes.windowWidth,25e3),n(\"height\",e.attributes.windowHeight,1e4),r(\"visibility\",e.attributes.visibility,\"visible\"),n(\"activeTab\",e.attributes.activeTab,void 0),n(\"firstSheet\",e.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],38:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../../../utils/col-cache\"),s=e(\"../../../utils/xml-stream\"),o=e(\"../base-xform\"),a=e(\"../static-xform\"),l=e(\"../list-xform\"),c=e(\"./defined-name-xform\"),u=e(\"./sheet-xform\"),h=e(\"./workbook-view-xform\"),f=e(\"./workbook-properties-xform\"),d=e(\"./workbook-calc-properties-xform\");class p extends o{constructor(){super(),this.map={fileVersion:p.STATIC_XFORMS.fileVersion,workbookPr:new f,bookViews:new l({tag:\"bookViews\",count:!1,childXform:new h}),sheets:new l({tag:\"sheets\",count:!1,childXform:new u}),definedNames:new l({tag:\"definedNames\",count:!1,childXform:new c}),calcPr:new d}}prepare(e){e.sheets=e.worksheets;const t=[];let r=0;e.sheets.forEach(e=>{if(e.pageSetup&&e.pageSetup.printArea&&e.pageSetup.printArea.split(\"&&\").forEach(n=>{const i=n.split(\":\"),s={name:\"_xlnm.Print_Area\",ranges:[`'${e.name}'!$${i[0]}:$${i[1]}`],localSheetId:r};t.push(s)}),e.pageSetup&&(e.pageSetup.printTitlesRow||e.pageSetup.printTitlesColumn)){const n=[];if(e.pageSetup.printTitlesColumn){const t=e.pageSetup.printTitlesColumn.split(\":\");n.push(`'${e.name}'!$${t[0]}:$${t[1]}`)}if(e.pageSetup.printTitlesRow){const t=e.pageSetup.printTitlesRow.split(\":\");n.push(`'${e.name}'!$${t[0]}:$${t[1]}`)}const i={name:\"_xlnm.Print_Titles\",ranges:n,localSheetId:r};t.push(i)}r++}),t.length&&(e.definedNames=e.definedNames.concat(t)),(e.media||[]).forEach((e,t)=>{e.name=e.type+(t+1)})}render(e,t){e.openXml(s.StdDocAttributes),e.openNode(\"workbook\",p.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(e),this.map.workbookPr.render(e,t.properties),this.map.bookViews.render(e,t.views),this.map.sheets.render(e,t.sheets),this.map.definedNames.render(e,t.definedNames),this.map.calcPr.render(e,t.calcProperties),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"workbook\":return!0;default:return this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e),!0}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case\"workbook\":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(e){const t=(e.workbookRels||[]).reduce((e,t)=>(e[t.Id]=t,e),{}),r=[];let s,o=0;(e.sheets||[]).forEach(n=>{const i=t[n.rId];i&&(s=e.worksheetHash[\"xl/\"+i.Target.replace(/^(\\s|\\/xl\\/)+/,\"\")],s&&(s.name=n.name,s.id=n.id,s.state=n.state,r[o++]=s))});const a=[];n.each(e.definedNames,e=>{if(\"_xlnm.Print_Area\"===e.name){if(s=r[e.localSheetId],s){s.pageSetup||(s.pageSetup={});const t=i.decodeEx(e.ranges[0]);s.pageSetup.printArea=s.pageSetup.printArea?`${s.pageSetup.printArea}&&${t.dimensions}`:t.dimensions}}else if(\"_xlnm.Print_Titles\"===e.name){if(s=r[e.localSheetId],s){s.pageSetup||(s.pageSetup={});const t=e.ranges.join(\",\"),r=/\\$/g,n=/\\$\\d+:\\$\\d+/,i=t.match(n);if(i&&i.length){const e=i[0];s.pageSetup.printTitlesRow=e.replace(r,\"\")}const o=/\\$[A-Z]+:\\$[A-Z]+/,a=t.match(o);if(a&&a.length){const e=a[0];s.pageSetup.printTitlesColumn=e.replace(r,\"\")}}}else a.push(e)}),e.definedNames=a,e.media.forEach((e,t)=>{e.index=t})}}p.WORKBOOK_ATTRIBUTES={xmlns:\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",\"xmlns:r\":\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\"xmlns:mc\":\"http://schemas.openxmlformats.org/markup-compatibility/2006\",\"mc:Ignorable\":\"x15\",\"xmlns:x15\":\"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main\"},p.STATIC_XFORMS={fileVersion:new a({tag:\"fileVersion\",$:{appName:\"xl\",lastEdited:5,lowestEdited:5,rupBuild:9303}})},t.exports=p},{\"../../../utils/col-cache\":19,\"../../../utils/under-dash\":26,\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"../list-xform\":71,\"../static-xform\":120,\"./defined-name-xform\":33,\"./sheet-xform\":34,\"./workbook-calc-properties-xform\":35,\"./workbook-properties-xform\":36,\"./workbook-view-xform\":37}],39:[function(e,t,r){\"use strict\";const n=e(\"../strings/rich-text-xform\"),i=e(\"../../../utils/utils\"),s=e(\"../base-xform\"),o=t.exports=function(e){this.model=e};i.inherits(o,s,{get tag(){return\"r\"},get richTextXform(){return this._richTextXform||(this._richTextXform=new n),this._richTextXform},render(e,t){t=t||this.model,e.openNode(\"comment\",{ref:t.ref,authorId:0}),e.openNode(\"text\"),t&&t.note&&t.note.texts&&t.note.texts.forEach(t=>{this.richTextXform.render(e,t)}),e.closeNode(),e.closeNode()},parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"comment\":return this.model={type:\"note\",note:{texts:[]},...e.attributes},!0;case\"r\":return this.parser=this.richTextXform,this.parser.parseOpen(e),!0;default:return!1}},parseText(e){this.parser&&this.parser.parseText(e)},parseClose(e){switch(e){case\"comment\":return!1;case\"r\":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}})},{\"../../../utils/utils\":27,\"../base-xform\":32,\"../strings/rich-text-xform\":122}],40:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/xml-stream\"),i=e(\"../../../utils/utils\"),s=e(\"../base-xform\"),o=e(\"./comment-xform\"),a=t.exports=function(){this.map={comment:new o}};i.inherits(a,s,{COMMENTS_ATTRIBUTES:{xmlns:\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"}},{render(e,t){t=t||this.model,e.openXml(n.StdDocAttributes),e.openNode(\"comments\",a.COMMENTS_ATTRIBUTES),e.openNode(\"authors\"),e.leafNode(\"author\",null,\"Author\"),e.closeNode(),e.openNode(\"commentList\"),t.comments.forEach(t=>{this.map.comment.render(e,t)}),e.closeNode(),e.closeNode()},parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"commentList\":return this.model={comments:[]},!0;case\"comment\":return this.parser=this.map.comment,this.parser.parseOpen(e),!0;default:return!1}},parseText(e){this.parser&&this.parser.parseText(e)},parseClose(e){switch(e){case\"commentList\":return!1;case\"comment\":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}})},{\"../../../utils/utils\":27,\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"./comment-xform\":39}],41:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\");t.exports=class extends n{constructor(e){super(),this._model=e}get tag(){return this._model&&this._model.tag}render(e,t,r){(t===r[2]||\"x:SizeWithCells\"===this.tag&&t===r[1])&&e.leafNode(this.tag)}parseOpen(e){switch(e.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{\"../../base-xform\":32}],42:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\");t.exports=class extends n{constructor(e){super(),this._model=e}get tag(){return this._model&&this._model.tag}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(e){switch(e.name){case this.tag:return this.text=\"\",!0;default:return!1}}parseText(e){this.text=e}parseClose(){return!1}}},{\"../../base-xform\":32}],43:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"x:Anchor\"}getAnchorRect(e){const t=Math.floor(e.left),r=Math.floor(68*(e.left-t)),n=Math.floor(e.top),i=Math.floor(18*(e.top-n)),s=Math.floor(e.right),o=Math.floor(68*(e.right-s)),a=Math.floor(e.bottom);return[t,r,n,i,s,o,a,Math.floor(18*(e.bottom-a))]}getDefaultRect(e){const t=e.col,r=Math.max(e.row-2,0);return[t,6,r,14,t+2,2,r+4,16]}render(e,t){const r=t.anchor?this.getAnchorRect(t.anchor):this.getDefaultRect(t.refAddress);e.leafNode(\"x:Anchor\",null,r.join(\", \"))}parseOpen(e){switch(e.name){case this.tag:return this.text=\"\",!0;default:return!1}}parseText(e){this.text=e}parseClose(){return!1}}},{\"../base-xform\":32}],44:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./vml-anchor-xform\"),s=e(\"./style/vml-protection-xform\"),o=e(\"./style/vml-position-xform\"),a=[\"twoCells\",\"oneCells\",\"absolute\"];t.exports=class extends n{constructor(){super(),this.map={\"x:Anchor\":new i,\"x:Locked\":new s({tag:\"x:Locked\"}),\"x:LockText\":new s({tag:\"x:LockText\"}),\"x:SizeWithCells\":new o({tag:\"x:SizeWithCells\"}),\"x:MoveWithCells\":new o({tag:\"x:MoveWithCells\"})}}get tag(){return\"x:ClientData\"}render(e,t){const{protection:r,editAs:n}=t.note;e.openNode(this.tag,{ObjectType:\"Note\"}),this.map[\"x:MoveWithCells\"].render(e,n,a),this.map[\"x:SizeWithCells\"].render(e,n,a),this.map[\"x:Anchor\"].render(e,t),this.map[\"x:Locked\"].render(e,r.locked),e.leafNode(\"x:AutoFill\",null,\"False\"),this.map[\"x:LockText\"].render(e,r.lockText),e.leafNode(\"x:Row\",null,t.refAddress.row-1),e.leafNode(\"x:Column\",null,t.refAddress.col-1),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:\"\"};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const e=Object.assign({},this.map[\"x:MoveWithCells\"].model,this.map[\"x:SizeWithCells\"].model),t=Object.keys(e).length;this.model.editAs=a[t],this.model.anchor=this.map[\"x:Anchor\"].text,this.model.protection.locked=this.map[\"x:Locked\"].text,this.model.protection.lockText=this.map[\"x:LockText\"].text}}},{\"../base-xform\":32,\"./style/vml-position-xform\":41,\"./style/vml-protection-xform\":42,\"./vml-anchor-xform\":43}],45:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/xml-stream\"),i=e(\"../base-xform\"),s=e(\"./vml-shape-xform\");class o extends i{constructor(){super(),this.map={\"v:shape\":new s}}get tag(){return\"xml\"}render(e,t){e.openXml(n.StdDocAttributes),e.openNode(this.tag,o.DRAWING_ATTRIBUTES),e.openNode(\"o:shapelayout\",{\"v:ext\":\"edit\"}),e.leafNode(\"o:idmap\",{\"v:ext\":\"edit\",data:1}),e.closeNode(),e.openNode(\"v:shapetype\",{id:\"_x0000_t202\",coordsize:\"21600,21600\",\"o:spt\":202,path:\"m,l,21600r21600,l21600,xe\"}),e.leafNode(\"v:stroke\",{joinstyle:\"miter\"}),e.leafNode(\"v:path\",{gradientshapeok:\"t\",\"o:connecttype\":\"rect\"}),e.closeNode(),t.comments.forEach((t,r)=>{this.map[\"v:shape\"].render(e,t,r)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(e){case this.tag:return!1;default:return!0}}reconcile(e,t){e.anchors.forEach(e=>{e.br?this.map[\"xdr:twoCellAnchor\"].reconcile(e,t):this.map[\"xdr:oneCellAnchor\"].reconcile(e,t)})}}o.DRAWING_ATTRIBUTES={\"xmlns:v\":\"urn:schemas-microsoft-com:vml\",\"xmlns:o\":\"urn:schemas-microsoft-com:office:office\",\"xmlns:x\":\"urn:schemas-microsoft-com:office:excel\"},t.exports=o},{\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"./vml-shape-xform\":46}],46:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./vml-textbox-xform\"),s=e(\"./vml-client-data-xform\");class o extends n{constructor(){super(),this.map={\"v:textbox\":new i,\"x:ClientData\":new s}}get tag(){return\"v:shape\"}render(e,t,r){e.openNode(\"v:shape\",o.V_SHAPE_ATTRIBUTES(t,r)),e.leafNode(\"v:fill\",{color2:\"infoBackground [80]\"}),e.leafNode(\"v:shadow\",{color:\"none [81]\",obscured:\"t\"}),e.leafNode(\"v:path\",{\"o:connecttype\":\"none\"}),this.map[\"v:textbox\"].render(e,t),this.map[\"x:ClientData\"].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={margins:{insetmode:e.attributes[\"o:insetmode\"]},anchor:\"\",editAs:\"\",protection:{}};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.margins.inset=this.map[\"v:textbox\"].model&&this.map[\"v:textbox\"].model.inset,this.model.protection=this.map[\"x:ClientData\"].model&&this.map[\"x:ClientData\"].model.protection,this.model.anchor=this.map[\"x:ClientData\"].model&&this.map[\"x:ClientData\"].model.anchor,this.model.editAs=this.map[\"x:ClientData\"].model&&this.map[\"x:ClientData\"].model.editAs,!1;default:return!0}}}o.V_SHAPE_ATTRIBUTES=(e,t)=>({id:\"_x0000_s\"+(1025+t),type:\"#_x0000_t202\",style:\"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden\",fillcolor:\"infoBackground [80]\",strokecolor:\"none [81]\",\"o:insetmode\":e.note.margins&&e.note.margins.insetmode}),t.exports=o},{\"../base-xform\":32,\"./vml-client-data-xform\":44,\"./vml-textbox-xform\":47}],47:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"v:textbox\"}conversionUnit(e,t,r){return`${parseFloat(e)*t.toFixed(2)}${r}`}reverseConversionUnit(e){return(e||\"\").split(\",\").map(e=>Number(parseFloat(this.conversionUnit(parseFloat(e),.1,\"\")).toFixed(2)))}render(e,t){const r={style:\"mso-direction-alt:auto\"};if(t&&t.note){let{inset:e}=t.note&&t.note.margins;Array.isArray(e)&&(e=e.map(e=>this.conversionUnit(e,10,\"mm\")).join(\",\")),e&&(r.inset=e)}e.openNode(\"v:textbox\",r),e.leafNode(\"div\",{style:\"text-align:left\"}),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:return this.model={inset:this.reverseConversionUnit(e.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}},{\"../base-xform\":32}],48:[function(e,t,r){\"use strict\";const n=e(\"./base-xform\");t.exports=class extends n{createNewModel(e){return{}}parseOpen(e){return this.parser=this.parser||this.map[e.name],this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag&&(this.model=this.createNewModel(e),!0)}parseText(e){this.parser&&this.parser.parseText(e)}onParserClose(e,t){this.model[e]=t.model}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.onParserClose(e,this.parser),this.parser=void 0),!0):e!==this.tag}}},{\"./base-xform\":32}],49:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{render(e,t){e.openNode(\"HeadingPairs\"),e.openNode(\"vt:vector\",{size:2,baseType:\"variant\"}),e.openNode(\"vt:variant\"),e.leafNode(\"vt:lpstr\",void 0,\"Worksheets\"),e.closeNode(),e.openNode(\"vt:variant\"),e.leafNode(\"vt:i4\",void 0,t.length),e.closeNode(),e.closeNode(),e.closeNode()}parseOpen(e){return\"HeadingPairs\"===e.name}parseText(){}parseClose(e){return\"HeadingPairs\"!==e}}},{\"../base-xform\":32}],50:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{render(e,t){e.openNode(\"TitlesOfParts\"),e.openNode(\"vt:vector\",{size:t.length,baseType:\"lpstr\"}),t.forEach(t=>{e.leafNode(\"vt:lpstr\",void 0,t.name)}),e.closeNode(),e.closeNode()}parseOpen(e){return\"TitlesOfParts\"===e.name}parseText(){}parseClose(e){return\"TitlesOfParts\"!==e}}},{\"../base-xform\":32}],51:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/xml-stream\"),i=e(\"../base-xform\"),s=e(\"../simple/string-xform\"),o=e(\"./app-heading-pairs-xform\"),a=e(\"./app-titles-of-parts-xform\");class l extends i{constructor(){super(),this.map={Company:new s({tag:\"Company\"}),Manager:new s({tag:\"Manager\"}),HeadingPairs:new o,TitleOfParts:new a}}render(e,t){e.openXml(n.StdDocAttributes),e.openNode(\"Properties\",l.PROPERTY_ATTRIBUTES),e.leafNode(\"Application\",void 0,\"Microsoft Excel\"),e.leafNode(\"DocSecurity\",void 0,\"0\"),e.leafNode(\"ScaleCrop\",void 0,\"false\"),this.map.HeadingPairs.render(e,t.worksheets),this.map.TitleOfParts.render(e,t.worksheets),this.map.Company.render(e,t.company||\"\"),this.map.Manager.render(e,t.manager),e.leafNode(\"LinksUpToDate\",void 0,\"false\"),e.leafNode(\"SharedDoc\",void 0,\"false\"),e.leafNode(\"HyperlinksChanged\",void 0,\"false\"),e.leafNode(\"AppVersion\",void 0,\"16.0300\"),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"Properties\":return!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case\"Properties\":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}l.DateFormat=function(e){return e.toISOString().replace(/[.]\\d{3,6}/,\"\")},l.DateAttrs={\"xsi:type\":\"dcterms:W3CDTF\"},l.PROPERTY_ATTRIBUTES={xmlns:\"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\",\"xmlns:vt\":\"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\"},t.exports=l},{\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"../simple/string-xform\":119,\"./app-heading-pairs-xform\":49,\"./app-titles-of-parts-xform\":50}],52:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/xml-stream\"),i=e(\"../base-xform\");class s extends i{render(e,t){e.openXml(n.StdDocAttributes),e.openNode(\"Types\",s.PROPERTY_ATTRIBUTES);const r={};(t.media||[]).forEach(t=>{if(\"image\"===t.type){const n=t.extension;r[n]||(r[n]=!0,e.leafNode(\"Default\",{Extension:n,ContentType:\"image/\"+n}))}}),e.leafNode(\"Default\",{Extension:\"rels\",ContentType:\"application/vnd.openxmlformats-package.relationships+xml\"}),e.leafNode(\"Default\",{Extension:\"xml\",ContentType:\"application/xml\"}),e.leafNode(\"Override\",{PartName:\"/xl/workbook.xml\",ContentType:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\"}),t.worksheets.forEach(t=>{const r=`/xl/worksheets/sheet${t.id}.xml`;e.leafNode(\"Override\",{PartName:r,ContentType:\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\"})}),e.leafNode(\"Override\",{PartName:\"/xl/theme/theme1.xml\",ContentType:\"application/vnd.openxmlformats-officedocument.theme+xml\"}),e.leafNode(\"Override\",{PartName:\"/xl/styles.xml\",ContentType:\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\"});t.sharedStrings&&t.sharedStrings.count&&e.leafNode(\"Override\",{PartName:\"/xl/sharedStrings.xml\",ContentType:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\"}),t.tables&&t.tables.forEach(t=>{e.leafNode(\"Override\",{PartName:\"/xl/tables/\"+t.target,ContentType:\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\"})}),t.drawings&&t.drawings.forEach(t=>{e.leafNode(\"Override\",{PartName:`/xl/drawings/${t.name}.xml`,ContentType:\"application/vnd.openxmlformats-officedocument.drawing+xml\"})}),t.commentRefs&&(e.leafNode(\"Default\",{Extension:\"vml\",ContentType:\"application/vnd.openxmlformats-officedocument.vmlDrawing\"}),t.commentRefs.forEach(t=>{let{commentName:r}=t;e.leafNode(\"Override\",{PartName:`/xl/${r}.xml`,ContentType:\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\"})})),e.leafNode(\"Override\",{PartName:\"/docProps/core.xml\",ContentType:\"application/vnd.openxmlformats-package.core-properties+xml\"}),e.leafNode(\"Override\",{PartName:\"/docProps/app.xml\",ContentType:\"application/vnd.openxmlformats-officedocument.extended-properties+xml\"}),e.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}s.PROPERTY_ATTRIBUTES={xmlns:\"http://schemas.openxmlformats.org/package/2006/content-types\"},t.exports=s},{\"../../../utils/xml-stream\":28,\"../base-xform\":32}],53:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/xml-stream\"),i=e(\"../base-xform\"),s=e(\"../simple/date-xform\"),o=e(\"../simple/string-xform\"),a=e(\"../simple/integer-xform\");class l extends i{constructor(){super(),this.map={\"dc:creator\":new o({tag:\"dc:creator\"}),\"dc:title\":new o({tag:\"dc:title\"}),\"dc:subject\":new o({tag:\"dc:subject\"}),\"dc:description\":new o({tag:\"dc:description\"}),\"dc:identifier\":new o({tag:\"dc:identifier\"}),\"dc:language\":new o({tag:\"dc:language\"}),\"cp:keywords\":new o({tag:\"cp:keywords\"}),\"cp:category\":new o({tag:\"cp:category\"}),\"cp:lastModifiedBy\":new o({tag:\"cp:lastModifiedBy\"}),\"cp:lastPrinted\":new s({tag:\"cp:lastPrinted\",format:l.DateFormat}),\"cp:revision\":new a({tag:\"cp:revision\"}),\"cp:version\":new o({tag:\"cp:version\"}),\"cp:contentStatus\":new o({tag:\"cp:contentStatus\"}),\"cp:contentType\":new o({tag:\"cp:contentType\"}),\"dcterms:created\":new s({tag:\"dcterms:created\",attrs:l.DateAttrs,format:l.DateFormat}),\"dcterms:modified\":new s({tag:\"dcterms:modified\",attrs:l.DateAttrs,format:l.DateFormat})}}render(e,t){e.openXml(n.StdDocAttributes),e.openNode(\"cp:coreProperties\",l.CORE_PROPERTY_ATTRIBUTES),this.map[\"dc:creator\"].render(e,t.creator),this.map[\"dc:title\"].render(e,t.title),this.map[\"dc:subject\"].render(e,t.subject),this.map[\"dc:description\"].render(e,t.description),this.map[\"dc:identifier\"].render(e,t.identifier),this.map[\"dc:language\"].render(e,t.language),this.map[\"cp:keywords\"].render(e,t.keywords),this.map[\"cp:category\"].render(e,t.category),this.map[\"cp:lastModifiedBy\"].render(e,t.lastModifiedBy),this.map[\"cp:lastPrinted\"].render(e,t.lastPrinted),this.map[\"cp:revision\"].render(e,t.revision),this.map[\"cp:version\"].render(e,t.version),this.map[\"cp:contentStatus\"].render(e,t.contentStatus),this.map[\"cp:contentType\"].render(e,t.contentType),this.map[\"dcterms:created\"].render(e,t.created),this.map[\"dcterms:modified\"].render(e,t.modified),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"cp:coreProperties\":case\"coreProperties\":return!0;default:if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error(\"Unexpected xml node in parseOpen: \"+JSON.stringify(e))}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case\"cp:coreProperties\":case\"coreProperties\":return this.model={creator:this.map[\"dc:creator\"].model,title:this.map[\"dc:title\"].model,subject:this.map[\"dc:subject\"].model,description:this.map[\"dc:description\"].model,identifier:this.map[\"dc:identifier\"].model,language:this.map[\"dc:language\"].model,keywords:this.map[\"cp:keywords\"].model,category:this.map[\"cp:category\"].model,lastModifiedBy:this.map[\"cp:lastModifiedBy\"].model,lastPrinted:this.map[\"cp:lastPrinted\"].model,revision:this.map[\"cp:revision\"].model,contentStatus:this.map[\"cp:contentStatus\"].model,contentType:this.map[\"cp:contentType\"].model,created:this.map[\"dcterms:created\"].model,modified:this.map[\"dcterms:modified\"].model},!1;default:throw new Error(\"Unexpected xml node in parseClose: \"+e)}}}l.DateFormat=function(e){return e.toISOString().replace(/[.]\\d{3}/,\"\")},l.DateAttrs={\"xsi:type\":\"dcterms:W3CDTF\"},l.CORE_PROPERTY_ATTRIBUTES={\"xmlns:cp\":\"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\",\"xmlns:dc\":\"http://purl.org/dc/elements/1.1/\",\"xmlns:dcterms\":\"http://purl.org/dc/terms/\",\"xmlns:dcmitype\":\"http://purl.org/dc/dcmitype/\",\"xmlns:xsi\":\"http://www.w3.org/2001/XMLSchema-instance\"},t.exports=l},{\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"../simple/date-xform\":117,\"../simple/integer-xform\":118,\"../simple/string-xform\":119}],54:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{render(e,t){e.leafNode(\"Relationship\",t)}parseOpen(e){switch(e.name){case\"Relationship\":return this.model=e.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],55:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/xml-stream\"),i=e(\"../base-xform\"),s=e(\"./relationship-xform\");class o extends i{constructor(){super(),this.map={Relationship:new s}}render(e,t){t=t||this._values,e.openXml(n.StdDocAttributes),e.openNode(\"Relationships\",o.RELATIONSHIPS_ATTRIBUTES),t.forEach(t=>{this.map.Relationship.render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"Relationships\":return this.model=[],!0;default:if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error(\"Unexpected xml node in parseOpen: \"+JSON.stringify(e))}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(e){case\"Relationships\":return!1;default:throw new Error(\"Unexpected xml node in parseClose: \"+e)}}}o.RELATIONSHIPS_ATTRIBUTES={xmlns:\"http://schemas.openxmlformats.org/package/2006/relationships\"},t.exports=o},{\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"./relationship-xform\":54}],56:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={range:{editAs:e.attributes.editAs||\"oneCell\"}};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}reconcilePicture(e,t){if(e&&e.rId){const r=t.rels[e.rId].Target.match(/.*\\/media\\/(.+[.][a-zA-Z]{3,4})/);if(r){const e=r[1],n=t.mediaIndex[e];return t.media[n]}}}}},{\"../base-xform\":32}],57:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./blip-xform\");t.exports=class extends n{constructor(){super(),this.map={\"a:blip\":new i}}get tag(){return\"xdr:blipFill\"}render(e,t){e.openNode(this.tag),this.map[\"a:blip\"].render(e,t),e.openNode(\"a:stretch\"),e.leafNode(\"a:fillRect\"),e.closeNode(),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model=this.map[\"a:blip\"].model,!1;default:return!0}}}},{\"../base-xform\":32,\"./blip-xform\":58}],58:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"a:blip\"}render(e,t){e.leafNode(this.tag,{\"xmlns:r\":\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\"r:embed\":t.rId,cstate:\"print\"})}parseOpen(e){switch(e.name){case this.tag:return this.model={rId:e.attributes[\"r:embed\"]},!0;default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}},{\"../base-xform\":32}],59:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"xdr:cNvPicPr\"}render(e){e.openNode(this.tag),e.leafNode(\"a:picLocks\",{noChangeAspect:\"1\"}),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}},{\"../base-xform\":32}],60:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./hlink-click-xform\"),s=e(\"./ext-lst-xform\");t.exports=class extends n{constructor(){super(),this.map={\"a:hlinkClick\":new i,\"a:extLst\":new s}}get tag(){return\"xdr:cNvPr\"}render(e,t){e.openNode(this.tag,{id:t.index,name:\"Picture \"+t.index}),this.map[\"a:hlinkClick\"].render(e,t),this.map[\"a:extLst\"].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model=this.map[\"a:hlinkClick\"].model,!1;default:return!0}}}},{\"../base-xform\":32,\"./ext-lst-xform\":63,\"./hlink-click-xform\":65}],61:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"../simple/integer-xform\");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.map={\"xdr:col\":new i({tag:\"xdr:col\",zero:!0}),\"xdr:colOff\":new i({tag:\"xdr:colOff\",zero:!0}),\"xdr:row\":new i({tag:\"xdr:row\",zero:!0}),\"xdr:rowOff\":new i({tag:\"xdr:rowOff\",zero:!0})}}render(e,t){e.openNode(this.tag),this.map[\"xdr:col\"].render(e,t.nativeCol),this.map[\"xdr:colOff\"].render(e,t.nativeColOff),this.map[\"xdr:row\"].render(e,t.nativeRow),this.map[\"xdr:rowOff\"].render(e,t.nativeRowOff),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model={nativeCol:this.map[\"xdr:col\"].model,nativeColOff:this.map[\"xdr:colOff\"].model,nativeRow:this.map[\"xdr:row\"].model,nativeRowOff:this.map[\"xdr:rowOff\"].model},!1;default:return!0}}}},{\"../base-xform\":32,\"../simple/integer-xform\":118}],62:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/col-cache\"),i=e(\"../../../utils/xml-stream\"),s=e(\"../base-xform\"),o=e(\"./two-cell-anchor-xform\"),a=e(\"./one-cell-anchor-xform\");class l extends s{constructor(){super(),this.map={\"xdr:twoCellAnchor\":new o,\"xdr:oneCellAnchor\":new a}}prepare(e){e.anchors.forEach((e,t)=>{e.anchorType=function(e){return(\"string\"==typeof e.range?n.decode(e.range):e.range).br?\"xdr:twoCellAnchor\":\"xdr:oneCellAnchor\"}(e);this.map[e.anchorType].prepare(e,{index:t})})}get tag(){return\"xdr:wsDr\"}render(e,t){e.openXml(i.StdDocAttributes),e.openNode(this.tag,l.DRAWING_ATTRIBUTES),t.anchors.forEach(t=>{this.map[t.anchorType].render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(e){case this.tag:return!1;default:return!0}}reconcile(e,t){e.anchors.forEach(e=>{e.br?this.map[\"xdr:twoCellAnchor\"].reconcile(e,t):this.map[\"xdr:oneCellAnchor\"].reconcile(e,t)})}}l.DRAWING_ATTRIBUTES={\"xmlns:xdr\":\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\",\"xmlns:a\":\"http://schemas.openxmlformats.org/drawingml/2006/main\"},t.exports=l},{\"../../../utils/col-cache\":19,\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"./one-cell-anchor-xform\":67,\"./two-cell-anchor-xform\":70}],63:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"a:extLst\"}render(e){e.openNode(this.tag),e.openNode(\"a:ext\",{uri:\"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}\"}),e.leafNode(\"a16:creationId\",{\"xmlns:a16\":\"http://schemas.microsoft.com/office/drawing/2014/main\",id:\"{00000000-0008-0000-0000-000002000000}\"}),e.closeNode(),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}},{\"../base-xform\":32}],64:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.map={}}render(e,t){e.openNode(this.tag);const r=Math.floor(9525*t.width),n=Math.floor(9525*t.height);e.addAttribute(\"cx\",r),e.addAttribute(\"cy\",n),e.closeNode()}parseOpen(e){return e.name===this.tag&&(this.model={width:parseInt(e.attributes.cx||\"0\",10)/9525,height:parseInt(e.attributes.cy||\"0\",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],65:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"a:hlinkClick\"}render(e,t){t.hyperlinks&&t.hyperlinks.rId&&e.leafNode(this.tag,{\"xmlns:r\":\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\"r:id\":t.hyperlinks.rId,tooltip:t.hyperlinks.tooltip})}parseOpen(e){switch(e.name){case this.tag:return this.model={hyperlinks:{rId:e.attributes[\"r:id\"],tooltip:e.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],66:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./c-nv-pr-xform\"),s=e(\"./c-nv-pic-pr-xform\");t.exports=class extends n{constructor(){super(),this.map={\"xdr:cNvPr\":new i,\"xdr:cNvPicPr\":new s}}get tag(){return\"xdr:nvPicPr\"}render(e,t){e.openNode(this.tag),this.map[\"xdr:cNvPr\"].render(e,t),this.map[\"xdr:cNvPicPr\"].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model=this.map[\"xdr:cNvPr\"].model,!1;default:return!0}}}},{\"../base-xform\":32,\"./c-nv-pic-pr-xform\":59,\"./c-nv-pr-xform\":60}],67:[function(e,t,r){\"use strict\";const n=e(\"./base-cell-anchor-xform\"),i=e(\"../static-xform\"),s=e(\"./cell-position-xform\"),o=e(\"./ext-xform\"),a=e(\"./pic-xform\");t.exports=class extends n{constructor(){super(),this.map={\"xdr:from\":new s({tag:\"xdr:from\"}),\"xdr:ext\":new o({tag:\"xdr:ext\"}),\"xdr:pic\":new a,\"xdr:clientData\":new i({tag:\"xdr:clientData\"})}}get tag(){return\"xdr:oneCellAnchor\"}prepare(e,t){this.map[\"xdr:pic\"].prepare(e.picture,t)}render(e,t){e.openNode(this.tag,{editAs:t.range.editAs||\"oneCell\"}),this.map[\"xdr:from\"].render(e,t.range.tl),this.map[\"xdr:ext\"].render(e,t.range.ext),this.map[\"xdr:pic\"].render(e,t.picture),this.map[\"xdr:clientData\"].render(e,{}),e.closeNode()}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.range.tl=this.map[\"xdr:from\"].model,this.model.range.ext=this.map[\"xdr:ext\"].model,this.model.picture=this.map[\"xdr:pic\"].model,!1;default:return!0}}reconcile(e,t){e.medium=this.reconcilePicture(e.picture,t)}}},{\"../static-xform\":120,\"./base-cell-anchor-xform\":56,\"./cell-position-xform\":61,\"./ext-xform\":64,\"./pic-xform\":68}],68:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"../static-xform\"),s=e(\"./blip-fill-xform\"),o=e(\"./nv-pic-pr-xform\"),a=e(\"./sp-pr\");t.exports=class extends n{constructor(){super(),this.map={\"xdr:nvPicPr\":new o,\"xdr:blipFill\":new s,\"xdr:spPr\":new i(a)}}get tag(){return\"xdr:pic\"}prepare(e,t){e.index=t.index+1}render(e,t){e.openNode(this.tag),this.map[\"xdr:nvPicPr\"].render(e,t),this.map[\"xdr:blipFill\"].render(e,t),this.map[\"xdr:spPr\"].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(e){case this.tag:return!1;default:return!0}}}},{\"../base-xform\":32,\"../static-xform\":120,\"./blip-fill-xform\":57,\"./nv-pic-pr-xform\":66,\"./sp-pr\":69}],69:[function(e,t,r){\"use strict\";t.exports={tag:\"xdr:spPr\",c:[{tag:\"a:xfrm\",c:[{tag:\"a:off\",$:{x:\"0\",y:\"0\"}},{tag:\"a:ext\",$:{cx:\"0\",cy:\"0\"}}]},{tag:\"a:prstGeom\",$:{prst:\"rect\"},c:[{tag:\"a:avLst\"}]}]}},{}],70:[function(e,t,r){\"use strict\";const n=e(\"./base-cell-anchor-xform\"),i=e(\"../static-xform\"),s=e(\"./cell-position-xform\"),o=e(\"./pic-xform\");t.exports=class extends n{constructor(){super(),this.map={\"xdr:from\":new s({tag:\"xdr:from\"}),\"xdr:to\":new s({tag:\"xdr:to\"}),\"xdr:pic\":new o,\"xdr:clientData\":new i({tag:\"xdr:clientData\"})}}get tag(){return\"xdr:twoCellAnchor\"}prepare(e,t){this.map[\"xdr:pic\"].prepare(e.picture,t)}render(e,t){e.openNode(this.tag,{editAs:t.range.editAs||\"oneCell\"}),this.map[\"xdr:from\"].render(e,t.range.tl),this.map[\"xdr:to\"].render(e,t.range.br),this.map[\"xdr:pic\"].render(e,t.picture),this.map[\"xdr:clientData\"].render(e,{}),e.closeNode()}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.range.tl=this.map[\"xdr:from\"].model,this.model.range.br=this.map[\"xdr:to\"].model,this.model.picture=this.map[\"xdr:pic\"].model,!1;default:return!0}}reconcile(e,t){e.medium=this.reconcilePicture(e.picture,t)}}},{\"../static-xform\":120,\"./base-cell-anchor-xform\":56,\"./cell-position-xform\":61,\"./pic-xform\":68}],71:[function(e,t,r){\"use strict\";const n=e(\"./base-xform\");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.always=!!e.always,this.count=e.count,this.empty=e.empty,this.$count=e.$count||\"count\",this.$=e.$,this.childXform=e.childXform,this.maxItems=e.maxItems}prepare(e,t){const{childXform:r}=this;e&&e.forEach((e,n)=>{t.index=n,r.prepare(e,t)})}render(e,t){if(this.always||t&&t.length){e.openNode(this.tag,this.$),this.count&&e.addAttribute(this.$count,t&&t.length||0);const{childXform:r}=this;(t||[]).forEach((t,n)=>{r.render(e,t,n)}),e.closeNode()}else this.empty&&e.leafNode(this.tag)}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(e)&&(this.parser=this.childXform,!0)}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(e,t){if(e){const{childXform:r}=this;e.forEach(e=>{r.reconcile(e,t)})}}}},{\"./base-xform\":32}],72:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/col-cache\"),i=e(\"../base-xform\");t.exports=class extends i{get tag(){return\"autoFilter\"}render(e,t){if(t)if(\"string\"==typeof t)e.leafNode(\"autoFilter\",{ref:t});else{const r=function(e){return\"string\"==typeof e?e:n.getAddress(e.row,e.column).address},i=r(t.from),s=r(t.to);i&&s&&e.leafNode(\"autoFilter\",{ref:`${i}:${s}`})}}parseOpen(e){\"autoFilter\"===e.name&&(this.model=e.attributes.ref)}}},{\"../../../utils/col-cache\":19,\"../base-xform\":32}],73:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/utils\"),i=e(\"../base-xform\"),s=e(\"../../../doc/range\"),o=e(\"../../../doc/enums\"),a=e(\"../strings/rich-text-xform\");function l(e){if(null==e)return o.ValueType.Null;if(e instanceof String||\"string\"==typeof e)return o.ValueType.String;if(\"number\"==typeof e)return o.ValueType.Number;if(\"boolean\"==typeof e)return o.ValueType.Boolean;if(e instanceof Date)return o.ValueType.Date;if(e.text&&e.hyperlink)return o.ValueType.Hyperlink;if(e.formula)return o.ValueType.Formula;if(e.error)return o.ValueType.Error;throw new Error(\"I could not understand type of value\")}t.exports=class extends i{constructor(){super(),this.richTextXForm=new a}get tag(){return\"c\"}prepare(e,t){const r=t.styles.addStyleModel(e.style||{},function(e){switch(e.type){case o.ValueType.Formula:return l(e.result);default:return e.type}}(e));switch(r&&(e.styleId=r),e.comment&&t.comments.push({...e.comment,ref:e.address}),e.type){case o.ValueType.String:case o.ValueType.RichText:t.sharedStrings&&(e.ssId=t.sharedStrings.add(e.value));break;case o.ValueType.Date:t.date1904&&(e.date1904=!0);break;case o.ValueType.Hyperlink:t.sharedStrings&&void 0!==e.text&&null!==e.text&&(e.ssId=t.sharedStrings.add(e.text)),t.hyperlinks.push({address:e.address,target:e.hyperlink,tooltip:e.tooltip});break;case o.ValueType.Merge:t.merges.add(e);break;case o.ValueType.Formula:if(t.date1904&&(e.date1904=!0),\"shared\"===e.shareType&&(e.si=t.siFormulae++),e.formula)t.formulae[e.address]=e;else if(e.sharedFormula){const r=t.formulae[e.sharedFormula];if(!r)throw new Error(\"Shared Formula master must exist above and or left of clone for cell \"+e.address);void 0===r.si?(r.shareType=\"shared\",r.si=t.siFormulae++,r.range=new s(r.address,e.address)):r.range&&r.range.expandToAddress(e.address),e.si=r.si}}}renderFormula(e,t){let r=null;switch(t.shareType){case\"shared\":r={t:\"shared\",ref:t.ref||t.range.range,si:t.si};break;case\"array\":r={t:\"array\",ref:t.ref};break;default:void 0!==t.si&&(r={t:\"shared\",si:t.si})}switch(l(t.result)){case o.ValueType.Null:e.leafNode(\"f\",r,t.formula);break;case o.ValueType.String:e.addAttribute(\"t\",\"str\"),e.leafNode(\"f\",r,t.formula),e.leafNode(\"v\",null,t.result);break;case o.ValueType.Number:e.leafNode(\"f\",r,t.formula),e.leafNode(\"v\",null,t.result);break;case o.ValueType.Boolean:e.addAttribute(\"t\",\"b\"),e.leafNode(\"f\",r,t.formula),e.leafNode(\"v\",null,t.result?1:0);break;case o.ValueType.Error:e.addAttribute(\"t\",\"e\"),e.leafNode(\"f\",r,t.formula),e.leafNode(\"v\",null,t.result.error);break;case o.ValueType.Date:e.leafNode(\"f\",r,t.formula),e.leafNode(\"v\",null,n.dateToExcel(t.result,t.date1904));break;default:throw new Error(\"I could not understand type of value\")}}render(e,t){if(t.type!==o.ValueType.Null||t.styleId){switch(e.openNode(\"c\"),e.addAttribute(\"r\",t.address),t.styleId&&e.addAttribute(\"s\",t.styleId),t.type){case o.ValueType.Null:break;case o.ValueType.Number:e.leafNode(\"v\",null,t.value);break;case o.ValueType.Boolean:e.addAttribute(\"t\",\"b\"),e.leafNode(\"v\",null,t.value?\"1\":\"0\");break;case o.ValueType.Error:e.addAttribute(\"t\",\"e\"),e.leafNode(\"v\",null,t.value.error);break;case o.ValueType.String:case o.ValueType.RichText:void 0!==t.ssId?(e.addAttribute(\"t\",\"s\"),e.leafNode(\"v\",null,t.ssId)):t.value&&t.value.richText?(e.addAttribute(\"t\",\"inlineStr\"),e.openNode(\"is\"),t.value.richText.forEach(t=>{this.richTextXForm.render(e,t)}),e.closeNode(\"is\")):(e.addAttribute(\"t\",\"str\"),e.leafNode(\"v\",null,t.value));break;case o.ValueType.Date:e.leafNode(\"v\",null,n.dateToExcel(t.value,t.date1904));break;case o.ValueType.Hyperlink:void 0!==t.ssId?(e.addAttribute(\"t\",\"s\"),e.leafNode(\"v\",null,t.ssId)):(e.addAttribute(\"t\",\"str\"),e.leafNode(\"v\",null,t.text));break;case o.ValueType.Formula:this.renderFormula(e,t);break;case o.ValueType.Merge:}e.closeNode()}}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"c\":return this.model={address:e.attributes.r},this.t=e.attributes.t,e.attributes.s&&(this.model.styleId=parseInt(e.attributes.s,10)),!0;case\"f\":return this.currentNode=\"f\",this.model.si=e.attributes.si,this.model.shareType=e.attributes.t,this.model.ref=e.attributes.ref,!0;case\"v\":return this.currentNode=\"v\",!0;case\"t\":return this.currentNode=\"t\",!0;case\"r\":return this.parser=this.richTextXForm,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){if(this.parser)this.parser.parseText(e);else switch(this.currentNode){case\"f\":this.model.formula=this.model.formula?this.model.formula+e:e;break;case\"v\":case\"t\":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+e:e:this.model.value=this.model.value?this.model.value+e:e}}parseClose(e){switch(e){case\"c\":{const{model:e}=this;if(e.formula||e.shareType)e.type=o.ValueType.Formula,e.value&&(\"str\"===this.t?e.result=n.xmlDecode(e.value):\"b\"===this.t?e.result=0!==parseInt(e.value,10):\"e\"===this.t?e.result={error:e.value}:e.result=parseFloat(e.value),e.value=void 0);else if(void 0!==e.value)switch(this.t){case\"s\":e.type=o.ValueType.String,e.value=parseInt(e.value,10);break;case\"str\":e.type=o.ValueType.String,e.value=n.xmlDecode(e.value);break;case\"inlineStr\":e.type=o.ValueType.String;break;case\"b\":e.type=o.ValueType.Boolean,e.value=0!==parseInt(e.value,10);break;case\"e\":e.type=o.ValueType.Error,e.value={error:e.value};break;default:e.type=o.ValueType.Number,e.value=parseFloat(e.value)}else e.styleId?e.type=o.ValueType.Null:e.type=o.ValueType.Merge;return!1}case\"f\":case\"v\":case\"is\":return this.currentNode=void 0,!0;case\"t\":return this.parser?(this.parser.parseClose(e),!0):(this.currentNode=void 0,!0);case\"r\":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(e),!0)}}reconcile(e,t){const r=e.styleId&&t.styles&&t.styles.getStyleModel(e.styleId);switch(r&&(e.style=r),void 0!==e.styleId&&(e.styleId=void 0),e.type){case o.ValueType.String:\"number\"==typeof e.value&&t.sharedStrings&&(e.value=t.sharedStrings.getString(e.value)),e.value.richText&&(e.type=o.ValueType.RichText);break;case o.ValueType.Number:r&&n.isDateFmt(r.numFmt)&&(e.type=o.ValueType.Date,e.value=n.excelToDate(e.value,t.date1904));break;case o.ValueType.Formula:void 0!==e.result&&r&&n.isDateFmt(r.numFmt)&&(e.result=n.excelToDate(e.result,t.date1904)),\"shared\"===e.shareType&&(e.ref?t.formulae[e.si]=e.address:(e.sharedFormula=t.formulae[e.si],delete e.shareType),delete e.si)}const i=t.hyperlinkMap[e.address];i&&(e.type===o.ValueType.Formula?(e.text=e.result,e.result=void 0):(e.text=e.value,e.value=void 0),e.type=o.ValueType.Hyperlink,e.hyperlink=i);const s=t.commentsMap&&t.commentsMap[e.address];s&&(e.comment=s)}}},{\"../../../doc/enums\":7,\"../../../doc/range\":10,\"../../../utils/utils\":27,\"../base-xform\":32,\"../strings/rich-text-xform\":122}],74:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\");t.exports=class extends n{get tag(){return\"x14:cfIcon\"}render(e,t){e.leafNode(this.tag,{iconSet:t.iconSet,iconId:t.iconId})}parseOpen(e){let{attributes:t}=e;this.model={iconSet:t.iconSet,iconId:n.toIntValue(t.iconId)}}parseClose(e){return e!==this.tag}}},{\"../../base-xform\":32}],75:[function(e,t,r){\"use strict\";const{v4:n}=e(\"uuid\"),i=e(\"../../base-xform\"),s=e(\"../../composite-xform\"),o=e(\"./databar-ext-xform\"),a=e(\"./icon-set-ext-xform\"),l={\"3Triangles\":!0,\"3Stars\":!0,\"5Boxes\":!0};class c extends s{constructor(){super(),this.map={\"x14:dataBar\":this.databarXform=new o,\"x14:iconSet\":this.iconSetXform=new a}}get tag(){return\"x14:cfRule\"}static isExt(e){return\"dataBar\"===e.type?o.isExt(e):!(\"iconSet\"!==e.type||!e.custom&&!l[e.iconSet])}prepare(e){c.isExt(e)&&(e.x14Id=`{${n()}}`.toUpperCase())}render(e,t){if(c.isExt(t))switch(t.type){case\"dataBar\":this.renderDataBar(e,t);break;case\"iconSet\":this.renderIconSet(e,t)}}renderDataBar(e,t){e.openNode(this.tag,{type:\"dataBar\",id:t.x14Id}),this.databarXform.render(e,t),e.closeNode()}renderIconSet(e,t){e.openNode(this.tag,{type:\"iconSet\",priority:t.priority,id:t.x14Id||`{${n()}}`}),this.iconSetXform.render(e,t),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{type:t.type,x14Id:t.id,priority:i.toIntValue(t.priority)}}onParserClose(e,t){Object.assign(this.model,t.model)}}t.exports=c},{\"../../base-xform\":32,\"../../composite-xform\":48,\"./databar-ext-xform\":79,\"./icon-set-ext-xform\":81,uuid:528}],76:[function(e,t,r){\"use strict\";const n=e(\"../../composite-xform\"),i=e(\"./f-ext-xform\");t.exports=class extends n{constructor(){super(),this.map={\"xm:f\":this.fExtXform=new i}}get tag(){return\"x14:cfvo\"}render(e,t){e.openNode(this.tag,{type:t.type}),void 0!==t.value&&this.fExtXform.render(e,t.value),e.closeNode()}createNewModel(e){return{type:e.attributes.type}}onParserClose(e,t){switch(e){case\"xm:f\":this.model.value=t.model?parseFloat(t.model):0}}}},{\"../../composite-xform\":48,\"./f-ext-xform\":80}],77:[function(e,t,r){\"use strict\";const n=e(\"../../composite-xform\"),i=e(\"./sqref-ext-xform\"),s=e(\"./cf-rule-ext-xform\");t.exports=class extends n{constructor(){super(),this.map={\"xm:sqref\":this.sqRef=new i,\"x14:cfRule\":this.cfRule=new s}}get tag(){return\"x14:conditionalFormatting\"}prepare(e,t){e.rules.forEach(e=>{this.cfRule.prepare(e,t)})}render(e,t){t.rules.some(s.isExt)&&(e.openNode(this.tag,{\"xmlns:xm\":\"http://schemas.microsoft.com/office/excel/2006/main\"}),t.rules.filter(s.isExt).forEach(t=>this.cfRule.render(e,t)),this.sqRef.render(e,t.ref),e.closeNode())}createNewModel(){return{rules:[]}}onParserClose(e,t){switch(e){case\"xm:sqref\":this.model.ref=t.model;break;case\"x14:cfRule\":this.model.rules.push(t.model)}}}},{\"../../composite-xform\":48,\"./cf-rule-ext-xform\":75,\"./sqref-ext-xform\":82}],78:[function(e,t,r){\"use strict\";const n=e(\"../../composite-xform\"),i=e(\"./cf-rule-ext-xform\"),s=e(\"./conditional-formatting-ext-xform\");t.exports=class extends n{constructor(){super(),this.map={\"x14:conditionalFormatting\":this.cfXform=new s}}get tag(){return\"x14:conditionalFormattings\"}hasContent(e){return void 0===e.hasExtContent&&(e.hasExtContent=e.some(e=>e.rules.some(i.isExt))),e.hasExtContent}prepare(e,t){e.forEach(e=>{this.cfXform.prepare(e,t)})}render(e,t){this.hasContent(t)&&(e.openNode(this.tag),t.forEach(t=>this.cfXform.render(e,t)),e.closeNode())}createNewModel(){return[]}onParserClose(e,t){this.model.push(t.model)}}},{\"../../composite-xform\":48,\"./cf-rule-ext-xform\":75,\"./conditional-formatting-ext-xform\":77}],79:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\"),i=e(\"../../composite-xform\"),s=e(\"../../style/color-xform\"),o=e(\"./cfvo-ext-xform\");t.exports=class extends i{constructor(){super(),this.map={\"x14:cfvo\":this.cfvoXform=new o,\"x14:borderColor\":this.borderColorXform=new s(\"x14:borderColor\"),\"x14:negativeBorderColor\":this.negativeBorderColorXform=new s(\"x14:negativeBorderColor\"),\"x14:negativeFillColor\":this.negativeFillColorXform=new s(\"x14:negativeFillColor\"),\"x14:axisColor\":this.axisColorXform=new s(\"x14:axisColor\")}}static isExt(e){return!e.gradient}get tag(){return\"x14:dataBar\"}render(e,t){e.openNode(this.tag,{minLength:n.toIntAttribute(t.minLength,0,!0),maxLength:n.toIntAttribute(t.maxLength,100,!0),border:n.toBoolAttribute(t.border,!1),gradient:n.toBoolAttribute(t.gradient,!0),negativeBarColorSameAsPositive:n.toBoolAttribute(t.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolAttribute(t.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toAttribute(t.axisPosition,\"auto\"),direction:n.toAttribute(t.direction,\"leftToRight\")}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),this.borderColorXform.render(e,t.borderColor),this.negativeBorderColorXform.render(e,t.negativeBorderColor),this.negativeFillColorXform.render(e,t.negativeFillColor),this.axisColorXform.render(e,t.axisColor),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{cfvo:[],minLength:n.toIntValue(t.minLength,0),maxLength:n.toIntValue(t.maxLength,100),border:n.toBoolValue(t.border,!1),gradient:n.toBoolValue(t.gradient,!0),negativeBarColorSameAsPositive:n.toBoolValue(t.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolValue(t.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toStringValue(t.axisPosition,\"auto\"),direction:n.toStringValue(t.direction,\"leftToRight\")}}onParserClose(e,t){const[,r]=e.split(\":\");switch(r){case\"cfvo\":this.model.cfvo.push(t.model);break;default:this.model[r]=t.model}}}},{\"../../base-xform\":32,\"../../composite-xform\":48,\"../../style/color-xform\":128,\"./cfvo-ext-xform\":76}],80:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\");t.exports=class extends n{get tag(){return\"xm:f\"}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=\"\"}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}},{\"../../base-xform\":32}],81:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\"),i=e(\"../../composite-xform\"),s=e(\"./cfvo-ext-xform\"),o=e(\"./cf-icon-ext-xform\");t.exports=class extends i{constructor(){super(),this.map={\"x14:cfvo\":this.cfvoXform=new s,\"x14:cfIcon\":this.cfIconXform=new o}}get tag(){return\"x14:iconSet\"}render(e,t){e.openNode(this.tag,{iconSet:n.toStringAttribute(t.iconSet),reverse:n.toBoolAttribute(t.reverse,!1),showValue:n.toBoolAttribute(t.showValue,!0),custom:n.toBoolAttribute(t.icons,!1)}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),t.icons&&t.icons.forEach((t,r)=>{t.iconId=r,this.cfIconXform.render(e,t)}),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{cfvo:[],iconSet:n.toStringValue(t.iconSet,\"3TrafficLights\"),reverse:n.toBoolValue(t.reverse,!1),showValue:n.toBoolValue(t.showValue,!0)}}onParserClose(e,t){const[,r]=e.split(\":\");switch(r){case\"cfvo\":this.model.cfvo.push(t.model);break;case\"cfIcon\":this.model.icons||(this.model.icons=[]),this.model.icons.push(t.model);break;default:this.model[r]=t.model}}}},{\"../../base-xform\":32,\"../../composite-xform\":48,\"./cf-icon-ext-xform\":74,\"./cfvo-ext-xform\":76}],82:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\");t.exports=class extends n{get tag(){return\"xm:sqref\"}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=\"\"}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}},{\"../../base-xform\":32}],83:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\"),i=e(\"../../composite-xform\"),s=e(\"../../../../doc/range\"),o=e(\"./databar-xform\"),a=e(\"./ext-lst-ref-xform\"),l=e(\"./formula-xform\"),c=e(\"./color-scale-xform\"),u=e(\"./icon-set-xform\"),h={\"3Triangles\":!0,\"3Stars\":!0,\"5Boxes\":!0},f=e=>{const{type:t,operator:r}=e;switch(t){case\"containsText\":case\"containsBlanks\":case\"notContainsBlanks\":case\"containsErrors\":case\"notContainsErrors\":return{type:\"containsText\",operator:t};default:return{type:t,operator:r}}};class d extends i{constructor(){super(),this.map={dataBar:this.databarXform=new o,extLst:this.extLstRefXform=new a,formula:this.formulaXform=new l,colorScale:this.colorScaleXform=new c,iconSet:this.iconSetXform=new u}}get tag(){return\"cfRule\"}static isPrimitive(e){return\"iconSet\"!==e.type||!e.custom&&!h[e.iconSet]}render(e,t){switch(t.type){case\"expression\":this.renderExpression(e,t);break;case\"cellIs\":this.renderCellIs(e,t);break;case\"top10\":this.renderTop10(e,t);break;case\"aboveAverage\":this.renderAboveAverage(e,t);break;case\"dataBar\":this.renderDataBar(e,t);break;case\"colorScale\":this.renderColorScale(e,t);break;case\"iconSet\":this.renderIconSet(e,t);break;case\"containsText\":this.renderText(e,t);break;case\"timePeriod\":this.renderTimePeriod(e,t)}}renderExpression(e,t){e.openNode(this.tag,{type:\"expression\",dxfId:t.dxfId,priority:t.priority}),this.formulaXform.render(e,t.formulae[0]),e.closeNode()}renderCellIs(e,t){e.openNode(this.tag,{type:\"cellIs\",dxfId:t.dxfId,priority:t.priority,operator:t.operator}),t.formulae.forEach(t=>{this.formulaXform.render(e,t)}),e.closeNode()}renderTop10(e,t){e.leafNode(this.tag,{type:\"top10\",dxfId:t.dxfId,priority:t.priority,percent:n.toBoolAttribute(t.percent,!1),bottom:n.toBoolAttribute(t.bottom,!1),rank:n.toIntValue(t.rank,10,!0)})}renderAboveAverage(e,t){e.leafNode(this.tag,{type:\"aboveAverage\",dxfId:t.dxfId,priority:t.priority,aboveAverage:n.toBoolAttribute(t.aboveAverage,!0)})}renderDataBar(e,t){e.openNode(this.tag,{type:\"dataBar\",priority:t.priority}),this.databarXform.render(e,t),this.extLstRefXform.render(e,t),e.closeNode()}renderColorScale(e,t){e.openNode(this.tag,{type:\"colorScale\",priority:t.priority}),this.colorScaleXform.render(e,t),e.closeNode()}renderIconSet(e,t){d.isPrimitive(t)&&(e.openNode(this.tag,{type:\"iconSet\",priority:t.priority}),this.iconSetXform.render(e,t),e.closeNode())}renderText(e,t){e.openNode(this.tag,{type:t.operator,dxfId:t.dxfId,priority:t.priority,operator:n.toStringAttribute(t.operator,\"containsText\")});const r=(e=>{if(e.formulae&&e.formulae[0])return e.formulae[0];const t=new s(e.ref),{tl:r}=t;switch(e.operator){case\"containsText\":return`NOT(ISERROR(SEARCH(\"${e.text}\",${r})))`;case\"containsBlanks\":return`LEN(TRIM(${r}))=0`;case\"notContainsBlanks\":return`LEN(TRIM(${r}))>0`;case\"containsErrors\":return`ISERROR(${r})`;case\"notContainsErrors\":return`NOT(ISERROR(${r}))`;default:return}})(t);r&&this.formulaXform.render(e,r),e.closeNode()}renderTimePeriod(e,t){e.openNode(this.tag,{type:\"timePeriod\",dxfId:t.dxfId,priority:t.priority,timePeriod:t.timePeriod});const r=(e=>{if(e.formulae&&e.formulae[0])return e.formulae[0];const t=new s(e.ref),{tl:r}=t;switch(e.timePeriod){case\"thisWeek\":return`AND(TODAY()-ROUNDDOWN(${r},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${r},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case\"lastWeek\":return`AND(TODAY()-ROUNDDOWN(${r},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${r},0)<(WEEKDAY(TODAY())+7))`;case\"nextWeek\":return`AND(ROUNDDOWN(${r},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${r},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case\"yesterday\":return`FLOOR(${r},1)=TODAY()-1`;case\"today\":return`FLOOR(${r},1)=TODAY()`;case\"tomorrow\":return`FLOOR(${r},1)=TODAY()+1`;case\"last7Days\":return`AND(TODAY()-FLOOR(${r},1)<=6,FLOOR(${r},1)<=TODAY())`;case\"lastMonth\":return`AND(MONTH(${r})=MONTH(EDATE(TODAY(),0-1)),YEAR(${r})=YEAR(EDATE(TODAY(),0-1)))`;case\"thisMonth\":return`AND(MONTH(${r})=MONTH(TODAY()),YEAR(${r})=YEAR(TODAY()))`;case\"nextMonth\":return`AND(MONTH(${r})=MONTH(EDATE(TODAY(),0+1)),YEAR(${r})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(t);r&&this.formulaXform.render(e,r),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{...f(t),dxfId:n.toIntValue(t.dxfId),priority:n.toIntValue(t.priority),timePeriod:t.timePeriod,percent:n.toBoolValue(t.percent),bottom:n.toBoolValue(t.bottom),rank:n.toIntValue(t.rank),aboveAverage:n.toBoolValue(t.aboveAverage)}}onParserClose(e,t){switch(e){case\"dataBar\":case\"extLst\":case\"colorScale\":case\"iconSet\":Object.assign(this.model,t.model);break;case\"formula\":this.model.formulae=this.model.formulae||[],this.model.formulae.push(t.model)}}}t.exports=d},{\"../../../../doc/range\":10,\"../../base-xform\":32,\"../../composite-xform\":48,\"./color-scale-xform\":85,\"./databar-xform\":88,\"./ext-lst-ref-xform\":89,\"./formula-xform\":90,\"./icon-set-xform\":91}],84:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\");t.exports=class extends n{get tag(){return\"cfvo\"}render(e,t){e.leafNode(this.tag,{type:t.type,val:t.value})}parseOpen(e){this.model={type:e.attributes.type,value:n.toFloatValue(e.attributes.val)}}parseClose(e){return e!==this.tag}}},{\"../../base-xform\":32}],85:[function(e,t,r){\"use strict\";const n=e(\"../../composite-xform\"),i=e(\"../../style/color-xform\"),s=e(\"./cfvo-xform\");t.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new i}}get tag(){return\"colorScale\"}render(e,t){e.openNode(this.tag),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),t.color.forEach(t=>{this.colorXform.render(e,t)}),e.closeNode()}createNewModel(e){return{cfvo:[],color:[]}}onParserClose(e,t){this.model[e].push(t.model)}}},{\"../../composite-xform\":48,\"../../style/color-xform\":128,\"./cfvo-xform\":84}],86:[function(e,t,r){\"use strict\";const n=e(\"../../composite-xform\"),i=e(\"./cf-rule-xform\");t.exports=class extends n{constructor(){super(),this.map={cfRule:new i}}get tag(){return\"conditionalFormatting\"}render(e,t){t.rules.some(i.isPrimitive)&&(e.openNode(this.tag,{sqref:t.ref}),t.rules.forEach(r=>{i.isPrimitive(r)&&(r.ref=t.ref,this.map.cfRule.render(e,r))}),e.closeNode())}createNewModel(e){let{attributes:t}=e;return{ref:t.sqref,rules:[]}}onParserClose(e,t){this.model.rules.push(t.model)}}},{\"../../composite-xform\":48,\"./cf-rule-xform\":83}],87:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\"),i=e(\"./conditional-formatting-xform\");t.exports=class extends n{constructor(){super(),this.cfXform=new i}get tag(){return\"conditionalFormatting\"}reset(){this.model=[]}prepare(e,t){let r=e.reduce((e,t)=>Math.max(e,...t.rules.map(e=>e.priority||0)),1);e.forEach(e=>{e.rules.forEach(e=>{e.priority||(e.priority=r++),e.style&&(e.dxfId=t.styles.addDxfStyle(e.style))})})}render(e,t){t.forEach(t=>{this.cfXform.render(e,t)})}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"conditionalFormatting\":return this.parser=this.cfXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return!!this.parser&&(!!this.parser.parseClose(e)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(e,t){e.forEach(e=>{e.rules.forEach(e=>{void 0!==e.dxfId&&(e.style=t.styles.getDxfStyle(e.dxfId),delete e.dxfId)})})}}},{\"../../base-xform\":32,\"./conditional-formatting-xform\":86}],88:[function(e,t,r){\"use strict\";const n=e(\"../../composite-xform\"),i=e(\"../../style/color-xform\"),s=e(\"./cfvo-xform\");t.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new i}}get tag(){return\"dataBar\"}render(e,t){e.openNode(this.tag),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),this.colorXform.render(e,t.color),e.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(e,t){switch(e){case\"cfvo\":this.model.cfvo.push(t.model);break;case\"color\":this.model.color=t.model}}}},{\"../../composite-xform\":48,\"../../style/color-xform\":128,\"./cfvo-xform\":84}],89:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\"),i=e(\"../../composite-xform\");class s extends n{get tag(){return\"x14:id\"}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=\"\"}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}class o extends i{constructor(){super(),this.map={\"x14:id\":this.idXform=new s}}get tag(){return\"ext\"}render(e,t){e.openNode(this.tag,{uri:\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\",\"xmlns:x14\":\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"}),this.idXform.render(e,t.x14Id),e.closeNode()}createNewModel(){return{}}onParserClose(e,t){this.model.x14Id=t.model}}t.exports=class extends i{constructor(){super(),this.map={ext:new o}}get tag(){return\"extLst\"}render(e,t){e.openNode(this.tag),this.map.ext.render(e,t),e.closeNode()}createNewModel(){return{}}onParserClose(e,t){Object.assign(this.model,t.model)}}},{\"../../base-xform\":32,\"../../composite-xform\":48}],90:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\");t.exports=class extends n{get tag(){return\"formula\"}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=\"\"}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}},{\"../../base-xform\":32}],91:[function(e,t,r){\"use strict\";const n=e(\"../../base-xform\"),i=e(\"../../composite-xform\"),s=e(\"./cfvo-xform\");t.exports=class extends i{constructor(){super(),this.map={cfvo:this.cfvoXform=new s}}get tag(){return\"iconSet\"}render(e,t){e.openNode(this.tag,{iconSet:n.toStringAttribute(t.iconSet,\"3TrafficLights\"),reverse:n.toBoolAttribute(t.reverse,!1),showValue:n.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{iconSet:n.toStringValue(t.iconSet,\"3TrafficLights\"),reverse:n.toBoolValue(t.reverse),showValue:n.toBoolValue(t.showValue),cfvo:[]}}onParserClose(e,t){this.model[e].push(t.model)}}},{\"../../base-xform\":32,\"../../composite-xform\":48,\"./cfvo-xform\":84}],92:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/utils\"),i=e(\"../base-xform\");t.exports=class extends i{get tag(){return\"col\"}prepare(e,t){const r=t.styles.addStyleModel(e.style||{});r&&(e.styleId=r)}render(e,t){e.openNode(\"col\"),e.addAttribute(\"min\",t.min),e.addAttribute(\"max\",t.max),t.width&&e.addAttribute(\"width\",t.width),t.styleId&&e.addAttribute(\"style\",t.styleId),t.hidden&&e.addAttribute(\"hidden\",\"1\"),t.bestFit&&e.addAttribute(\"bestFit\",\"1\"),t.outlineLevel&&e.addAttribute(\"outlineLevel\",t.outlineLevel),t.collapsed&&e.addAttribute(\"collapsed\",\"1\"),e.addAttribute(\"customWidth\",\"1\"),e.closeNode()}parseOpen(e){if(\"col\"===e.name){const t=this.model={min:parseInt(e.attributes.min||\"0\",10),max:parseInt(e.attributes.max||\"0\",10),width:void 0===e.attributes.width?void 0:parseFloat(e.attributes.width||\"0\")};return e.attributes.style&&(t.styleId=parseInt(e.attributes.style,10)),n.parseBoolean(e.attributes.hidden)&&(t.hidden=!0),n.parseBoolean(e.attributes.bestFit)&&(t.bestFit=!0),e.attributes.outlineLevel&&(t.outlineLevel=parseInt(e.attributes.outlineLevel,10)),n.parseBoolean(e.attributes.collapsed)&&(t.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(e,t){e.styleId&&(e.style=t.styles.getStyleModel(e.styleId))}}},{\"../../../utils/utils\":27,\"../base-xform\":32}],93:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../../../utils/utils\"),s=e(\"../../../utils/col-cache\"),o=e(\"../base-xform\"),a=e(\"../../../doc/range\");function l(e,t,r,n){const i=t[r];void 0!==i?e[r]=i:void 0!==n&&(e[r]=n)}function c(e,t,r,n){const s=t[r];void 0!==s?e[r]=i.parseBoolean(s):void 0!==n&&(e[r]=n)}t.exports=class extends o{get tag(){return\"dataValidations\"}render(e,t){const r=function(e){const t=n.map(e,(e,t)=>({address:t,dataValidation:e,marked:!1})).sort((e,t)=>n.strcmp(e.address,t.address)),r=n.keyBy(t,\"address\"),i=(t,r,i)=>{for(let o=0;o{if(!t.marked){const o=s.decodeEx(t.address);if(o.dimensions)return r[o.dimensions].marked=!0,{...t.dataValidation,sqref:t.address};let a=1,l=s.encodeAddress(o.row+a,o.col);for(;e[l]&&n.isEqual(t.dataValidation,e[l]);)a++,l=s.encodeAddress(o.row+a,o.col);let c=1;for(;i(o,a,o.col+c);)c++;for(let e=0;e1||c>1){const e=o.row+(a-1),r=o.col+(c-1);return{...t.dataValidation,sqref:`${t.address}:${s.encodeAddress(e,r)}`}}return{...t.dataValidation,sqref:t.address}}return null}).filter(Boolean)}(t);r.length&&(e.openNode(\"dataValidations\",{count:r.length}),r.forEach(t=>{e.openNode(\"dataValidation\"),\"any\"!==t.type&&(e.addAttribute(\"type\",t.type),t.operator&&\"list\"!==t.type&&\"between\"!==t.operator&&e.addAttribute(\"operator\",t.operator),t.allowBlank&&e.addAttribute(\"allowBlank\",\"1\")),t.showInputMessage&&e.addAttribute(\"showInputMessage\",\"1\"),t.promptTitle&&e.addAttribute(\"promptTitle\",t.promptTitle),t.prompt&&e.addAttribute(\"prompt\",t.prompt),t.showErrorMessage&&e.addAttribute(\"showErrorMessage\",\"1\"),t.errorStyle&&e.addAttribute(\"errorStyle\",t.errorStyle),t.errorTitle&&e.addAttribute(\"errorTitle\",t.errorTitle),t.error&&e.addAttribute(\"error\",t.error),e.addAttribute(\"sqref\",t.sqref),(t.formulae||[]).forEach((r,n)=>{e.openNode(\"formula\"+(n+1)),\"date\"===t.type?e.writeText(i.dateToExcel(new Date(r))):e.writeText(r),e.closeNode()}),e.closeNode()}),e.closeNode())}parseOpen(e){switch(e.name){case\"dataValidations\":return this.model={},!0;case\"dataValidation\":{this._address=e.attributes.sqref;const t={type:e.attributes.type||\"any\",formulae:[]};switch(e.attributes.type&&c(t,e.attributes,\"allowBlank\"),c(t,e.attributes,\"showInputMessage\"),c(t,e.attributes,\"showErrorMessage\"),t.type){case\"any\":case\"list\":case\"custom\":break;default:l(t,e.attributes,\"operator\",\"between\")}return l(t,e.attributes,\"promptTitle\"),l(t,e.attributes,\"prompt\"),l(t,e.attributes,\"errorStyle\"),l(t,e.attributes,\"errorTitle\"),l(t,e.attributes,\"error\"),this._dataValidation=t,!0}case\"formula1\":case\"formula2\":return this._formula=[],!0;default:return!1}}parseText(e){this._formula&&this._formula.push(e)}parseClose(e){switch(e){case\"dataValidations\":return!1;case\"dataValidation\":this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator);return(this._address.split(/\\s+/g)||[]).forEach(e=>{if(e.includes(\":\")){new a(e).forEachAddress(e=>{this.model[e]=this._dataValidation})}else this.model[e]=this._dataValidation}),!0;case\"formula1\":case\"formula2\":{let e=this._formula.join(\"\");switch(this._dataValidation.type){case\"whole\":case\"textLength\":e=parseInt(e,10);break;case\"decimal\":e=parseFloat(e);break;case\"date\":e=i.excelToDate(parseFloat(e))}return this._dataValidation.formulae.push(e),this._formula=void 0,!0}default:return!0}}}},{\"../../../doc/range\":10,\"../../../utils/col-cache\":19,\"../../../utils/under-dash\":26,\"../../../utils/utils\":27,\"../base-xform\":32}],94:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"dimension\"}render(e,t){t&&e.leafNode(\"dimension\",{ref:t})}parseOpen(e){return\"dimension\"===e.name&&(this.model=e.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],95:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"drawing\"}render(e,t){t&&e.leafNode(this.tag,{\"r:id\":t.rId})}parseOpen(e){switch(e.name){case this.tag:return this.model={rId:e.attributes[\"r:id\"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],96:[function(e,t,r){\"use strict\";const n=e(\"../composite-xform\"),i=e(\"./cf-ext/conditional-formattings-ext-xform\");class s extends n{constructor(){super(),this.map={\"x14:conditionalFormattings\":this.conditionalFormattings=new i}}get tag(){return\"ext\"}hasContent(e){return this.conditionalFormattings.hasContent(e.conditionalFormattings)}prepare(e,t){this.conditionalFormattings.prepare(e.conditionalFormattings,t)}render(e,t){e.openNode(\"ext\",{uri:\"{78C0D931-6437-407d-A8EE-F0AAD7539E65}\",\"xmlns:x14\":\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"}),this.conditionalFormattings.render(e,t.conditionalFormattings),e.closeNode()}createNewModel(){return{}}onParserClose(e,t){this.model[e]=t.model}}t.exports=class extends n{constructor(){super(),this.map={ext:this.ext=new s}}get tag(){return\"extLst\"}prepare(e,t){this.ext.prepare(e,t)}hasContent(e){return this.ext.hasContent(e)}render(e,t){this.hasContent(t)&&(e.openNode(\"extLst\"),this.ext.render(e,t),e.closeNode())}createNewModel(){return{}}onParserClose(e,t){Object.assign(this.model,t.model)}}},{\"../composite-xform\":48,\"./cf-ext/conditional-formattings-ext-xform\":78}],97:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"headerFooter\"}render(e,t){if(t){e.addRollback();let r=!1;e.openNode(\"headerFooter\"),t.differentFirst&&(e.addAttribute(\"differentFirst\",\"1\"),r=!0),t.differentOddEven&&(e.addAttribute(\"differentOddEven\",\"1\"),r=!0),t.oddHeader&&\"string\"==typeof t.oddHeader&&(e.leafNode(\"oddHeader\",null,t.oddHeader),r=!0),t.oddFooter&&\"string\"==typeof t.oddFooter&&(e.leafNode(\"oddFooter\",null,t.oddFooter),r=!0),t.evenHeader&&\"string\"==typeof t.evenHeader&&(e.leafNode(\"evenHeader\",null,t.evenHeader),r=!0),t.evenFooter&&\"string\"==typeof t.evenFooter&&(e.leafNode(\"evenFooter\",null,t.evenFooter),r=!0),t.firstHeader&&\"string\"==typeof t.firstHeader&&(e.leafNode(\"firstHeader\",null,t.firstHeader),r=!0),t.firstFooter&&\"string\"==typeof t.firstFooter&&(e.leafNode(\"firstFooter\",null,t.firstFooter),r=!0),r?(e.closeNode(),e.commit()):e.rollback()}}parseOpen(e){switch(e.name){case\"headerFooter\":return this.model={},e.attributes.differentFirst&&(this.model.differentFirst=1===parseInt(e.attributes.differentFirst,0)),e.attributes.differentOddEven&&(this.model.differentOddEven=1===parseInt(e.attributes.differentOddEven,0)),!0;case\"oddHeader\":return this.currentNode=\"oddHeader\",!0;case\"oddFooter\":return this.currentNode=\"oddFooter\",!0;case\"evenHeader\":return this.currentNode=\"evenHeader\",!0;case\"evenFooter\":return this.currentNode=\"evenFooter\",!0;case\"firstHeader\":return this.currentNode=\"firstHeader\",!0;case\"firstFooter\":return this.currentNode=\"firstFooter\",!0;default:return!1}}parseText(e){switch(this.currentNode){case\"oddHeader\":this.model.oddHeader=e;break;case\"oddFooter\":this.model.oddFooter=e;break;case\"evenHeader\":this.model.evenHeader=e;break;case\"evenFooter\":this.model.evenFooter=e;break;case\"firstHeader\":this.model.firstHeader=e;break;case\"firstFooter\":this.model.firstFooter=e}}parseClose(){switch(this.currentNode){case\"oddHeader\":case\"oddFooter\":case\"evenHeader\":case\"evenFooter\":case\"firstHeader\":case\"firstFooter\":return this.currentNode=void 0,!0;default:return!1}}}},{\"../base-xform\":32}],98:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"hyperlink\"}render(e,t){this.isInternalLink(t)?e.leafNode(\"hyperlink\",{ref:t.address,\"r:id\":t.rId,tooltip:t.tooltip,location:t.target}):e.leafNode(\"hyperlink\",{ref:t.address,\"r:id\":t.rId,tooltip:t.tooltip})}parseOpen(e){return\"hyperlink\"===e.name&&(this.model={address:e.attributes.ref,rId:e.attributes[\"r:id\"],tooltip:e.attributes.tooltip},e.attributes.location&&(this.model.target=e.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(e){return e.target&&/^[^!]+![a-zA-Z]+[\\d]+$/.test(e.target)}}},{\"../base-xform\":32}],99:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"mergeCell\"}render(e,t){e.leafNode(\"mergeCell\",{ref:t})}parseOpen(e){return\"mergeCell\"===e.name&&(this.model=e.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],100:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../../../doc/range\"),s=e(\"../../../utils/col-cache\"),o=e(\"../../../doc/enums\");t.exports=class{constructor(){this.merges={}}add(e){if(this.merges[e.master])this.merges[e.master].expandToAddress(e.address);else{const t=`${e.master}:${e.address}`;this.merges[e.master]=new i(t)}}get mergeCells(){return n.map(this.merges,e=>e.range)}reconcile(e,t){n.each(e,e=>{const r=s.decode(e);for(let e=r.top;e<=r.bottom;e++){const n=t[e-1];for(let t=r.left;t<=r.right;t++){const i=n.cells[t-1];i?i.type===o.ValueType.Merge&&(i.master=r.tl):n.cells[t]={type:o.ValueType.Null,address:s.encodeAddress(e,t)}}}})}getMasterAddress(e){const t=this.hash[e];return t&&t.tl}}},{\"../../../doc/enums\":7,\"../../../doc/range\":10,\"../../../utils/col-cache\":19,\"../../../utils/under-dash\":26}],101:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e=>void 0!==e;t.exports=class extends n{get tag(){return\"outlinePr\"}render(e,t){return!(!t||!i(t.summaryBelow)&&!i(t.summaryRight))&&(e.leafNode(this.tag,{summaryBelow:i(t.summaryBelow)?Number(t.summaryBelow):void 0,summaryRight:i(t.summaryRight)?Number(t.summaryRight):void 0}),!0)}parseOpen(e){return e.name===this.tag&&(this.model={summaryBelow:i(e.attributes.summaryBelow)?Boolean(Number(e.attributes.summaryBelow)):void 0,summaryRight:i(e.attributes.summaryRight)?Boolean(Number(e.attributes.summaryRight)):void 0},!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],102:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"brk\"}render(e,t){e.leafNode(\"brk\",t)}parseOpen(e){return\"brk\"===e.name&&(this.model=e.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],103:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../base-xform\");t.exports=class extends i{get tag(){return\"pageMargins\"}render(e,t){if(t){const r={left:t.left,right:t.right,top:t.top,bottom:t.bottom,header:t.header,footer:t.footer};n.some(r,e=>void 0!==e)&&e.leafNode(this.tag,r)}}parseOpen(e){switch(e.name){case this.tag:return this.model={left:parseFloat(e.attributes.left||.7),right:parseFloat(e.attributes.right||.7),top:parseFloat(e.attributes.top||.75),bottom:parseFloat(e.attributes.bottom||.75),header:parseFloat(e.attributes.header||.3),footer:parseFloat(e.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{\"../../../utils/under-dash\":26,\"../base-xform\":32}],104:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"pageSetUpPr\"}render(e,t){return!(!t||!t.fitToPage)&&(e.leafNode(this.tag,{fitToPage:t.fitToPage?\"1\":void 0}),!0)}parseOpen(e){return e.name===this.tag&&(this.model={fitToPage:\"1\"===e.attributes.fitToPage},!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],105:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../base-xform\");function s(e){return e?\"1\":void 0}function o(e){switch(e){case\"overThenDown\":return e;default:return}}function a(e){switch(e){case\"atEnd\":case\"asDisplyed\":return e;default:return}}function l(e){switch(e){case\"dash\":case\"blank\":case\"NA\":return e;default:return}}t.exports=class extends i{get tag(){return\"pageSetup\"}render(e,t){if(t){const r={paperSize:t.paperSize,orientation:t.orientation,horizontalDpi:t.horizontalDpi,verticalDpi:t.verticalDpi,pageOrder:o(t.pageOrder),blackAndWhite:s(t.blackAndWhite),draft:s(t.draft),cellComments:a(t.cellComments),errors:l(t.errors),scale:t.scale,fitToWidth:t.fitToWidth,fitToHeight:t.fitToHeight,firstPageNumber:t.firstPageNumber,useFirstPageNumber:s(t.firstPageNumber),usePrinterDefaults:s(t.usePrinterDefaults),copies:t.copies};n.some(r,e=>void 0!==e)&&e.leafNode(this.tag,r)}}parseOpen(e){switch(e.name){case this.tag:return this.model={paperSize:(t=e.attributes.paperSize,void 0!==t?parseInt(t,10):void 0),orientation:e.attributes.orientation||\"portrait\",horizontalDpi:parseInt(e.attributes.horizontalDpi||\"4294967295\",10),verticalDpi:parseInt(e.attributes.verticalDpi||\"4294967295\",10),pageOrder:e.attributes.pageOrder||\"downThenOver\",blackAndWhite:\"1\"===e.attributes.blackAndWhite,draft:\"1\"===e.attributes.draft,cellComments:e.attributes.cellComments||\"None\",errors:e.attributes.errors||\"displayed\",scale:parseInt(e.attributes.scale||\"100\",10),fitToWidth:parseInt(e.attributes.fitToWidth||\"1\",10),fitToHeight:parseInt(e.attributes.fitToHeight||\"1\",10),firstPageNumber:parseInt(e.attributes.firstPageNumber||\"1\",10),useFirstPageNumber:\"1\"===e.attributes.useFirstPageNumber,usePrinterDefaults:\"1\"===e.attributes.usePrinterDefaults,copies:parseInt(e.attributes.copies||\"1\",10)},!0;default:return!1}var t}parseText(){}parseClose(){return!1}}},{\"../../../utils/under-dash\":26,\"../base-xform\":32}],106:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"picture\"}render(e,t){t&&e.leafNode(this.tag,{\"r:id\":t.rId})}parseOpen(e){switch(e.name){case this.tag:return this.model={rId:e.attributes[\"r:id\"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],107:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../base-xform\");function s(e){return e?\"1\":void 0}t.exports=class extends i{get tag(){return\"printOptions\"}render(e,t){if(t){const r={headings:s(t.showRowColHeaders),gridLines:s(t.showGridLines),horizontalCentered:s(t.horizontalCentered),verticalCentered:s(t.verticalCentered)};n.some(r,e=>void 0!==e)&&e.leafNode(this.tag,r)}}parseOpen(e){switch(e.name){case this.tag:return this.model={showRowColHeaders:\"1\"===e.attributes.headings,showGridLines:\"1\"===e.attributes.gridLines,horizontalCentered:\"1\"===e.attributes.horizontalCentered,verticalCentered:\"1\"===e.attributes.verticalCentered},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{\"../../../utils/under-dash\":26,\"../base-xform\":32}],108:[function(e,t,r){\"use strict\";const n=e(\"./page-breaks-xform\"),i=e(\"../list-xform\");t.exports=class extends i{constructor(){super({tag:\"rowBreaks\",count:!0,childXform:new n})}render(e,t){if(t&&t.length){e.openNode(this.tag,this.$),this.count&&(e.addAttribute(this.$count,t.length),e.addAttribute(\"manualBreakCount\",t.length));const{childXform:r}=this;t.forEach(t=>{r.render(e,t)}),e.closeNode()}else this.empty&&e.leafNode(this.tag)}}},{\"../list-xform\":71,\"./page-breaks-xform\":102}],109:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"../../../utils/utils\"),s=e(\"./cell-xform\");t.exports=class extends n{constructor(e){super(),this.maxItems=e&&e.maxItems,this.map={c:new s}}get tag(){return\"row\"}prepare(e,t){const r=t.styles.addStyleModel(e.style);r&&(e.styleId=r);const n=this.map.c;e.cells.forEach(e=>{n.prepare(e,t)})}render(e,t,r){e.openNode(\"row\"),e.addAttribute(\"r\",t.number),t.height&&(e.addAttribute(\"ht\",t.height),e.addAttribute(\"customHeight\",\"1\")),t.hidden&&e.addAttribute(\"hidden\",\"1\"),t.min>0&&t.max>0&&t.min<=t.max&&e.addAttribute(\"spans\",`${t.min}:${t.max}`),t.styleId&&(e.addAttribute(\"s\",t.styleId),e.addAttribute(\"customFormat\",\"1\")),e.addAttribute(\"x14ac:dyDescent\",\"0.25\"),t.outlineLevel&&e.addAttribute(\"outlineLevel\",t.outlineLevel),t.collapsed&&e.addAttribute(\"collapsed\",\"1\");const n=this.map.c;t.cells.forEach(t=>{n.render(e,t,r)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(\"row\"===e.name){this.numRowsSeen+=1;const t=e.attributes.spans?e.attributes.spans.split(\":\").map(e=>parseInt(e,10)):[void 0,void 0],r=this.model={number:parseInt(e.attributes.r,10),min:t[0],max:t[1],cells:[]};return e.attributes.s&&(r.styleId=parseInt(e.attributes.s,10)),i.parseBoolean(e.attributes.hidden)&&(r.hidden=!0),i.parseBoolean(e.attributes.bestFit)&&(r.bestFit=!0),e.attributes.ht&&(r.height=parseFloat(e.attributes.ht)),e.attributes.outlineLevel&&(r.outlineLevel=parseInt(e.attributes.outlineLevel,10)),i.parseBoolean(e.attributes.collapsed)&&(r.collapsed=!0),!0}return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(e,t){e.style=e.styleId?t.styles.getStyleModel(e.styleId):{},void 0!==e.styleId&&(e.styleId=void 0);const r=this.map.c;e.cells.forEach(e=>{r.reconcile(e,t)})}}},{\"../../../utils/utils\":27,\"../base-xform\":32,\"./cell-xform\":73}],110:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../base-xform\");t.exports=class extends i{get tag(){return\"sheetFormatPr\"}render(e,t){if(t){const r={defaultRowHeight:t.defaultRowHeight,outlineLevelRow:t.outlineLevelRow,outlineLevelCol:t.outlineLevelCol,\"x14ac:dyDescent\":t.dyDescent};t.defaultColWidth&&(r.defaultColWidth=t.defaultColWidth),t.defaultRowHeight&&15===t.defaultRowHeight||(r.customHeight=\"1\"),n.some(r,e=>void 0!==e)&&e.leafNode(\"sheetFormatPr\",r)}}parseOpen(e){return\"sheetFormatPr\"===e.name&&(this.model={defaultRowHeight:parseFloat(e.attributes.defaultRowHeight||\"0\"),dyDescent:parseFloat(e.attributes[\"x14ac:dyDescent\"]||\"0\"),outlineLevelRow:parseInt(e.attributes.outlineLevelRow||\"0\",10),outlineLevelCol:parseInt(e.attributes.outlineLevelCol||\"0\",10)},e.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(e.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{\"../../../utils/under-dash\":26,\"../base-xform\":32}],111:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"../style/color-xform\"),s=e(\"./page-setup-properties-xform\"),o=e(\"./outline-properties-xform\");t.exports=class extends n{constructor(){super(),this.map={tabColor:new i(\"tabColor\"),pageSetUpPr:new s,outlinePr:new o}}get tag(){return\"sheetPr\"}render(e,t){if(t){e.addRollback(),e.openNode(\"sheetPr\");let r=!1;r=this.map.tabColor.render(e,t.tabColor)||r,r=this.map.pageSetUpPr.render(e,t.pageSetup)||r,r=this.map.outlinePr.render(e,t.outlineProperties)||r,r?(e.closeNode(),e.commit()):e.rollback()}}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.reset(),!0):!!this.map[e.name]&&(this.parser=this.map[e.name],this.parser.parseOpen(e),!0)}parseText(e){return!!this.parser&&(this.parser.parseText(e),!0)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{\"../base-xform\":32,\"../style/color-xform\":128,\"./outline-properties-xform\":101,\"./page-setup-properties-xform\":104}],112:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../base-xform\");function s(e,t){return e?t:void 0}function o(e,t){return e===t||void 0}t.exports=class extends i{get tag(){return\"sheetProtection\"}render(e,t){if(t){const r={sheet:s(t.sheet,\"1\"),selectLockedCells:!1===t.selectLockedCells?\"1\":void 0,selectUnlockedCells:!1===t.selectUnlockedCells?\"1\":void 0,formatCells:s(t.formatCells,\"0\"),formatColumns:s(t.formatColumns,\"0\"),formatRows:s(t.formatRows,\"0\"),insertColumns:s(t.insertColumns,\"0\"),insertRows:s(t.insertRows,\"0\"),insertHyperlinks:s(t.insertHyperlinks,\"0\"),deleteColumns:s(t.deleteColumns,\"0\"),deleteRows:s(t.deleteRows,\"0\"),sort:s(t.sort,\"0\"),autoFilter:s(t.autoFilter,\"0\"),pivotTables:s(t.pivotTables,\"0\")};t.sheet&&(r.algorithmName=t.algorithmName,r.hashValue=t.hashValue,r.saltValue=t.saltValue,r.spinCount=t.spinCount,r.objects=s(!1===t.objects,\"1\"),r.scenarios=s(!1===t.scenarios,\"1\")),n.some(r,e=>void 0!==e)&&e.leafNode(this.tag,r)}}parseOpen(e){switch(e.name){case this.tag:return this.model={sheet:o(e.attributes.sheet,\"1\"),objects:\"1\"!==e.attributes.objects&&void 0,scenarios:\"1\"!==e.attributes.scenarios&&void 0,selectLockedCells:\"1\"!==e.attributes.selectLockedCells&&void 0,selectUnlockedCells:\"1\"!==e.attributes.selectUnlockedCells&&void 0,formatCells:o(e.attributes.formatCells,\"0\"),formatColumns:o(e.attributes.formatColumns,\"0\"),formatRows:o(e.attributes.formatRows,\"0\"),insertColumns:o(e.attributes.insertColumns,\"0\"),insertRows:o(e.attributes.insertRows,\"0\"),insertHyperlinks:o(e.attributes.insertHyperlinks,\"0\"),deleteColumns:o(e.attributes.deleteColumns,\"0\"),deleteRows:o(e.attributes.deleteRows,\"0\"),sort:o(e.attributes.sort,\"0\"),autoFilter:o(e.attributes.autoFilter,\"0\"),pivotTables:o(e.attributes.pivotTables,\"0\")},e.attributes.algorithmName&&(this.model.algorithmName=e.attributes.algorithmName,this.model.hashValue=e.attributes.hashValue,this.model.saltValue=e.attributes.saltValue,this.model.spinCount=parseInt(e.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{\"../../../utils/under-dash\":26,\"../base-xform\":32}],113:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/col-cache\"),i=e(\"../base-xform\"),s={frozen:\"frozen\",frozenSplit:\"frozen\",split:\"split\"};t.exports=class extends i{get tag(){return\"sheetView\"}prepare(e){switch(e.state){case\"frozen\":case\"split\":break;default:e.state=\"normal\"}}render(e,t){e.openNode(\"sheetView\",{workbookViewId:t.workbookViewId||0});const r=function(t,r,n){n&&e.addAttribute(t,r)};let i,s,o,a;switch(r(\"rightToLeft\",\"1\",!0===t.rightToLeft),r(\"tabSelected\",\"1\",t.tabSelected),r(\"showRuler\",\"0\",!1===t.showRuler),r(\"showRowColHeaders\",\"0\",!1===t.showRowColHeaders),r(\"showGridLines\",\"0\",!1===t.showGridLines),r(\"zoomScale\",t.zoomScale,t.zoomScale),r(\"zoomScaleNormal\",t.zoomScaleNormal,t.zoomScaleNormal),r(\"view\",t.style,t.style),t.state){case\"frozen\":s=t.xSplit||0,o=t.ySplit||0,i=t.topLeftCell||n.getAddress(o+1,s+1).address,a=(t.xSplit&&t.ySplit?\"bottomRight\":t.xSplit&&\"topRight\")||\"bottomLeft\",e.leafNode(\"pane\",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:i,activePane:a,state:\"frozen\"}),e.leafNode(\"selection\",{pane:a,activeCell:t.activeCell,sqref:t.activeCell});break;case\"split\":\"topLeft\"===t.activePane&&(t.activePane=void 0),e.leafNode(\"pane\",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),e.leafNode(\"selection\",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case\"normal\":t.activeCell&&e.leafNode(\"selection\",{activeCell:t.activeCell,sqref:t.activeCell})}e.closeNode()}parseOpen(e){switch(e.name){case\"sheetView\":return this.sheetView={workbookViewId:parseInt(e.attributes.workbookViewId,10),rightToLeft:\"1\"===e.attributes.rightToLeft,tabSelected:\"1\"===e.attributes.tabSelected,showRuler:!(\"0\"===e.attributes.showRuler),showRowColHeaders:!(\"0\"===e.attributes.showRowColHeaders),showGridLines:!(\"0\"===e.attributes.showGridLines),zoomScale:parseInt(e.attributes.zoomScale||\"100\",10),zoomScaleNormal:parseInt(e.attributes.zoomScaleNormal||\"100\",10),style:e.attributes.view},this.pane=void 0,this.selections={},!0;case\"pane\":return this.pane={xSplit:parseInt(e.attributes.xSplit||\"0\",10),ySplit:parseInt(e.attributes.ySplit||\"0\",10),topLeftCell:e.attributes.topLeftCell,activePane:e.attributes.activePane||\"topLeft\",state:e.attributes.state},!0;case\"selection\":{const t=e.attributes.pane||\"topLeft\";return this.selections[t]={pane:t,activeCell:e.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(e){let t,r;switch(e){case\"sheetView\":return this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[this.pane.state]||\"split\",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},\"split\"===this.model.state&&(t.activePane=this.pane.activePane),r=this.selections[this.pane.activePane],r&&r.activeCell&&(t.activeCell=r.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:\"normal\",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},r=this.selections.topLeft,r&&r.activeCell&&(t.activeCell=r.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{\"../../../utils/col-cache\":19,\"../base-xform\":32}],114:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"tablePart\"}render(e,t){t&&e.leafNode(this.tag,{\"r:id\":t.rId})}parseOpen(e){switch(e.name){case this.tag:return this.model={rId:e.attributes[\"r:id\"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],115:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../../../utils/col-cache\"),s=e(\"../../../utils/xml-stream\"),o=e(\"../../rel-type\"),a=e(\"./merges\"),l=e(\"../base-xform\"),c=e(\"../list-xform\"),u=e(\"./row-xform\"),h=e(\"./col-xform\"),f=e(\"./dimension-xform\"),d=e(\"./hyperlink-xform\"),p=e(\"./merge-cell-xform\"),m=e(\"./data-validations-xform\"),b=e(\"./sheet-properties-xform\"),g=e(\"./sheet-format-properties-xform\"),y=e(\"./sheet-view-xform\"),v=e(\"./sheet-protection-xform\"),w=e(\"./page-margins-xform\"),_=e(\"./page-setup-xform\"),x=e(\"./print-options-xform\"),k=e(\"./auto-filter-xform\"),S=e(\"./picture-xform\"),M=e(\"./drawing-xform\"),C=e(\"./table-part-xform\"),T=e(\"./row-breaks-xform\"),E=e(\"./header-footer-xform\"),A=e(\"./cf/conditional-formattings-xform\"),R=e(\"./ext-lst-xform\"),O=(e,t)=>{if(!t||!t.length)return e;if(!e||!e.length)return t;const r={},n={};return e.forEach(e=>{r[e.ref]=e,e.rules.forEach(e=>{const{x14Id:t}=e;t&&(n[t]=e)})}),t.forEach(t=>{t.rules.forEach(i=>{const s=n[i.x14Id];s?((e,t)=>{Object.keys(t).forEach(r=>{const n=e[r],i=t[r];void 0===n&&void 0!==i&&(e[r]=i)})})(s,i):r[t.ref]?r[t.ref].rules.push(i):e.push({ref:t.ref,rules:[i]})})}),e};class j extends l{constructor(e){super();const{maxRows:t,maxCols:r,ignoreNodes:n}=e||{};this.ignoreNodes=n||[],this.map={sheetPr:new b,dimension:new f,sheetViews:new c({tag:\"sheetViews\",count:!1,childXform:new y}),sheetFormatPr:new g,cols:new c({tag:\"cols\",count:!1,childXform:new h}),sheetData:new c({tag:\"sheetData\",count:!1,empty:!0,childXform:new u({maxItems:r}),maxItems:t}),autoFilter:new k,mergeCells:new c({tag:\"mergeCells\",count:!0,childXform:new p}),rowBreaks:new T,hyperlinks:new c({tag:\"hyperlinks\",count:!1,childXform:new d}),pageMargins:new w,dataValidations:new m,pageSetup:new _,headerFooter:new E,printOptions:new x,picture:new S,drawing:new M,sheetProtection:new v,tableParts:new c({tag:\"tableParts\",count:!0,childXform:new C}),conditionalFormatting:new A,extLst:new R}}prepare(e,t){t.merges=new a,e.hyperlinks=t.hyperlinks=[],e.comments=t.comments=[],t.formulae={},t.siFormulae=0,this.map.cols.prepare(e.cols,t),this.map.sheetData.prepare(e.rows,t),this.map.conditionalFormatting.prepare(e.conditionalFormattings,t),e.mergeCells=t.merges.mergeCells;const r=e.rels=[];function n(e){return\"rId\"+(e.length+1)}if(e.hyperlinks.forEach(e=>{const t=n(r);e.rId=t,r.push({Id:t,Type:o.Hyperlink,Target:e.target,TargetMode:\"External\"})}),e.comments.length>0){const s={Id:n(r),Type:o.Comments,Target:`../comments${e.id}.xml`};r.push(s);const a={Id:n(r),Type:o.VmlDrawing,Target:`../drawings/vmlDrawing${e.id}.vml`};r.push(a),e.comments.forEach(e=>{e.refAddress=i.decodeAddress(e.ref)}),t.commentRefs.push({commentName:\"comments\"+e.id,vmlDrawing:\"vmlDrawing\"+e.id})}const s=[];let l;e.media.forEach(i=>{if(\"background\"===i.type){const s=n(r);l=t.media[i.imageId],r.push({Id:s,Type:o.Image,Target:`../media/${l.name}.${l.extension}`}),e.background={rId:s},e.image=t.media[i.imageId]}else if(\"image\"===i.type){let{drawing:a}=e;l=t.media[i.imageId],a||(a=e.drawing={rId:n(r),name:\"drawing\"+ ++t.drawingsCount,anchors:[],rels:[]},t.drawings.push(a),r.push({Id:a.rId,Type:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing\",Target:`../drawings/${a.name}.xml`}));let c=this.preImageId===i.imageId?s[i.imageId]:s[a.rels.length];c||(c=n(a.rels),s[a.rels.length]=c,a.rels.push({Id:c,Type:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",Target:`../media/${l.name}.${l.extension}`}));const u={picture:{rId:c},range:i.range};if(i.hyperlinks&&i.hyperlinks.hyperlink){const e=n(a.rels);s[a.rels.length]=e,u.picture.hyperlinks={tooltip:i.hyperlinks.tooltip,rId:e},a.rels.push({Id:e,Type:o.Hyperlink,Target:i.hyperlinks.hyperlink,TargetMode:\"External\"})}this.preImageId=i.imageId,a.anchors.push(u)}}),e.tables.forEach(e=>{const i=n(r);e.rId=i,r.push({Id:i,Type:o.Table,Target:\"../tables/\"+e.target}),e.columns.forEach(e=>{const{style:r}=e;r&&(e.dxfId=t.styles.addDxfStyle(r))})}),this.map.extLst.prepare(e,t)}render(e,t){e.openXml(s.StdDocAttributes),e.openNode(\"worksheet\",j.WORKSHEET_ATTRIBUTES);const r=t.properties?{defaultRowHeight:t.properties.defaultRowHeight,dyDescent:t.properties.dyDescent,outlineLevelCol:t.properties.outlineLevelCol,outlineLevelRow:t.properties.outlineLevelRow}:void 0;t.properties&&t.properties.defaultColWidth&&(r.defaultColWidth=t.properties.defaultColWidth);const n={outlineProperties:t.properties&&t.properties.outlineProperties,tabColor:t.properties&&t.properties.tabColor,pageSetup:t.pageSetup&&t.pageSetup.fitToPage?{fitToPage:t.pageSetup.fitToPage}:void 0},i=t.pageSetup&&t.pageSetup.margins,a={showRowColHeaders:t.pageSetup&&t.pageSetup.showRowColHeaders,showGridLines:t.pageSetup&&t.pageSetup.showGridLines,horizontalCentered:t.pageSetup&&t.pageSetup.horizontalCentered,verticalCentered:t.pageSetup&&t.pageSetup.verticalCentered},l=t.sheetProtection;this.map.sheetPr.render(e,n),this.map.dimension.render(e,t.dimensions),this.map.sheetViews.render(e,t.views),this.map.sheetFormatPr.render(e,r),this.map.cols.render(e,t.cols),this.map.sheetData.render(e,t.rows),this.map.sheetProtection.render(e,l),this.map.autoFilter.render(e,t.autoFilter),this.map.mergeCells.render(e,t.mergeCells),this.map.conditionalFormatting.render(e,t.conditionalFormattings),this.map.dataValidations.render(e,t.dataValidations),this.map.hyperlinks.render(e,t.hyperlinks),this.map.printOptions.render(e,a),this.map.pageMargins.render(e,i),this.map.pageSetup.render(e,t.pageSetup),this.map.headerFooter.render(e,t.headerFooter),this.map.rowBreaks.render(e,t.rowBreaks),this.map.drawing.render(e,t.drawing),this.map.picture.render(e,t.background),this.map.tableParts.render(e,t.tables),this.map.extLst.render(e,t),t.rels&&t.rels.forEach(t=>{t.Type===o.VmlDrawing&&e.leafNode(\"legacyDrawing\",{\"r:id\":t.Id})}),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):\"worksheet\"===e.name?(n.each(this.map,e=>{e.reset()}),!0):(this.map[e.name]&&!this.ignoreNodes.includes(e.name)&&(this.parser=this.map[e.name],this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case\"worksheet\":{const e=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(e.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(e.outlineProperties=this.map.sheetPr.model.outlineProperties);const t={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},r=Object.assign(t,this.map.pageSetup.model,this.map.printOptions.model),n=O(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model[\"x14:conditionalFormattings\"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:e,views:this.map.sheetViews.model,pageSetup:r,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:n},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(e,t){const r=(e.relationships||[]).reduce((r,n)=>{if(r[n.Id]=n,n.Type===o.Comments&&(e.comments=t.comments[n.Target].comments),n.Type===o.VmlDrawing&&e.comments&&e.comments.length){const r=t.vmlDrawings[n.Target].comments;e.comments.forEach((e,t)=>{e.note=Object.assign({},e.note,r[t])})}return r},{});if(t.commentsMap=(e.comments||[]).reduce((e,t)=>(t.ref&&(e[t.ref]=t),e),{}),t.hyperlinkMap=(e.hyperlinks||[]).reduce((e,t)=>(t.rId&&(e[t.address]=r[t.rId].Target),e),{}),t.formulae={},e.rows=e.rows&&e.rows.filter(Boolean)||[],e.rows.forEach(e=>{e.cells=e.cells&&e.cells.filter(Boolean)||[]}),this.map.cols.reconcile(e.cols,t),this.map.sheetData.reconcile(e.rows,t),this.map.conditionalFormatting.reconcile(e.conditionalFormattings,t),e.media=[],e.drawing){const n=r[e.drawing.rId].Target.match(/\\/drawings\\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(n){const r=n[1];t.drawings[r].anchors.forEach(t=>{if(t.medium){const r={type:\"image\",imageId:t.medium.index,range:t.range,hyperlinks:t.picture.hyperlinks};e.media.push(r)}})}}const n=e.background&&r[e.background.rId];if(n){const r=n.Target.split(\"/media/\")[1],i=t.mediaIndex&&t.mediaIndex[r];void 0!==i&&e.media.push({type:\"background\",imageId:i})}e.tables=(e.tables||[]).map(e=>{const n=r[e.rId];return t.tables[n.Target]}),delete e.relationships,delete e.hyperlinks,delete e.comments}}j.WORKSHEET_ATTRIBUTES={xmlns:\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",\"xmlns:r\":\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\"xmlns:mc\":\"http://schemas.openxmlformats.org/markup-compatibility/2006\",\"mc:Ignorable\":\"x14ac\",\"xmlns:x14ac\":\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac\"},t.exports=j},{\"../../../utils/col-cache\":19,\"../../../utils/under-dash\":26,\"../../../utils/xml-stream\":28,\"../../rel-type\":31,\"../base-xform\":32,\"../list-xform\":71,\"./auto-filter-xform\":72,\"./cf/conditional-formattings-xform\":87,\"./col-xform\":92,\"./data-validations-xform\":93,\"./dimension-xform\":94,\"./drawing-xform\":95,\"./ext-lst-xform\":96,\"./header-footer-xform\":97,\"./hyperlink-xform\":98,\"./merge-cell-xform\":99,\"./merges\":100,\"./page-margins-xform\":103,\"./page-setup-xform\":105,\"./picture-xform\":106,\"./print-options-xform\":107,\"./row-breaks-xform\":108,\"./row-xform\":109,\"./sheet-format-properties-xform\":110,\"./sheet-properties-xform\":111,\"./sheet-protection-xform\":112,\"./sheet-view-xform\":113,\"./table-part-xform\":114}],116:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.attr=e.attr}render(e,t){t&&(e.openNode(this.tag),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],117:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this._format=e.format||function(e){try{return Number.isNaN(e.getTime())?\"\":e.toISOString()}catch(e){return\"\"}},this._parse=e.parse||function(e){return new Date(e)}}render(e,t){t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,this._format(t)):e.writeText(this._format(t)),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.attr?this.model=this._parse(e.attributes[this.attr]):this.text=[])}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(\"\"))),!1}}},{\"../base-xform\":32}],118:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this.zero=e.zero}render(e,t){(t||this.zero)&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,t):e.writeText(t),e.closeNode())}parseOpen(e){return e.name===this.tag&&(this.attr?this.model=parseInt(e.attributes[this.attr],10):this.text=[],!0)}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=parseInt(this.text.join(\"\")||0,10)),!1}}},{\"../base-xform\":32}],119:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs}render(e,t){void 0!==t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,t):e.writeText(t),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.attr?this.model=e.attributes[this.attr]:this.text=[])}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=this.text.join(\"\")),!1}}},{\"../base-xform\":32}],120:[function(e,t,r){\"use strict\";const n=e(\"./base-xform\"),i=e(\"../../utils/xml-stream\");t.exports=class extends n{constructor(e){super(),this._model=e}render(e){if(!this._xml){const e=new i;!function e(t,r){t.openNode(r.tag,r.$),r.c&&r.c.forEach(r=>{e(t,r)}),r.t&&t.writeText(r.t),t.closeNode()}(e,this._model),this._xml=e.xml}e.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(e){switch(e){case this._model.tag:return!1;default:return!0}}}},{\"../../utils/xml-stream\":28,\"./base-xform\":32}],121:[function(e,t,r){\"use strict\";const n=e(\"./text-xform\"),i=e(\"./rich-text-xform\"),s=e(\"../base-xform\");t.exports=class extends s{constructor(){super(),this.map={r:new i,t:new n}}get tag(){return\"rPh\"}render(e,t){if(e.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty(\"richText\")&&t.richText){const{r:r}=this.map;t.richText.forEach(t=>{r.render(e,t)})}else t&&this.map.t.render(e,t.text);e.closeNode()}parseOpen(e){const{name:t}=e;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={sb:parseInt(e.attributes.sb,10),eb:parseInt(e.attributes.eb,10)},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(e),!0))}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case\"r\":{let e=this.model.richText;e||(e=this.model.richText=[]),e.push(this.parser.model);break}case\"t\":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(e){case this.tag:return!1;default:return!0}}}},{\"../base-xform\":32,\"./rich-text-xform\":122,\"./text-xform\":125}],122:[function(e,t,r){\"use strict\";const n=e(\"./text-xform\"),i=e(\"../style/font-xform\"),s=e(\"../base-xform\");class o extends s{constructor(e){super(),this.model=e}get tag(){return\"r\"}get textXform(){return this._textXform||(this._textXform=new n)}get fontXform(){return this._fontXform||(this._fontXform=new i(o.FONT_OPTIONS))}render(e,t){t=t||this.model,e.openNode(\"r\"),t.font&&this.fontXform.render(e,t.font),this.textXform.render(e,t.text),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"r\":return this.model={},!0;case\"t\":return this.parser=this.textXform,this.parser.parseOpen(e),!0;case\"rPr\":return this.parser=this.fontXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){switch(e){case\"r\":return!1;case\"t\":return this.model.text=this.parser.model,this.parser=void 0,!0;case\"rPr\":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}}o.FONT_OPTIONS={tagName:\"rPr\",fontNameTag:\"rFont\"},t.exports=o},{\"../base-xform\":32,\"../style/font-xform\":131,\"./text-xform\":125}],123:[function(e,t,r){\"use strict\";const n=e(\"./text-xform\"),i=e(\"./rich-text-xform\"),s=e(\"./phonetic-text-xform\"),o=e(\"../base-xform\");t.exports=class extends o{constructor(e){super(),this.model=e,this.map={r:new i,t:new n,rPh:new s}}get tag(){return\"si\"}render(e,t){e.openNode(this.tag),t&&t.hasOwnProperty(\"richText\")&&t.richText?t.richText.length?t.richText.forEach(t=>{this.map.r.render(e,t)}):this.map.t.render(e,\"\"):null!=t&&this.map.t.render(e,t),e.closeNode()}parseOpen(e){const{name:t}=e;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(e),!0))}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case\"r\":{let e=this.model.richText;e||(e=this.model.richText=[]),e.push(this.parser.model);break}case\"t\":this.model=this.parser.model}this.parser=void 0}return!0}switch(e){case this.tag:return!1;default:return!0}}}},{\"../base-xform\":32,\"./phonetic-text-xform\":121,\"./rich-text-xform\":122,\"./text-xform\":125}],124:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/xml-stream\"),i=e(\"../base-xform\"),s=e(\"./shared-string-xform\");t.exports=class extends i{constructor(e){super(),this.model=e||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new s)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(e){return this.model.values[e]}add(e){return e.richText?this.addRichText(e):this.addText(e)}addText(e){let t=this.hash[e];return void 0===t&&(t=this.hash[e]=this.model.values.length,this.model.values.push(e)),this.model.count++,t}addRichText(e){const t=this.sharedStringXform.toXml(e);let r=this.rich[t];return void 0===r&&(r=this.rich[t]=this.model.values.length,this.model.values.push(e)),this.model.count++,r}render(e,t){t=t||this._values,e.openXml(n.StdDocAttributes),e.openNode(\"sst\",{xmlns:\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",count:t.count,uniqueCount:t.values.length});const r=this.sharedStringXform;t.values.forEach(t=>{r.render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"sst\":return!0;case\"si\":return this.parser=this.sharedStringXform,this.parser.parseOpen(e),!0;default:throw new Error(\"Unexpected xml node in parseOpen: \"+JSON.stringify(e))}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(e){case\"sst\":return!1;default:throw new Error(\"Unexpected xml node in parseClose: \"+e)}}}},{\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"./shared-string-xform\":123}],125:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"t\"}render(e,t){e.openNode(\"t\"),/^\\s|\\n|\\s$/.test(t)&&e.addAttribute(\"xml:space\",\"preserve\"),e.writeText(t),e.closeNode()}get model(){return this._text.join(\"\").replace(/_x([0-9A-F]{4})_/g,(e,t)=>String.fromCharCode(parseInt(t,16)))}parseOpen(e){switch(e.name){case\"t\":return this._text=[],!0;default:return!1}}parseText(e){this._text.push(e)}parseClose(){return!1}}},{\"../base-xform\":32}],126:[function(e,t,r){\"use strict\";const n=e(\"../../../doc/enums\"),i=e(\"../../../utils/utils\"),s=e(\"../base-xform\"),o={horizontalValues:[\"left\",\"center\",\"right\",\"fill\",\"centerContinuous\",\"distributed\",\"justify\"].reduce((e,t)=>(e[t]=!0,e),{}),horizontal(e){return this.horizontalValues[e]?e:void 0},verticalValues:[\"top\",\"middle\",\"bottom\",\"distributed\",\"justify\"].reduce((e,t)=>(e[t]=!0,e),{}),vertical(e){return\"middle\"===e?\"center\":this.verticalValues[e]?e:void 0},wrapText:e=>!!e||void 0,shrinkToFit:e=>!!e||void 0,textRotation(e){switch(e){case\"vertical\":return e;default:return(e=i.validInt(e))>=-90&&e<=90?e:void 0}},indent:e=>(e=i.validInt(e),Math.max(0,e)),readingOrder(e){switch(e){case\"ltr\":return n.ReadingOrder.LeftToRight;case\"rtl\":return n.ReadingOrder.RightToLeft;default:return}}},a={toXml(e){if(e=o.textRotation(e)){if(\"vertical\"===e)return 255;const t=Math.round(e);if(t>=0&&t<=90)return t;if(t<0&&t>=-90)return 90-t}},toModel(e){const t=i.validInt(e);if(void 0!==t){if(255===t)return\"vertical\";if(t>=0&&t<=90)return t;if(t>90&&t<=180)return 90-t}}};t.exports=class extends s{get tag(){return\"alignment\"}render(e,t){e.addRollback(),e.openNode(\"alignment\");let r=!1;function n(t,n){n&&(e.addAttribute(t,n),r=!0)}n(\"horizontal\",o.horizontal(t.horizontal)),n(\"vertical\",o.vertical(t.vertical)),n(\"wrapText\",!!o.wrapText(t.wrapText)&&\"1\"),n(\"shrinkToFit\",!!o.shrinkToFit(t.shrinkToFit)&&\"1\"),n(\"indent\",o.indent(t.indent)),n(\"textRotation\",a.toXml(t.textRotation)),n(\"readingOrder\",o.readingOrder(t.readingOrder)),e.closeNode(),r?e.commit():e.rollback()}parseOpen(e){const t={};let r=!1;function n(e,n,i){e&&(t[n]=i,r=!0)}n(e.attributes.horizontal,\"horizontal\",e.attributes.horizontal),n(e.attributes.vertical,\"vertical\",\"center\"===e.attributes.vertical?\"middle\":e.attributes.vertical),n(e.attributes.wrapText,\"wrapText\",i.parseBoolean(e.attributes.wrapText)),n(e.attributes.shrinkToFit,\"shrinkToFit\",i.parseBoolean(e.attributes.shrinkToFit)),n(e.attributes.indent,\"indent\",parseInt(e.attributes.indent,10)),n(e.attributes.textRotation,\"textRotation\",a.toModel(e.attributes.textRotation)),n(e.attributes.readingOrder,\"readingOrder\",\"2\"===e.attributes.readingOrder?\"rtl\":\"ltr\"),this.model=r?t:null}parseText(){}parseClose(){return!1}}},{\"../../../doc/enums\":7,\"../../../utils/utils\":27,\"../base-xform\":32}],127:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"../../../utils/utils\"),s=e(\"./color-xform\");class o extends n{constructor(e){super(),this.name=e,this.map={color:new s}}get tag(){return this.name}render(e,t,r){const n=t&&t.color||r||this.defaultColor;e.openNode(this.name),t&&t.style&&(e.addAttribute(\"style\",t.style),n&&this.map.color.render(e,n)),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.name:{const{style:t}=e.attributes;return this.model=t?{style:t}:void 0,!0}case\"color\":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(e===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(e){return o.validStyleValues[e]}}o.validStyleValues=[\"thin\",\"dashed\",\"dotted\",\"dashDot\",\"hair\",\"dashDotDot\",\"slantDashDot\",\"mediumDashed\",\"mediumDashDotDot\",\"mediumDashDot\",\"medium\",\"double\",\"thick\"].reduce((e,t)=>(e[t]=!0,e),{});t.exports=class extends n{constructor(){super(),this.map={top:new o(\"top\"),left:new o(\"left\"),bottom:new o(\"bottom\"),right:new o(\"right\"),diagonal:new o(\"diagonal\")}}render(e,t){const{color:r}=t;function n(n,i){n&&!n.color&&t.color&&(n={...n,color:t.color}),i.render(e,n,r)}e.openNode(\"border\"),t.diagonal&&t.diagonal.style&&(t.diagonal.up&&e.addAttribute(\"diagonalUp\",\"1\"),t.diagonal.down&&e.addAttribute(\"diagonalDown\",\"1\")),n(t.left,this.map.left),n(t.right,this.map.right),n(t.top,this.map.top),n(t.bottom,this.map.bottom),n(t.diagonal,this.map.diagonal),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"border\":return this.reset(),this.diagonalUp=i.parseBoolean(e.attributes.diagonalUp),this.diagonalDown=i.parseBoolean(e.attributes.diagonalDown),!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;if(\"border\"===e){const e=this.model={},t=function(t,r,n){r&&(n&&Object.assign(r,n),e[t]=r)};t(\"left\",this.map.left.model),t(\"right\",this.map.right.model),t(\"top\",this.map.top.model),t(\"bottom\",this.map.bottom.model),t(\"diagonal\",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{\"../../../utils/utils\":27,\"../base-xform\":32,\"./color-xform\":128}],128:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{constructor(e){super(),this.name=e||\"color\"}get tag(){return this.name}render(e,t){return!!t&&(e.openNode(this.name),t.argb?e.addAttribute(\"rgb\",t.argb):void 0!==t.theme?(e.addAttribute(\"theme\",t.theme),void 0!==t.tint&&e.addAttribute(\"tint\",t.tint)):void 0!==t.indexed?e.addAttribute(\"indexed\",t.indexed):e.addAttribute(\"auto\",\"1\"),e.closeNode(),!0)}parseOpen(e){return e.name===this.name&&(e.attributes.rgb?this.model={argb:e.attributes.rgb}:e.attributes.theme?(this.model={theme:parseInt(e.attributes.theme,10)},e.attributes.tint&&(this.model.tint=parseFloat(e.attributes.tint))):e.attributes.indexed?this.model={indexed:parseInt(e.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],129:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./alignment-xform\"),s=e(\"./border-xform\"),o=e(\"./fill-xform\"),a=e(\"./font-xform\"),l=e(\"./numfmt-xform\"),c=e(\"./protection-xform\");t.exports=class extends n{constructor(){super(),this.map={alignment:new i,border:new s,fill:new o,font:new a,numFmt:new l,protection:new c}}get tag(){return\"dxf\"}render(e,t){if(e.openNode(this.tag),t.font&&this.map.font.render(e,t.font),t.numFmt&&t.numFmtId){const r={id:t.numFmtId,formatCode:t.numFmt};this.map.numFmt.render(e,r)}t.fill&&this.map.fill.render(e,t.fill),t.alignment&&this.map.alignment.render(e,t.alignment),t.border&&this.map.border.render(e,t.border),t.protection&&this.map.protection.render(e,t.protection),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e),!0}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{\"../base-xform\":32,\"./alignment-xform\":126,\"./border-xform\":127,\"./fill-xform\":130,\"./font-xform\":131,\"./numfmt-xform\":132,\"./protection-xform\":133}],130:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./color-xform\");class s extends n{constructor(){super(),this.map={color:new i}}get tag(){return\"stop\"}render(e,t){e.openNode(\"stop\"),e.addAttribute(\"position\",t.position),this.map.color.render(e,t.color),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"stop\":return this.model={position:parseFloat(e.attributes.position)},!0;case\"color\":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}parseText(){}parseClose(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class o extends n{constructor(){super(),this.map={fgColor:new i(\"fgColor\"),bgColor:new i(\"bgColor\")}}get name(){return\"pattern\"}get tag(){return\"patternFill\"}render(e,t){e.openNode(\"patternFill\"),e.addAttribute(\"patternType\",t.pattern),t.fgColor&&this.map.fgColor.render(e,t.fgColor),t.bgColor&&this.map.bgColor.render(e,t.bgColor),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"patternFill\":return this.model={type:\"pattern\",pattern:e.attributes.patternType},!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return!!this.parser&&(this.parser.parseClose(e)||(this.parser.model&&(this.model[e]=this.parser.model),this.parser=void 0),!0)}}class a extends n{constructor(){super(),this.map={stop:new s}}get name(){return\"gradient\"}get tag(){return\"gradientFill\"}render(e,t){switch(e.openNode(\"gradientFill\"),t.gradient){case\"angle\":e.addAttribute(\"degree\",t.degree);break;case\"path\":e.addAttribute(\"type\",\"path\"),t.center.left&&(e.addAttribute(\"left\",t.center.left),void 0===t.center.right&&e.addAttribute(\"right\",t.center.left)),t.center.right&&e.addAttribute(\"right\",t.center.right),t.center.top&&(e.addAttribute(\"top\",t.center.top),void 0===t.center.bottom&&e.addAttribute(\"bottom\",t.center.top)),t.center.bottom&&e.addAttribute(\"bottom\",t.center.bottom)}const r=this.map.stop;t.stops.forEach(t=>{r.render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"gradientFill\":{const t=this.model={stops:[]};return e.attributes.degree?(t.gradient=\"angle\",t.degree=parseInt(e.attributes.degree,10)):\"path\"===e.attributes.type&&(t.gradient=\"path\",t.center={left:e.attributes.left?parseFloat(e.attributes.left):0,top:e.attributes.top?parseFloat(e.attributes.top):0},e.attributes.right!==e.attributes.left&&(t.center.right=e.attributes.right?parseFloat(e.attributes.right):0),e.attributes.bottom!==e.attributes.top&&(t.center.bottom=e.attributes.bottom?parseFloat(e.attributes.bottom):0)),!0}case\"stop\":return this.parser=this.map.stop,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class l extends n{constructor(){super(),this.map={patternFill:new o,gradientFill:new a}}get tag(){return\"fill\"}render(e,t){switch(e.addRollback(),e.openNode(\"fill\"),t.type){case\"pattern\":this.map.patternFill.render(e,t);break;case\"gradient\":this.map.gradientFill.render(e,t);break;default:return void e.rollback()}e.closeNode(),e.commit()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"fill\":return this.model={},!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(e){return l.validPatternValues[e]}}l.validPatternValues=[\"none\",\"solid\",\"darkVertical\",\"darkGray\",\"mediumGray\",\"lightGray\",\"gray125\",\"gray0625\",\"darkHorizontal\",\"darkVertical\",\"darkDown\",\"darkUp\",\"darkGrid\",\"darkTrellis\",\"lightHorizontal\",\"lightVertical\",\"lightDown\",\"lightUp\",\"lightGrid\",\"lightTrellis\",\"lightGrid\"].reduce((e,t)=>(e[t]=!0,e),{}),l.StopXform=s,l.PatternFillXform=o,l.GradientFillXform=a,t.exports=l},{\"../base-xform\":32,\"./color-xform\":128}],131:[function(e,t,r){\"use strict\";const n=e(\"./color-xform\"),i=e(\"../simple/boolean-xform\"),s=e(\"../simple/integer-xform\"),o=e(\"../simple/string-xform\"),a=e(\"./underline-xform\"),l=e(\"../../../utils/under-dash\"),c=e(\"../base-xform\");class u extends c{constructor(e){super(),this.options=e||u.OPTIONS,this.map={b:{prop:\"bold\",xform:new i({tag:\"b\",attr:\"val\"})},i:{prop:\"italic\",xform:new i({tag:\"i\",attr:\"val\"})},u:{prop:\"underline\",xform:new a},charset:{prop:\"charset\",xform:new s({tag:\"charset\",attr:\"val\"})},color:{prop:\"color\",xform:new n},condense:{prop:\"condense\",xform:new i({tag:\"condense\",attr:\"val\"})},extend:{prop:\"extend\",xform:new i({tag:\"extend\",attr:\"val\"})},family:{prop:\"family\",xform:new s({tag:\"family\",attr:\"val\"})},outline:{prop:\"outline\",xform:new i({tag:\"outline\",attr:\"val\"})},vertAlign:{prop:\"vertAlign\",xform:new o({tag:\"vertAlign\",attr:\"val\"})},scheme:{prop:\"scheme\",xform:new o({tag:\"scheme\",attr:\"val\"})},shadow:{prop:\"shadow\",xform:new i({tag:\"shadow\",attr:\"val\"})},strike:{prop:\"strike\",xform:new i({tag:\"strike\",attr:\"val\"})},sz:{prop:\"size\",xform:new s({tag:\"sz\",attr:\"val\"})}},this.map[this.options.fontNameTag]={prop:\"name\",xform:new o({tag:this.options.fontNameTag,attr:\"val\"})}}get tag(){return this.options.tagName}render(e,t){const{map:r}=this;e.openNode(this.options.tagName),l.each(this.map,(n,i)=>{r[i].xform.render(e,t[n.prop])}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(this.map[e.name])return this.parser=this.map[e.name].xform,this.parser.parseOpen(e);switch(e.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser&&!this.parser.parseClose(e)){const t=this.map[e];return this.parser.model&&(this.model[t.prop]=this.parser.model),this.parser=void 0,!0}switch(e){case this.options.tagName:return!1;default:return!0}}}u.OPTIONS={tagName:\"font\",fontNameTag:\"name\"},t.exports=u},{\"../../../utils/under-dash\":26,\"../base-xform\":32,\"../simple/boolean-xform\":116,\"../simple/integer-xform\":118,\"../simple/string-xform\":119,\"./color-xform\":128,\"./underline-xform\":136}],132:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/under-dash\"),i=e(\"../../defaultnumformats\"),s=e(\"../base-xform\");const o=function(){const e={};return n.each(i,(t,r)=>{t.f&&(e[t.f]=parseInt(r,10))}),e}();class a extends s{constructor(e,t){super(),this.id=e,this.formatCode=t}get tag(){return\"numFmt\"}render(e,t){e.leafNode(\"numFmt\",{numFmtId:t.id,formatCode:t.formatCode})}parseOpen(e){switch(e.name){case\"numFmt\":return this.model={id:parseInt(e.attributes.numFmtId,10),formatCode:e.attributes.formatCode.replace(/[\\\\](.)/g,\"$1\")},!0;default:return!1}}parseText(){}parseClose(){return!1}}a.getDefaultFmtId=function(e){return o[e]},a.getDefaultFmtCode=function(e){return i[e]&&i[e].f},t.exports=a},{\"../../../utils/under-dash\":26,\"../../defaultnumformats\":30,\"../base-xform\":32}],133:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i={boolean:(e,t)=>void 0===e?t:e};t.exports=class extends n{get tag(){return\"protection\"}render(e,t){e.addRollback(),e.openNode(\"protection\");let r=!1;function n(t,n){void 0!==n&&(e.addAttribute(t,n),r=!0)}n(\"locked\",i.boolean(t.locked,!0)?void 0:\"0\"),n(\"hidden\",i.boolean(t.hidden,!1)?\"1\":void 0),e.closeNode(),r?e.commit():e.rollback()}parseOpen(e){const t={locked:!(\"0\"===e.attributes.locked),hidden:\"1\"===e.attributes.hidden},r=!t.locked||t.hidden;this.model=r?t:null}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],134:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./alignment-xform\"),s=e(\"./protection-xform\");t.exports=class extends n{constructor(e){super(),this.xfId=!(!e||!e.xfId),this.map={alignment:new i,protection:new s}}get tag(){return\"xf\"}render(e,t){e.openNode(\"xf\",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&e.addAttribute(\"xfId\",t.xfId||0),t.numFmtId&&e.addAttribute(\"applyNumberFormat\",\"1\"),t.fontId&&e.addAttribute(\"applyFont\",\"1\"),t.fillId&&e.addAttribute(\"applyFill\",\"1\"),t.borderId&&e.addAttribute(\"applyBorder\",\"1\"),t.alignment&&e.addAttribute(\"applyAlignment\",\"1\"),t.protection&&e.addAttribute(\"applyProtection\",\"1\"),t.alignment&&this.map.alignment.render(e,t.alignment),t.protection&&this.map.protection.render(e,t.protection),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"xf\":return this.model={numFmtId:parseInt(e.attributes.numFmtId,10),fontId:parseInt(e.attributes.fontId,10),fillId:parseInt(e.attributes.fillId,10),borderId:parseInt(e.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(e.attributes.xfId,10)),!0;case\"alignment\":return this.parser=this.map.alignment,this.parser.parseOpen(e),!0;case\"protection\":return this.parser=this.map.protection,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):\"xf\"!==e}}},{\"../base-xform\":32,\"./alignment-xform\":126,\"./protection-xform\":133}],135:[function(e,t,r){\"use strict\";const n=e(\"../../../doc/enums\"),i=e(\"../../../utils/xml-stream\"),s=e(\"../base-xform\"),o=e(\"../static-xform\"),a=e(\"../list-xform\"),l=e(\"./font-xform\"),c=e(\"./fill-xform\"),u=e(\"./border-xform\"),h=e(\"./numfmt-xform\"),f=e(\"./style-xform\"),d=e(\"./dxf-xform\");class p extends s{constructor(e){super(),this.map={numFmts:new a({tag:\"numFmts\",count:!0,childXform:new h}),fonts:new a({tag:\"fonts\",count:!0,childXform:new l,$:{\"x14ac:knownFonts\":1}}),fills:new a({tag:\"fills\",count:!0,childXform:new c}),borders:new a({tag:\"borders\",count:!0,childXform:new u}),cellStyleXfs:new a({tag:\"cellStyleXfs\",count:!0,childXform:new f}),cellXfs:new a({tag:\"cellXfs\",count:!0,childXform:new f({xfId:!0})}),dxfs:new a({tag:\"dxfs\",always:!0,count:!0,childXform:new d}),numFmt:new h,font:new l,fill:new c,border:new u,style:new f({xfId:!0}),cellStyles:p.STATIC_XFORMS.cellStyles,tableStyles:p.STATIC_XFORMS.tableStyles,extLst:p.STATIC_XFORMS.extLst},e&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:\"pattern\",pattern:\"none\"}),this._addFill({type:\"pattern\",pattern:\"gray125\"}),this.weakMap=new WeakMap}render(e,t){t=t||this.model,e.openXml(i.StdDocAttributes),e.openNode(\"styleSheet\",p.STYLESHEET_ATTRIBUTES),this.index?(t.numFmts&&t.numFmts.length&&(e.openNode(\"numFmts\",{count:t.numFmts.length}),t.numFmts.forEach(t=>{e.writeXml(t)}),e.closeNode()),t.fonts.length||this._addFont({size:11,color:{theme:1},name:\"Calibri\",family:2,scheme:\"minor\"}),e.openNode(\"fonts\",{count:t.fonts.length,\"x14ac:knownFonts\":1}),t.fonts.forEach(t=>{e.writeXml(t)}),e.closeNode(),e.openNode(\"fills\",{count:t.fills.length}),t.fills.forEach(t=>{e.writeXml(t)}),e.closeNode(),e.openNode(\"borders\",{count:t.borders.length}),t.borders.forEach(t=>{e.writeXml(t)}),e.closeNode(),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),e.openNode(\"cellXfs\",{count:t.styles.length}),t.styles.forEach(t=>{e.writeXml(t)}),e.closeNode()):(this.map.numFmts.render(e,t.numFmts),this.map.fonts.render(e,t.fonts),this.map.fills.render(e,t.fills),this.map.borders.render(e,t.borders),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(e,t.styles)),p.STATIC_XFORMS.cellStyles.render(e),this.map.dxfs.render(e,t.dxfs),p.STATIC_XFORMS.tableStyles.render(e),p.STATIC_XFORMS.extLst.render(e),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case\"styleSheet\":return this.initIndex(),!0;default:return this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e),!0}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case\"styleSheet\":{this.model={};const e=(e,t)=>{t.model&&t.model.length&&(this.model[e]=t.model)};if(e(\"numFmts\",this.map.numFmts),e(\"fonts\",this.map.fonts),e(\"fills\",this.map.fills),e(\"borders\",this.map.borders),e(\"styles\",this.map.cellXfs),e(\"dxfs\",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const e=this.index.numFmt;this.model.numFmts.forEach(t=>{e[t.id]=t.formatCode})}return!1}default:return!0}}addStyleModel(e,t){if(!e)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:\"Calibri\",family:2,scheme:\"minor\"}),this.weakMap&&this.weakMap.has(e))return this.weakMap.get(e);const r={};if(t=t||n.ValueType.Number,e.numFmt)r.numFmtId=this._addNumFmtStr(e.numFmt);else switch(t){case n.ValueType.Number:r.numFmtId=this._addNumFmtStr(\"General\");break;case n.ValueType.Date:r.numFmtId=this._addNumFmtStr(\"mm-dd-yy\")}e.font&&(r.fontId=this._addFont(e.font)),e.border&&(r.borderId=this._addBorder(e.border)),e.fill&&(r.fillId=this._addFill(e.fill)),e.alignment&&(r.alignment=e.alignment),e.protection&&(r.protection=e.protection);const i=this._addStyle(r);return this.weakMap&&this.weakMap.set(e,i),i}getStyleModel(e){const t=this.model.styles[e];if(!t)return null;let r=this.index.model[e];if(r)return r;if(r=this.index.model[e]={},t.numFmtId){const e=this.index.numFmt[t.numFmtId]||h.getDefaultFmtCode(t.numFmtId);e&&(r.numFmt=e)}function n(e,t,n){if(n||0===n){const i=t[n];i&&(r[e]=i)}}return n(\"font\",this.model.fonts,t.fontId),n(\"border\",this.model.borders,t.borderId),n(\"fill\",this.model.fills,t.fillId),t.alignment&&(r.alignment=t.alignment),t.protection&&(r.protection=t.protection),r}addDxfStyle(e){return e.numFmt&&(e.numFmtId=this._addNumFmtStr(e.numFmt)),this.model.dxfs.push(e),this.model.dxfs.length-1}getDxfStyle(e){return this.model.dxfs[e]}_addStyle(e){const t=this.map.style.toXml(e);let r=this.index.style[t];return void 0===r&&(r=this.index.style[t]=this.model.styles.length,this.model.styles.push(t)),r}_addNumFmtStr(e){let t=h.getDefaultFmtId(e);if(void 0!==t)return t;if(t=this.index.numFmt[e],void 0!==t)return t;t=this.index.numFmt[e]=164+this.model.numFmts.length;const r=this.map.numFmt.toXml({id:t,formatCode:e});return this.model.numFmts.push(r),t}_addFont(e){const t=this.map.font.toXml(e);let r=this.index.font[t];return void 0===r&&(r=this.index.font[t]=this.model.fonts.length,this.model.fonts.push(t)),r}_addBorder(e){const t=this.map.border.toXml(e);let r=this.index.border[t];return void 0===r&&(r=this.index.border[t]=this.model.borders.length,this.model.borders.push(t)),r}_addFill(e){const t=this.map.fill.toXml(e);let r=this.index.fill[t];return void 0===r&&(r=this.index.fill[t]=this.model.fills.length,this.model.fills.push(t)),r}}p.STYLESHEET_ATTRIBUTES={xmlns:\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",\"xmlns:mc\":\"http://schemas.openxmlformats.org/markup-compatibility/2006\",\"mc:Ignorable\":\"x14ac x16r2\",\"xmlns:x14ac\":\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac\",\"xmlns:x16r2\":\"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main\"},p.STATIC_XFORMS={cellStyles:new o({tag:\"cellStyles\",$:{count:1},c:[{tag:\"cellStyle\",$:{name:\"Normal\",xfId:0,builtinId:0}}]}),dxfs:new o({tag:\"dxfs\",$:{count:0}}),tableStyles:new o({tag:\"tableStyles\",$:{count:0,defaultTableStyle:\"TableStyleMedium2\",defaultPivotStyle:\"PivotStyleLight16\"}}),extLst:new o({tag:\"extLst\",c:[{tag:\"ext\",$:{uri:\"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}\",\"xmlns:x14\":\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"},c:[{tag:\"x14:slicerStyles\",$:{defaultSlicerStyle:\"SlicerStyleLight1\"}}]},{tag:\"ext\",$:{uri:\"{9260A510-F301-46a8-8635-F512D64BE5F5}\",\"xmlns:x15\":\"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main\"},c:[{tag:\"x15:timelineStyles\",$:{defaultTimelineStyle:\"TimeSlicerStyleLight1\"}}]}]})};p.Mock=class extends p{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:\"Calibri\",family:2,scheme:\"minor\"}],borders:[{}],fills:[{type:\"pattern\",pattern:\"none\"},{type:\"pattern\",pattern:\"gray125\"}]}}parseStream(e){return e.autodrain(),Promise.resolve()}addStyleModel(e,t){switch(t){case n.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const e={numFmtId:h.getDefaultFmtId(\"mm-dd-yy\")};this._dateStyleId=this.model.styles.length,this.model.styles.push(e)}return this._dateStyleId}getStyleModel(){return{}}},t.exports=p},{\"../../../doc/enums\":7,\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"../list-xform\":71,\"../static-xform\":120,\"./border-xform\":127,\"./dxf-xform\":129,\"./fill-xform\":130,\"./font-xform\":131,\"./numfmt-xform\":132,\"./style-xform\":134}],136:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");class i extends n{constructor(e){super(),this.model=e}get tag(){return\"u\"}render(e,t){if(!0===(t=t||this.model))e.leafNode(\"u\");else{const r=i.Attributes[t];r&&e.leafNode(\"u\",r)}}parseOpen(e){\"u\"===e.name&&(this.model=e.attributes.val||!0)}parseText(){}parseClose(){return!1}}i.Attributes={single:{},double:{val:\"double\"},singleAccounting:{val:\"singleAccounting\"},doubleAccounting:{val:\"doubleAccounting\"}},t.exports=i},{\"../base-xform\":32}],137:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"./filter-column-xform\");t.exports=class extends n{constructor(){super(),this.map={filterColumn:new i}}get tag(){return\"autoFilter\"}prepare(e){e.columns.forEach((e,t)=>{this.map.filterColumn.prepare(e,{index:t})})}render(e,t){return e.openNode(this.tag,{ref:t.autoFilterRef}),t.columns.forEach(t=>{this.map.filterColumn.render(e,t)}),e.closeNode(),!0}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:return this.model={autoFilterRef:e.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[e.name],this.parser)return this.parseOpen(e),!0;throw new Error(\"Unexpected xml node in parseOpen: \"+JSON.stringify(e))}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(e){case this.tag:return!1;default:throw new Error(\"Unexpected xml node in parseClose: \"+e)}}}},{\"../base-xform\":32,\"./filter-column-xform\":139}],138:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"customFilter\"}render(e,t){e.leafNode(this.tag,{val:t.val,operator:t.operator})}parseOpen(e){return e.name===this.tag&&(this.model={val:e.attributes.val,operator:e.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],139:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\"),i=e(\"../list-xform\"),s=e(\"./custom-filter-xform\"),o=e(\"./filter-xform\");t.exports=class extends n{constructor(){super(),this.map={customFilters:new i({tag:\"customFilters\",count:!1,empty:!0,childXform:new s}),filters:new i({tag:\"filters\",count:!1,empty:!0,childXform:new o})}}get tag(){return\"filterColumn\"}prepare(e,t){e.colId=t.index.toString()}render(e,t){return t.customFilters?(e.openNode(this.tag,{colId:t.colId,hiddenButton:t.filterButton?\"0\":\"1\"}),this.map.customFilters.render(e,t.customFilters),e.closeNode(),!0):(e.leafNode(this.tag,{colId:t.colId,hiddenButton:t.filterButton?\"0\":\"1\"}),!0)}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;const{attributes:t}=e;switch(e.name){case this.tag:return this.model={filterButton:\"0\"===t.hiddenButton},!0;default:if(this.parser=this.map[e.name],this.parser)return this.parseOpen(e),!0;throw new Error(\"Unexpected xml node in parseOpen: \"+JSON.stringify(e))}}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{\"../base-xform\":32,\"../list-xform\":71,\"./custom-filter-xform\":138,\"./filter-xform\":140}],140:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"filter\"}render(e,t){e.leafNode(this.tag,{val:t.val})}parseOpen(e){return e.name===this.tag&&(this.model={val:e.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],141:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"tableColumn\"}prepare(e,t){e.id=t.index+1}render(e,t){return e.leafNode(this.tag,{id:t.id.toString(),name:t.name,totalsRowLabel:t.totalsRowLabel,totalsRowFunction:t.totalsRowFunction,dxfId:t.dxfId}),!0}parseOpen(e){if(e.name===this.tag){const{attributes:t}=e;return this.model={name:t.name,totalsRowLabel:t.totalsRowLabel,totalsRowFunction:t.totalsRowFunction,dxfId:t.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],142:[function(e,t,r){\"use strict\";const n=e(\"../base-xform\");t.exports=class extends n{get tag(){return\"tableStyleInfo\"}render(e,t){return e.leafNode(this.tag,{name:t.theme?t.theme:void 0,showFirstColumn:t.showFirstColumn?\"1\":\"0\",showLastColumn:t.showLastColumn?\"1\":\"0\",showRowStripes:t.showRowStripes?\"1\":\"0\",showColumnStripes:t.showColumnStripes?\"1\":\"0\"}),!0}parseOpen(e){if(e.name===this.tag){const{attributes:t}=e;return this.model={theme:t.name?t.name:null,showFirstColumn:\"1\"===t.showFirstColumn,showLastColumn:\"1\"===t.showLastColumn,showRowStripes:\"1\"===t.showRowStripes,showColumnStripes:\"1\"===t.showColumnStripes},!0}return!1}parseText(){}parseClose(){return!1}}},{\"../base-xform\":32}],143:[function(e,t,r){\"use strict\";const n=e(\"../../../utils/xml-stream\"),i=e(\"../base-xform\"),s=e(\"../list-xform\"),o=e(\"./auto-filter-xform\"),a=e(\"./table-column-xform\"),l=e(\"./table-style-info-xform\");class c extends i{constructor(){super(),this.map={autoFilter:new o,tableColumns:new s({tag:\"tableColumns\",count:!0,empty:!0,childXform:new a}),tableStyleInfo:new l}}prepare(e,t){this.map.autoFilter.prepare(e),this.map.tableColumns.prepare(e.columns,t)}get tag(){return\"table\"}render(e,t){e.openXml(n.StdDocAttributes),e.openNode(this.tag,{...c.TABLE_ATTRIBUTES,id:t.id,name:t.name,displayName:t.displayName||t.name,ref:t.tableRef,totalsRowCount:t.totalsRow?\"1\":void 0,totalsRowShown:t.totalsRow?void 0:\"1\",headerRowCount:t.headerRow?\"1\":\"0\"}),this.map.autoFilter.render(e,t),this.map.tableColumns.render(e,t.columns),this.map.tableStyleInfo.render(e,t.style),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;const{name:t,attributes:r}=e;switch(t){case this.tag:this.reset(),this.model={name:r.name,displayName:r.displayName||r.name,tableRef:r.ref,totalsRow:\"1\"===r.totalsRowCount,headerRow:\"1\"===r.headerRowCount};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((e,t)=>{this.model.columns[t].filterButton=e.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(e,t){e.columns.forEach(e=>{void 0!==e.dxfId&&(e.style=t.styles.getDxfStyle(e.dxfId))})}}c.TABLE_ATTRIBUTES={xmlns:\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",\"xmlns:mc\":\"http://schemas.openxmlformats.org/markup-compatibility/2006\",\"mc:Ignorable\":\"xr xr3\",\"xmlns:xr\":\"http://schemas.microsoft.com/office/spreadsheetml/2014/revision\",\"xmlns:xr3\":\"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3\"},t.exports=c},{\"../../../utils/xml-stream\":28,\"../base-xform\":32,\"../list-xform\":71,\"./auto-filter-xform\":137,\"./table-column-xform\":141,\"./table-style-info-xform\":142}],144:[function(e,t,r){(function(r,n){(function(){\"use strict\";const i=e(\"fs\"),s=e(\"jszip\"),{PassThrough:o}=e(\"readable-stream\"),a=e(\"../utils/zip-stream\"),l=e(\"../utils/stream-buf\"),c=e(\"../utils/utils\"),u=e(\"../utils/xml-stream\"),{bufferToString:h}=e(\"../utils/browser-buffer-decode\"),f=e(\"./xform/style/styles-xform\"),d=e(\"./xform/core/core-xform\"),p=e(\"./xform/strings/shared-strings-xform\"),m=e(\"./xform/core/relationships-xform\"),b=e(\"./xform/core/content-types-xform\"),g=e(\"./xform/core/app-xform\"),y=e(\"./xform/book/workbook-xform\"),v=e(\"./xform/sheet/worksheet-xform\"),w=e(\"./xform/drawing/drawing-xform\"),_=e(\"./xform/table/table-xform\"),x=e(\"./xform/comment/comments-xform\"),k=e(\"./xform/comment/vml-notes-xform\"),S=e(\"./xml/theme1\");class M{constructor(e){this.workbook=e}async readFile(e,t){if(!await c.fs.exists(e))throw new Error(\"File not found: \"+e);const r=i.createReadStream(e);try{const e=await this.read(r,t);return r.close(),e}catch(e){throw r.close(),e}}parseRels(e){return(new m).parseStream(e)}parseWorkbook(e){return(new y).parseStream(e)}parseSharedStrings(e){return(new p).parseStream(e)}reconcile(e,t){const r=new y,n=new v(t),i=new w,s=new _;r.reconcile(e);const o={media:e.media,mediaIndex:e.mediaIndex};Object.keys(e.drawings).forEach(t=>{const r=e.drawings[t],n=e.drawingRels[t];n&&(o.rels=n.reduce((e,t)=>(e[t.Id]=t,e),{}),(r.anchors||[]).forEach(e=>{const t=e.picture&&e.picture.hyperlinks;t&&o.rels[t.rId]&&(t.hyperlink=o.rels[t.rId].Target,delete t.rId)}),i.reconcile(r,o))});const a={styles:e.styles};Object.values(e.tables).forEach(e=>{s.reconcile(e,a)});const l={styles:e.styles,sharedStrings:e.sharedStrings,media:e.media,mediaIndex:e.mediaIndex,date1904:e.properties&&e.properties.date1904,drawings:e.drawings,comments:e.comments,tables:e.tables,vmlDrawings:e.vmlDrawings};e.worksheets.forEach(t=>{t.relationships=e.worksheetRels[t.sheetNo],n.reconcile(t,l)}),delete e.worksheetHash,delete e.worksheetRels,delete e.globalRels,delete e.sharedStrings,delete e.workbookRels,delete e.sheetDefs,delete e.styles,delete e.mediaIndex,delete e.drawings,delete e.drawingRels,delete e.vmlDrawings}async _processWorksheetEntry(e,t,r,n,i){const s=new v(n),o=await s.parseStream(e);o.sheetNo=r,t.worksheetHash[i]=o,t.worksheets.push(o)}async _processCommentEntry(e,t,r){const n=new x,i=await n.parseStream(e);t.comments[`../${r}.xml`]=i}async _processTableEntry(e,t,r){const n=new _,i=await n.parseStream(e);t.tables[`../tables/${r}.xml`]=i}async _processWorksheetRelsEntry(e,t,r){const n=new m,i=await n.parseStream(e);t.worksheetRels[r]=i}async _processMediaEntry(e,t,r){const n=r.lastIndexOf(\".\");if(n>=1){const i=r.substr(n+1),s=r.substr(0,n);await new Promise((n,o)=>{const a=new l;a.on(\"finish\",()=>{t.mediaIndex[r]=t.media.length,t.mediaIndex[s]=t.media.length;const e={type:\"image\",name:s,extension:i,buffer:a.toBuffer()};t.media.push(e),n()}),e.on(\"error\",e=>{o(e)}),e.pipe(a)})}}async _processDrawingEntry(e,t,r){const n=new w,i=await n.parseStream(e);t.drawings[r]=i}async _processDrawingRelsEntry(e,t,r){const n=new m,i=await n.parseStream(e);t.drawingRels[r]=i}async _processVmlDrawingEntry(e,t,r){const n=new k,i=await n.parseStream(e);t.vmlDrawings[`../drawings/${r}.vml`]=i}async _processThemeEntry(e,t,r){await new Promise((n,i)=>{const s=new l;e.on(\"error\",i),s.on(\"error\",i),s.on(\"finish\",()=>{t.themes[r]=s.read().toString(),n()}),e.pipe(s)})}createInputStream(){throw new Error(\"`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md\")}async read(e,t){!e[Symbol.asyncIterator]&&e.pipe&&(e=e.pipe(new o));const r=[];for await(const t of e)r.push(t);return this.load(n.concat(r),t)}async load(e,t){let i;i=t&&t.base64?n.from(e.toString(),\"base64\"):e;const a={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},l=await s.loadAsync(i);for(const e of Object.values(l.files))if(!e.dir){let n,i=e.name;if(\"/\"===i[0]&&(i=i.substr(1)),i.match(/xl\\/media\\//)||i.match(/xl\\/theme\\/([a-zA-Z0-9]+)[.]xml/))n=new o,n.write(await e.async(\"nodebuffer\"));else{let t;n=new o({writableObjectMode:!0,readableObjectMode:!0}),t=r.browser?h(await e.async(\"nodebuffer\")):await e.async(\"string\");const i=16384;for(let e=0;e{if(\"image\"===t.type){const r=`xl/media/${t.name}.${t.extension}`;if(t.filename){const n=await function(e,t){return new Promise((r,n)=>{i.readFile(e,t,(e,t)=>{e?n(e):r(t)})})}(t.filename);return e.append(n,{name:r})}if(t.buffer)return e.append(t.buffer,{name:r});if(t.base64){const n=t.base64,i=n.substring(n.indexOf(\",\")+1);return e.append(i,{name:r,base64:!0})}}throw new Error(\"Unsupported media\")}))}addDrawings(e,t){const r=new w,n=new m;t.worksheets.forEach(t=>{const{drawing:i}=t;if(i){r.prepare(i,{});let t=r.toXml(i);e.append(t,{name:`xl/drawings/${i.name}.xml`}),t=n.toXml(i.rels),e.append(t,{name:`xl/drawings/_rels/${i.name}.xml.rels`})}})}addTables(e,t){const r=new _;t.worksheets.forEach(t=>{const{tables:n}=t;n.forEach(t=>{r.prepare(t,{});const n=r.toXml(t);e.append(n,{name:\"xl/tables/\"+t.target})})})}async addContentTypes(e,t){const r=(new b).toXml(t);e.append(r,{name:\"[Content_Types].xml\"})}async addApp(e,t){const r=(new g).toXml(t);e.append(r,{name:\"docProps/app.xml\"})}async addCore(e,t){const r=new d;e.append(r.toXml(t),{name:\"docProps/core.xml\"})}async addThemes(e,t){const r=t.themes||{theme1:S};Object.keys(r).forEach(t=>{const n=r[t],i=`xl/theme/${t}.xml`;e.append(n,{name:i})})}async addOfficeRels(e){const t=(new m).toXml([{Id:\"rId1\",Type:M.RelType.OfficeDocument,Target:\"xl/workbook.xml\"},{Id:\"rId2\",Type:M.RelType.CoreProperties,Target:\"docProps/core.xml\"},{Id:\"rId3\",Type:M.RelType.ExtenderProperties,Target:\"docProps/app.xml\"}]);e.append(t,{name:\"_rels/.rels\"})}async addWorkbookRels(e,t){let r=1;const n=[{Id:\"rId\"+r++,Type:M.RelType.Styles,Target:\"styles.xml\"},{Id:\"rId\"+r++,Type:M.RelType.Theme,Target:\"theme/theme1.xml\"}];t.sharedStrings.count&&n.push({Id:\"rId\"+r++,Type:M.RelType.SharedStrings,Target:\"sharedStrings.xml\"}),t.worksheets.forEach(e=>{e.rId=\"rId\"+r++,n.push({Id:e.rId,Type:M.RelType.Worksheet,Target:`worksheets/sheet${e.id}.xml`})});const i=(new m).toXml(n);e.append(i,{name:\"xl/_rels/workbook.xml.rels\"})}async addSharedStrings(e,t){t.sharedStrings&&t.sharedStrings.count&&e.append(t.sharedStrings.xml,{name:\"xl/sharedStrings.xml\"})}async addStyles(e,t){const{xml:r}=t.styles;r&&e.append(r,{name:\"xl/styles.xml\"})}async addWorkbook(e,t){const r=new y;e.append(r.toXml(t),{name:\"xl/workbook.xml\"})}async addWorksheets(e,t){const r=new v,n=new m,i=new x,s=new k;t.worksheets.forEach(t=>{let o=new u;r.render(o,t),e.append(o.xml,{name:`xl/worksheets/sheet${t.id}.xml`}),t.rels&&t.rels.length&&(o=new u,n.render(o,t.rels),e.append(o.xml,{name:`xl/worksheets/_rels/sheet${t.id}.xml.rels`})),t.comments.length>0&&(o=new u,i.render(o,t),e.append(o.xml,{name:`xl/comments${t.id}.xml`}),o=new u,s.render(o,t),e.append(o.xml,{name:`xl/drawings/vmlDrawing${t.id}.vml`}))})}_finalize(e){return new Promise((t,r)=>{e.on(\"finish\",()=>{t(this)}),e.on(\"error\",r),e.finalize()})}prepareModel(e,t){e.creator=e.creator||\"ExcelJS\",e.lastModifiedBy=e.lastModifiedBy||\"ExcelJS\",e.created=e.created||new Date,e.modified=e.modified||new Date,e.useSharedStrings=void 0===t.useSharedStrings||t.useSharedStrings,e.useStyles=void 0===t.useStyles||t.useStyles,e.sharedStrings=new p,e.styles=e.useStyles?new f(!0):new f.Mock;const r=new y,n=new v;r.prepare(e);const i={sharedStrings:e.sharedStrings,styles:e.styles,date1904:e.properties.date1904,drawingsCount:0,media:e.media};i.drawings=e.drawings=[],i.commentRefs=e.commentRefs=[];let s=0;e.tables=[],e.worksheets.forEach(t=>{t.tables.forEach(t=>{s++,t.target=`table${s}.xml`,t.id=s,e.tables.push(t)}),n.prepare(t,i)})}async write(e,t){t=t||{};const{model:r}=this.workbook,n=new a.ZipWriter(t.zip);return n.pipe(e),this.prepareModel(r,t),await this.addContentTypes(n,r),await this.addOfficeRels(n,r),await this.addWorkbookRels(n,r),await this.addWorksheets(n,r),await this.addSharedStrings(n,r),await this.addDrawings(n,r),await this.addTables(n,r),await Promise.all([this.addThemes(n,r),this.addStyles(n,r)]),await this.addMedia(n,r),await Promise.all([this.addApp(n,r),this.addCore(n,r)]),await this.addWorkbook(n,r),this._finalize(n)}writeFile(e,t){const r=i.createWriteStream(e);return new Promise((e,n)=>{r.on(\"finish\",()=>{e()}),r.on(\"error\",e=>{n(e)}),this.write(r,t).then(()=>{r.end()}).catch(e=>{n(e)})})}async writeBuffer(e){const t=new l;return await this.write(t,e),t.read()}}M.RelType=e(\"./rel-type\"),t.exports=M}).call(this)}).call(this,e(\"_process\"),e(\"buffer\").Buffer)},{\"../utils/browser-buffer-decode\":16,\"../utils/stream-buf\":24,\"../utils/utils\":27,\"../utils/xml-stream\":28,\"../utils/zip-stream\":29,\"./rel-type\":31,\"./xform/book/workbook-xform\":38,\"./xform/comment/comments-xform\":40,\"./xform/comment/vml-notes-xform\":45,\"./xform/core/app-xform\":51,\"./xform/core/content-types-xform\":52,\"./xform/core/core-xform\":53,\"./xform/core/relationships-xform\":55,\"./xform/drawing/drawing-xform\":62,\"./xform/sheet/worksheet-xform\":115,\"./xform/strings/shared-strings-xform\":124,\"./xform/style/styles-xform\":135,\"./xform/table/table-xform\":143,\"./xml/theme1\":145,_process:467,buffer:220,fs:216,jszip:441,\"readable-stream\":491}],145:[function(e,t,r){\"use strict\";t.exports='\\n '},{}],146:[function(e,t,r){(function(t){(function(){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.CsvFormatterStream=void 0;const n=e(\"stream\"),i=e(\"./formatter\");class s extends n.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new i.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,r,n){let i=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,(e,r)=>e?(i=!0,n(e)):(r&&r.forEach(e=>{this.push(t.from(e,\"utf8\"))}),i=!0,n()))}catch(e){if(i)throw e;n(e)}}_flush(e){this.rowFormatter.finish((r,n)=>r?e(r):(n&&n.forEach(e=>{this.push(t.from(e,\"utf8\"))}),e()))}}r.CsvFormatterStream=s}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./formatter\":150,buffer:220,stream:505}],147:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.FormatterOptions=void 0;r.FormatterOptions=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;this.objectMode=!0,this.delimiter=\",\",this.rowDelimiter=\"\\n\",this.quote='\"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM=\"\\ufeff\",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),void 0===(null==e?void 0:e.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==e?void 0:e.quote)?this.quote='\"':!1===(null==e?void 0:e.quote)&&(this.quote=\"\"),\"string\"!=typeof(null==e?void 0:e.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(t=e.writeHeaders)||void 0===t||t),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,t,r){\"use strict\";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,\"__esModule\",{value:!0}),r.FieldFormatter=void 0;const i=n(e(\"lodash.isboolean\")),s=n(e(\"lodash.isnil\")),o=n(e(\"lodash.escaperegexp\"));r.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,null!==e.headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,\"g\");const t=`[${e.delimiter}${o.default(e.rowDelimiter)}|\\r|\\n]`;this.ESCAPE_REGEXP=new RegExp(t)}set headers(e){this._headers=e}shouldQuote(e,t){const r=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(r)?r:Array.isArray(r)?r[e]:null!==this._headers&&r[this._headers[e]]}format(e,t,r){const n=(\"\"+(s.default(e)?\"\":e)).replace(/\\0/g,\"\"),{formatterOptions:i}=this;if(\"\"!==i.quote){if(-1!==n.indexOf(i.quote))return this.quoteField(n.replace(this.REPLACE_REGEXP,i.escapedQuote))}return-1!==n.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,r)?this.quoteField(n):n}quoteField(e){const{quote:t}=this.formatterOptions;return`${t}${e}${t}`}}},{\"lodash.escaperegexp\":442,\"lodash.isboolean\":444,\"lodash.isnil\":447}],149:[function(e,t,r){\"use strict\";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,\"__esModule\",{value:!0}),r.RowFormatter=void 0;const i=n(e(\"lodash.isfunction\")),s=n(e(\"lodash.isequal\")),o=e(\"./FieldFormatter\"),a=e(\"../types\");class l{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new o.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return!!Array.isArray(e)&&(Array.isArray(e[0])&&2===e[0].length)}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return l.isRowHashArray(e)?e.map(e=>e[0]):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return a.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:(t,r)=>{e(t,r)}}set rowTransform(e){if(!i.default(e))throw new TypeError(\"The transform should be a function\");this._rowTransform=l.createTransform(e)}format(e,t){this.callTransformer(e,(r,n)=>{if(r)return t(r);if(!e)return t(null);const i=[];if(n){const{shouldFormatColumns:e,headers:t}=this.checkHeaders(n);if(this.shouldWriteHeaders&&t&&!this.hasWrittenHeaders&&(i.push(this.formatColumns(t,!0)),this.hasWrittenHeaders=!0),e){const e=this.gatherColumns(n);i.push(this.formatColumns(e,!1))}}return t(null,i)})}finish(e){const t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(new Error(\"`alwaysWriteHeaders` option is set to true but `headers` option not provided.\"));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const t=l.gatherHeaders(e);return this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!s.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(null===this.headers)throw new Error(\"Headers is currently null\");return Array.isArray(e)?l.isRowHashArray(e)?this.headers.map((t,r)=>{const n=e[r];return n?n[1]:\"\"}):l.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map((t,r)=>e[r]):this.headers.map(t=>e[t])}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}formatColumns(e,t){const r=e.map((e,r)=>this.fieldFormatter.format(e,r,t)).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,r].join(\"\"):r}}r.RowFormatter=l},{\"../types\":152,\"./FieldFormatter\":148,\"lodash.isequal\":445,\"lodash.isfunction\":446}],150:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.FieldFormatter=r.RowFormatter=void 0;var n=e(\"./RowFormatter\");Object.defineProperty(r,\"RowFormatter\",{enumerable:!0,get:function(){return n.RowFormatter}});var i=e(\"./FieldFormatter\");Object.defineProperty(r,\"FieldFormatter\",{enumerable:!0,get:function(){return i.FieldFormatter}})},{\"./FieldFormatter\":148,\"./RowFormatter\":149}],151:[function(e,t,r){(function(t){(function(){\"use strict\";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t},s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=function(e,t){for(var r in e)\"default\"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,\"__esModule\",{value:!0}),r.writeToPath=r.writeToString=r.writeToBuffer=r.writeToStream=r.write=r.format=r.FormatterOptions=r.CsvFormatterStream=void 0;const a=e(\"util\"),l=e(\"stream\"),c=s(e(\"fs\")),u=e(\"./FormatterOptions\"),h=e(\"./CsvFormatterStream\");o(e(\"./types\"),r);var f=e(\"./CsvFormatterStream\");Object.defineProperty(r,\"CsvFormatterStream\",{enumerable:!0,get:function(){return f.CsvFormatterStream}});var d=e(\"./FormatterOptions\");Object.defineProperty(r,\"FormatterOptions\",{enumerable:!0,get:function(){return d.FormatterOptions}}),r.format=e=>new h.CsvFormatterStream(new u.FormatterOptions(e)),r.write=(e,t)=>{const n=r.format(t),i=a.promisify((e,t)=>{n.write(e,void 0,t)});return e.reduce((e,t)=>e.then(()=>i(t)),Promise.resolve()).then(()=>n.end()).catch(e=>{n.emit(\"error\",e)}),n},r.writeToStream=(e,t,n)=>r.write(t,n).pipe(e),r.writeToBuffer=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[],s=new l.Writable({write(e,t,r){i.push(e),r()}});return new Promise((o,a)=>{s.on(\"error\",a).on(\"finish\",()=>o(t.concat(i))),r.write(e,n).pipe(s)})},r.writeToString=(e,t)=>r.writeToBuffer(e,t).then(e=>e.toString()),r.writeToPath=(e,t,n)=>{const i=c.createWriteStream(e,{encoding:\"utf8\"});return r.write(t,n).pipe(i)}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./CsvFormatterStream\":146,\"./FormatterOptions\":147,\"./types\":152,buffer:220,fs:216,stream:505,util:527}],152:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.isSyncTransform=void 0,r.isSyncTransform=e=>1===e.length},{}],153:[function(e,t,r){(function(t){(function(){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.CsvParserStream=void 0;const n=e(\"string_decoder\"),i=e(\"stream\"),s=e(\"./transforms\"),o=e(\"./parser\");class a extends i.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines=\"\",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new o.Parser(e),this.headerTransformer=new s.HeaderTransformer(e),this.decoder=new n.StringDecoder(e.encoding),this.rowTransformerValidator=new s.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e){if(\"end\"===e)return this.endEmitted||(this.endEmitted=!0,super.emit(\"end\",this.rowCount)),!1;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{const o=e=>e?r(e):s%100!=0?i(s+1):void t(()=>i(s+1));if(this.checkAndEmitHeaders(),s>=n||this.hasHitRowLimit)return r();if(this.parsedLineCount+=1,this.shouldSkipLine)return o();const a=e[s];this.rowCount+=1,this.parsedRowCount+=1;const l=this.rowCount;return this.transformRow(a,(e,t)=>{if(e)return this.rowCount-=1,o(e);if(!t)return o(new Error(\"expected transform result\"));if(t.isValid){if(t.row)return this.pushRow(t.row,o)}else this.emit(\"data-invalid\",t.row,l,t.reason);return o()})};i(0)}transformRow(e,t){try{this.headerTransformer.transform(e,(r,n)=>r?t(r):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,t):this.skipRow(t):(this.rowCount-=1,this.parsedRowCount-=1,t(null,{row:null,isValid:!0})):this.shouldEmitRows?t(null,{isValid:!1,row:e}):this.skipRow(t):t(new Error(\"Expected result from header transform\")))}catch(e){t(e)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit(\"headers\",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(e){t(e)}}static wrapDoneCallback(e){let t=!1;return function(r){if(r){if(t)throw r;return t=!0,void e(r)}for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s1)throw new Error(\"delimiter option must be one character long\");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(t=this.escape)&&void 0!==t?t:this.quote,this.supportsComments=!s.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\\\s]|\\\\r\\\\n|\\\\n|\\\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{\"lodash.escaperegexp\":442,\"lodash.isnil\":447}],155:[function(e,t,r){\"use strict\";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t},s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=function(e,t){for(var r in e)\"default\"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,\"__esModule\",{value:!0}),r.parseString=r.parseFile=r.parseStream=r.parse=r.ParserOptions=r.CsvParserStream=void 0;const a=s(e(\"fs\")),l=e(\"stream\"),c=e(\"./ParserOptions\"),u=e(\"./CsvParserStream\");o(e(\"./types\"),r);var h=e(\"./CsvParserStream\");Object.defineProperty(r,\"CsvParserStream\",{enumerable:!0,get:function(){return h.CsvParserStream}});var f=e(\"./ParserOptions\");Object.defineProperty(r,\"ParserOptions\",{enumerable:!0,get:function(){return f.ParserOptions}}),r.parse=e=>new u.CsvParserStream(new c.ParserOptions(e)),r.parseStream=(e,t)=>e.pipe(new u.CsvParserStream(new c.ParserOptions(t))),r.parseFile=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a.createReadStream(e).pipe(new u.CsvParserStream(new c.ParserOptions(t)))},r.parseString=(e,t)=>{const r=new l.Readable;return r.push(e),r.push(null),r.pipe(new u.CsvParserStream(new c.ParserOptions(t)))}},{\"./CsvParserStream\":153,\"./ParserOptions\":154,\"./types\":169,fs:216,stream:505}],156:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.Parser=void 0;const n=e(\"./Scanner\"),i=e(\"./RowParser\"),s=e(\"./Token\");class o{constructor(e){this.parserOptions=e,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}parse(e,t){const r=new n.Scanner({line:o.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t});return this.parserOptions.supportsComments?this.parseWithComments(r):this.parseWithoutComments(r)}parseWithoutComments(e){const t=[];let r=!0;for(;r;)r=this.parseRow(e,t);return{line:e.line,rows:t}}parseWithComments(e){const{parserOptions:t}=this,r=[];for(let n=e.nextCharacterToken;null!==n;n=e.nextCharacterToken)if(s.Token.isTokenComment(n,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:r};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:r};e.truncateToCursor()}else if(!this.parseRow(e,r))break;return{line:e.line,rows:r}}parseRow(e,t){if(!e.nextNonSpaceToken)return!1;const r=this.rowParser.parse(e);return null!==r&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(r)||t.push(r),!0)}}r.Parser=o},{\"./RowParser\":157,\"./Scanner\":158,\"./Token\":159}],157:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.RowParser=void 0;const n=e(\"./column\"),i=e(\"./Token\");r.RowParser=class{constructor(e){this.parserOptions=e,this.columnParser=new n.ColumnParser(e)}static isEmptyRow(e){return\"\"===e.join(\"\").replace(/\\s+/g,\"\")}parse(e){const{parserOptions:t}=this,{hasMoreData:r}=e,n=e,s=[];let o=this.getStartToken(n,s);for(;o;){if(i.Token.isTokenRowDelimiter(o))return n.advancePastToken(o),!n.hasMoreCharacters&&i.Token.isTokenCarriageReturn(o,t)&&r?null:(n.truncateToCursor(),s);if(!this.shouldSkipColumnParse(n,o,s)){const e=this.columnParser.parse(n);if(null===e)return null;s.push(e)}o=n.nextNonSpaceToken}return r?null:(n.truncateToCursor(),s)}getStartToken(e,t){const r=e.nextNonSpaceToken;return null!==r&&i.Token.isTokenDelimiter(r,this.parserOptions)?(t.push(\"\"),e.nextNonSpaceToken):r}shouldSkipColumnParse(e,t,r){const{parserOptions:n}=this;if(i.Token.isTokenDelimiter(t,n)){e.advancePastToken(t);const s=e.nextCharacterToken;if(!e.hasMoreCharacters||null!==s&&i.Token.isTokenRowDelimiter(s))return r.push(\"\"),!0;if(null!==s&&i.Token.isTokenDelimiter(s,n))return r.push(\"\"),!0}return!1}}},{\"./Token\":159,\"./column\":164}],158:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.Scanner=void 0;const n=e(\"./Token\"),i=/((?:\\r\\n)|\\n|\\r)/;r.Scanner=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:e}=this,t=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===e.search(t))return null;const r=t.exec(e);if(null==r)return null;const i=r[1],s=this.cursor+(r.index||0);return new n.Token({token:i,startCursor:s,endCursor:s+i.length-1})}get nextCharacterToken(){const{cursor:e,lineLength:t}=this;return t<=e?null:new n.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor=e,this}advanceToToken(e){return this.cursor=e.startCursor,this}advancePastToken(e){return this.cursor=e.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{\"./Token\":159}],159:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.Token=void 0;r.Token=class{constructor(e){this.token=e.token,this.startCursor=e.startCursor,this.endCursor=e.endCursor}static isTokenRowDelimiter(e){const t=e.token;return\"\\r\"===t||\"\\n\"===t||\"\\r\\n\"===t}static isTokenCarriageReturn(e,t){return e.token===t.carriageReturn}static isTokenComment(e,t){return t.supportsComments&&!!e&&e.token===t.comment}static isTokenEscapeCharacter(e,t){return e.token===t.escapeChar}static isTokenQuote(e,t){return e.token===t.quote}static isTokenDelimiter(e,t){return e.token===t.delimiter}}},{}],160:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.ColumnFormatter=void 0;r.ColumnFormatter=class{constructor(e){e.trim?this.format=e=>e.trim():e.ltrim?this.format=e=>e.trimLeft():e.rtrim?this.format=e=>e.trimRight():this.format=e=>e}}},{}],161:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.ColumnParser=void 0;const n=e(\"./NonQuotedColumnParser\"),i=e(\"./QuotedColumnParser\"),s=e(\"../Token\");r.ColumnParser=class{constructor(e){this.parserOptions=e,this.quotedColumnParser=new i.QuotedColumnParser(e),this.nonQuotedColumnParser=new n.NonQuotedColumnParser(e)}parse(e){const{nextNonSpaceToken:t}=e;return null!==t&&s.Token.isTokenQuote(t,this.parserOptions)?(e.advanceToToken(t),this.quotedColumnParser.parse(e)):this.nonQuotedColumnParser.parse(e)}}},{\"../Token\":159,\"./NonQuotedColumnParser\":162,\"./QuotedColumnParser\":163}],162:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.NonQuotedColumnParser=void 0;const n=e(\"./ColumnFormatter\"),i=e(\"../Token\");r.NonQuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const{parserOptions:t}=this,r=[];let n=e.nextCharacterToken;for(;n&&(!i.Token.isTokenDelimiter(n,t)&&!i.Token.isTokenRowDelimiter(n));n=e.nextCharacterToken)r.push(n.token),e.advancePastToken(n);return this.columnFormatter.format(r.join(\"\"))}}},{\"../Token\":159,\"./ColumnFormatter\":160}],163:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.QuotedColumnParser=void 0;const n=e(\"./ColumnFormatter\"),i=e(\"../Token\");r.QuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const t=e.cursor,{foundClosingQuote:r,col:n}=this.gatherDataBetweenQuotes(e);if(!r){if(e.advanceTo(t),!e.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||\"\"}' in line: at '${e.lineFromCursor.replace(/[\\r\\n]/g,\"\\\\n'\")}'`);return null}return this.checkForMalformedColumn(e),n}gatherDataBetweenQuotes(e){const{parserOptions:t}=this;let r=!1,n=!1;const s=[];let o=e.nextCharacterToken;for(;!n&&null!==o;o=e.nextCharacterToken){const a=i.Token.isTokenQuote(o,t);if(!r&&a)r=!0;else if(r)if(i.Token.isTokenEscapeCharacter(o,t)){e.advancePastToken(o);const r=e.nextCharacterToken;null!==r&&(i.Token.isTokenQuote(r,t)||i.Token.isTokenEscapeCharacter(r,t))?(s.push(r.token),o=r):a?n=!0:s.push(o.token)}else a?n=!0:s.push(o.token);e.advancePastToken(o)}return{col:this.columnFormatter.format(s.join(\"\")),foundClosingQuote:n}}checkForMalformedColumn(e){const{parserOptions:t}=this,{nextNonSpaceToken:r}=e;if(r){const n=i.Token.isTokenDelimiter(r,t),s=i.Token.isTokenRowDelimiter(r);if(!n&&!s){const n=e.lineFromCursor.substr(0,10).replace(/[\\r\\n]/g,\"\\\\n'\");throw new Error(`Parse Error: expected: '${t.escapedDelimiter}' OR new line got: '${r.token}'. at '${n}`)}e.advanceToToken(r)}else e.hasMoreData||e.advancePastLine()}}},{\"../Token\":159,\"./ColumnFormatter\":160}],164:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.ColumnFormatter=r.QuotedColumnParser=r.NonQuotedColumnParser=r.ColumnParser=void 0;var n=e(\"./ColumnParser\");Object.defineProperty(r,\"ColumnParser\",{enumerable:!0,get:function(){return n.ColumnParser}});var i=e(\"./NonQuotedColumnParser\");Object.defineProperty(r,\"NonQuotedColumnParser\",{enumerable:!0,get:function(){return i.NonQuotedColumnParser}});var s=e(\"./QuotedColumnParser\");Object.defineProperty(r,\"QuotedColumnParser\",{enumerable:!0,get:function(){return s.QuotedColumnParser}});var o=e(\"./ColumnFormatter\");Object.defineProperty(r,\"ColumnFormatter\",{enumerable:!0,get:function(){return o.ColumnFormatter}})},{\"./ColumnFormatter\":160,\"./ColumnParser\":161,\"./NonQuotedColumnParser\":162,\"./QuotedColumnParser\":163}],165:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.QuotedColumnParser=r.NonQuotedColumnParser=r.ColumnParser=r.Token=r.Scanner=r.RowParser=r.Parser=void 0;var n=e(\"./Parser\");Object.defineProperty(r,\"Parser\",{enumerable:!0,get:function(){return n.Parser}});var i=e(\"./RowParser\");Object.defineProperty(r,\"RowParser\",{enumerable:!0,get:function(){return i.RowParser}});var s=e(\"./Scanner\");Object.defineProperty(r,\"Scanner\",{enumerable:!0,get:function(){return s.Scanner}});var o=e(\"./Token\");Object.defineProperty(r,\"Token\",{enumerable:!0,get:function(){return o.Token}});var a=e(\"./column\");Object.defineProperty(r,\"ColumnParser\",{enumerable:!0,get:function(){return a.ColumnParser}}),Object.defineProperty(r,\"NonQuotedColumnParser\",{enumerable:!0,get:function(){return a.NonQuotedColumnParser}}),Object.defineProperty(r,\"QuotedColumnParser\",{enumerable:!0,get:function(){return a.QuotedColumnParser}})},{\"./Parser\":156,\"./RowParser\":157,\"./Scanner\":158,\"./Token\":159,\"./column\":164}],166:[function(e,t,r){\"use strict\";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,\"__esModule\",{value:!0}),r.HeaderTransformer=void 0;const i=n(e(\"lodash.isundefined\")),s=n(e(\"lodash.isfunction\")),o=n(e(\"lodash.uniq\")),a=n(e(\"lodash.groupby\"));r.HeaderTransformer=class{constructor(e){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=e,!0===e.headers?this.shouldUseFirstRow=!0:Array.isArray(e.headers)?this.setHeaders(e.headers):s.default(e.headers)&&(this.headersTransform=e.headers)}transform(e,t){return this.shouldMapRow(e)?t(null,this.processRow(e)):t(null,{row:null,isValid:!0})}shouldMapRow(e){const{parserOptions:t}=this;if(!this.headersTransform&&t.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error(\"Error renaming headers: new headers must be provided in an array\");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(e)){if(this.headersTransform)this.setHeaders(this.headersTransform(e));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(e)}return!1}return!0}processRow(e){if(!this.headers)return{row:e,isValid:!0};const{parserOptions:t}=this;if(!t.discardUnmappedColumns&&e.length>this.headersLength){if(!t.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${e.length}`);return{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}}return t.strictColumnHandling&&e.length!!e);if(o.default(r).length!==r.length){const e=a.default(r),t=Object.keys(e).filter(t=>e[t].length>1);throw new Error(\"Duplicate headers found \"+JSON.stringify(t))}this.headers=e,this.receivedHeaders=!0,this.headersLength=(null===(t=this.headers)||void 0===t?void 0:t.length)||0}}},{\"lodash.groupby\":443,\"lodash.isfunction\":446,\"lodash.isundefined\":448,\"lodash.uniq\":449}],167:[function(e,t,r){\"use strict\";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,\"__esModule\",{value:!0}),r.RowTransformerValidator=void 0;const i=n(e(\"lodash.isfunction\")),s=e(\"../types\");class o{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(e){return s.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:e}static createValidator(e){return s.isSyncValidate(e)?(t,r)=>{r(null,{row:t,isValid:e(t)})}:(t,r)=>{e(t,(e,n,i)=>e?r(e):r(null,n?{row:t,isValid:n,reason:i}:{row:t,isValid:!1,reason:i}))}}set rowTransform(e){if(!i.default(e))throw new TypeError(\"The transform should be a function\");this._rowTransform=o.createTransform(e)}set rowValidator(e){if(!i.default(e))throw new TypeError(\"The validate should be a function\");this._rowValidator=o.createValidator(e)}transformAndValidate(e,t){return this.callTransformer(e,(e,r)=>e?t(e):r?this.callValidator(r,(e,n)=>e?t(e):n&&!n.isValid?t(null,{row:r,isValid:!1,reason:n.reason}):t(null,{row:r,isValid:!0})):t(null,{row:null,isValid:!0}))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}callValidator(e,t){return this._rowValidator?this._rowValidator(e,t):t(null,{row:e,isValid:!0})}}r.RowTransformerValidator=o},{\"../types\":169,\"lodash.isfunction\":446}],168:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.HeaderTransformer=r.RowTransformerValidator=void 0;var n=e(\"./RowTransformerValidator\");Object.defineProperty(r,\"RowTransformerValidator\",{enumerable:!0,get:function(){return n.RowTransformerValidator}});var i=e(\"./HeaderTransformer\");Object.defineProperty(r,\"HeaderTransformer\",{enumerable:!0,get:function(){return i.HeaderTransformer}})},{\"./HeaderTransformer\":166,\"./RowTransformerValidator\":167}],169:[function(e,t,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.isSyncValidate=r.isSyncTransform=void 0,r.isSyncTransform=e=>1===e.length,r.isSyncValidate=e=>1===e.length},{}],170:[function(e,t,r){\"use strict\";const n=r;n.bignum=e(\"bn.js\"),n.define=e(\"./asn1/api\").define,n.base=e(\"./asn1/base\"),n.constants=e(\"./asn1/constants\"),n.decoders=e(\"./asn1/decoders\"),n.encoders=e(\"./asn1/encoders\")},{\"./asn1/api\":171,\"./asn1/base\":173,\"./asn1/constants\":177,\"./asn1/decoders\":179,\"./asn1/encoders\":182,\"bn.js\":184}],171:[function(e,t,r){\"use strict\";const n=e(\"./encoders\"),i=e(\"./decoders\"),s=e(\"inherits\");function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}r.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return s(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},o.prototype._getDecoder=function(e){return e=e||\"der\",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||\"der\",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{\"./decoders\":179,\"./encoders\":182,inherits:440}],172:[function(e,t,r){\"use strict\";const n=e(\"inherits\"),i=e(\"../base/reporter\").Reporter,s=e(\"safer-buffer\").Buffer;function o(e,t){i.call(this,t),s.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error(\"Input not Buffer\")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e}),this);else if(\"number\"==typeof e){if(!(0<=e&&e<=255))return t.error(\"non-byte EncoderBuffer value\");this.value=e,this.length=1}else if(\"string\"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error(\"Unsupported type: \"+typeof e);this.value=e,this.length=e.length}}n(o,i),r.DecoderBuffer=o,o.isDecoderBuffer=function(e){if(e instanceof o)return!0;return\"object\"==typeof e&&s.isBuffer(e.base)&&\"DecoderBuffer\"===e.constructor.name&&\"number\"==typeof e.offset&&\"number\"==typeof e.length&&\"function\"==typeof e.save&&\"function\"==typeof e.restore&&\"function\"==typeof e.isEmpty&&\"function\"==typeof e.readUInt8&&\"function\"==typeof e.skip&&\"function\"==typeof e.raw},o.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},o.prototype.restore=function(e){const t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||\"DecoderBuffer overrun\")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||\"DecoderBuffer overrun\");const r=new o(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=a,a.isEncoderBuffer=function(e){if(e instanceof a)return!0;return\"object\"==typeof e&&\"EncoderBuffer\"===e.constructor.name&&\"number\"==typeof e.length&&\"function\"==typeof e.join},a.prototype.join=function(e,t){return e||(e=s.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):(\"number\"==typeof this.value?e[t]=this.value:\"string\"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},{\"../base/reporter\":175,inherits:440,\"safer-buffer\":495}],173:[function(e,t,r){\"use strict\";const n=r;n.Reporter=e(\"./reporter\").Reporter,n.DecoderBuffer=e(\"./buffer\").DecoderBuffer,n.EncoderBuffer=e(\"./buffer\").EncoderBuffer,n.Node=e(\"./node\")},{\"./buffer\":172,\"./node\":174,\"./reporter\":175}],174:[function(e,t,r){\"use strict\";const n=e(\"../base/reporter\").Reporter,i=e(\"../base/buffer\").EncoderBuffer,s=e(\"../base/buffer\").DecoderBuffer,o=e(\"minimalistic-assert\"),a=[\"seq\",\"seqof\",\"set\",\"setof\",\"objid\",\"bool\",\"gentime\",\"utctime\",\"null_\",\"enum\",\"int\",\"objDesc\",\"bitstr\",\"bmpstr\",\"charstr\",\"genstr\",\"graphstr\",\"ia5str\",\"iso646str\",\"numstr\",\"octstr\",\"printstr\",\"t61str\",\"unistr\",\"utf8str\",\"videostr\"],l=[\"key\",\"obj\",\"use\",\"optional\",\"explicit\",\"implicit\",\"def\",\"choice\",\"any\",\"contains\"].concat(a);function c(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=c;const u=[\"enc\",\"parent\",\"children\",\"tag\",\"args\",\"reverseArgs\",\"choice\",\"optional\",\"any\",\"obj\",\"use\",\"alteredUse\",\"key\",\"default\",\"explicit\",\"implicit\",\"contains\"];c.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,\"Root node can have only one child\")},c.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(o(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if(\"object\"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},[\"_peekTag\",\"_decodeTag\",\"_use\",\"_decodeStr\",\"_decodeObjid\",\"_decodeTime\",\"_decodeNull\",\"_decodeInt\",\"_decodeBool\",\"_decodeList\",\"_encodeComposite\",\"_encodeStr\",\"_encodeObjid\",\"_encodeTime\",\"_encodeNull\",\"_encodeInt\",\"_encodeBool\"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+\" not implemented for encoding: \"+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){o(e);const t=this._baseState;return o(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return o(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return o(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,o=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(o=this._peekTag(e,n,r.any),e.isError(o))return o}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(n)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,\"tagged\"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,\"content\"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&(\"octstr\"===r.tag||\"bitstr\"===r.tag)){const n=new s(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return\"seq\"===e||\"set\"===e?null:\"seqof\"===e||\"setof\"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):\"objid\"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):\"objid\"===e?this._decodeObjid(t,null,null,r):\"gentime\"===e||\"utctime\"===e?this._decodeTime(t,e,r):\"null_\"===e?this._decodeNull(t,r):\"bool\"===e?this._decodeBool(t,r):\"objDesc\"===e?this._decodeStr(t,e,r):\"int\"===e||\"enum\"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error(\"unknown tag: \"+e)},c.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),o(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(s){const o=e.save(),a=r.choice[s];try{const r=a._decode(e,t);if(e.isError(r))return!1;n={type:s,value:r},i=!0}catch(t){return e.restore(o),!1}return!0}),this),i?n:e.error(\"Choice not matched\")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},c.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let s=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let o=null,a=!1;if(i.any)s=this._createEncoderBuffer(e);else if(i.choice)s=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,r)._encode(e,t),a=!0;else if(i.children)o=i.children.map((function(r){if(\"null_\"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error(\"Child should have a key\");const n=t.enterKey(r._baseState.key);if(\"object\"!=typeof e)return t.error(\"Child expected, but input is not object\");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if(\"seqof\"===i.tag||\"setof\"===i.tag){if(!i.args||1!==i.args.length)return t.error(\"Too many args for : \"+i.tag);if(!Array.isArray(e))return t.error(\"seqof/setof, but data is not Array\");const r=this.clone();r._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==i.use?s=this._getUse(i.use,r)._encode(e,t):(o=this._encodePrimitive(i.tag,e),a=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?\"universal\":\"context\";null===e?null===i.use&&t.error(\"Tag could be omitted only for .use()\"):null===i.use&&(s=this._encodeComposite(e,a,r,o))}return null!==i.explicit&&(s=this._encodeComposite(i.explicit,!1,\"context\",s)),s},c.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||o(!1,e.type+\" not found in \"+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if(\"objid\"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if(\"objid\"===e)return this._encodeObjid(t,null,null);if(\"gentime\"===e||\"utctime\"===e)return this._encodeTime(t,e);if(\"null_\"===e)return this._encodeNull();if(\"int\"===e||\"enum\"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if(\"bool\"===e)return this._encodeBool(t);if(\"objDesc\"===e)return this._encodeStr(t,e);throw new Error(\"Unsupported tag: \"+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{\"../base/buffer\":172,\"../base/reporter\":175,\"minimalistic-assert\":453}],175:[function(e,t,r){\"use strict\";const n=e(\"inherits\");function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}r.Reporter=i,i.prototype.isError=function(e){return e instanceof s},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join(\"/\")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof s;if(t=n?e:new s(r.path.map((function(e){return\"[\"+JSON.stringify(e)+\"]\"})).join(\"\"),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(s,Error),s.prototype.rethrow=function(e){if(this.message=e+\" at: \"+(this.path||\"(shallow)\"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:440}],176:[function(e,t,r){\"use strict\";function n(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}r.tagClass={0:\"universal\",1:\"application\",2:\"context\",3:\"private\"},r.tagClassByName=n(r.tagClass),r.tag={0:\"end\",1:\"bool\",2:\"int\",3:\"bitstr\",4:\"octstr\",5:\"null_\",6:\"objid\",7:\"objDesc\",8:\"external\",9:\"real\",10:\"enum\",11:\"embed\",12:\"utf8str\",13:\"relativeOid\",16:\"seq\",17:\"set\",18:\"numstr\",19:\"printstr\",20:\"t61str\",21:\"videostr\",22:\"ia5str\",23:\"utctime\",24:\"gentime\",25:\"graphstr\",26:\"iso646str\",27:\"genstr\",28:\"unistr\",29:\"charstr\",30:\"bmpstr\"},r.tagByName=n(r.tag)},{}],177:[function(e,t,r){\"use strict\";const n=r;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},n.der=e(\"./der\")},{\"./der\":176}],178:[function(e,t,r){\"use strict\";const n=e(\"inherits\"),i=e(\"bn.js\"),s=e(\"../base/buffer\").DecoderBuffer,o=e(\"../base/node\"),a=e(\"../constants/der\");function l(e){this.enc=\"der\",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.call(this,\"der\",e)}function u(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function h(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error(\"length octect is too long\");n=0;for(let t=0;t=31)return n.error(\"Multi-octet tag encoding unsupported\");t||(i|=32);return i|=o.tagClassByName[r||\"universal\"]<<6,i}(e,t,r,this.reporter);if(n.length<128){const e=i.alloc(2);return e[0]=s,e[1]=n.length,this._createEncoderBuffer([e,n])}let a=1;for(let e=n.length;e>=256;e>>=8)a++;const l=i.alloc(2+a);l[0]=s,l[1]=128|a;for(let e=1+a,t=n.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,n])},l.prototype._encodeStr=function(e,t){if(\"bitstr\"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if(\"bmpstr\"===t){const t=i.alloc(2*e.length);for(let r=0;r=40)return this.reporter.error(\"Second objid identifier OOB\");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t=128;r>>=7)n++}const s=i.alloc(n);let o=s.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(s[o--]=127&r;(r>>=7)>0;)s[o--]=128|127&r}return this._createEncoderBuffer(s)},l.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return\"gentime\"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),\"Z\"].join(\"\"):\"utctime\"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),\"Z\"].join(\"\"):this.reporter.error(\"Encoding \"+t+\" time is not supported yet\"),this._encodeStr(r,\"octstr\")},l.prototype._encodeNull=function(){return this._createEncoderBuffer(\"\")},l.prototype._encodeInt=function(e,t){if(\"string\"==typeof e){if(!t)return this.reporter.error(\"String int or enum given, but no values map\");if(!t.hasOwnProperty(e))return this.reporter.error(\"Values map doesn't contain: \"+JSON.stringify(e));e=t[e]}if(\"number\"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=i.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return\"function\"==typeof e&&(e=e(t)),e._getEncoder(\"der\").tree},l.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const s=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),s.length!==n.defaultBuffer.length)return!1;for(i=0;i=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,s=Math.min(e.length,r),o=t;o=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(e){return e instanceof s||null!==e&&\"object\"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,r){if(\"number\"==typeof e)return this._initNumber(e,t,r);if(\"object\"==typeof e)return this._initArray(e,t,r);\"hex\"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;\"-\"===(e=e.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if(\"le\"===r)for(i=0,s=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var s=e.length-r,o=s%n,a=Math.min(s,s-o)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?\"\"};var u=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,l=o/67108864|0;r.words[0]=a;for(var c=1;c>>26,h=67108863&l,f=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=f;d++){var p=c-d|0;u+=(o=(i=0|e.words[p])*(s=0|t.words[d])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}s.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||\"hex\"===e){r=\"\";for(var i=0,s=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],d=f[e];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%t!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,\"byte array longer than desired length\"),n(s>0,\"Requested array length <= 0\"),this.strip();var o,a,l=\"le\"===t,c=new e(s),u=this.clone();if(l){for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),c[a]=o;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){n(\"number\"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){n(\"number\"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s>>26;for(;0!==i&&s>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var s=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==s&&o>26,this.words[o]=67108863&t;if(0===s&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,b=0|o[2],g=8191&b,y=b>>>13,v=0|o[3],w=8191&v,_=v>>>13,x=0|o[4],k=8191&x,S=x>>>13,M=0|o[5],C=8191&M,T=M>>>13,E=0|o[6],A=8191&E,R=E>>>13,O=0|o[7],j=8191&O,I=O>>>13,N=0|o[8],P=8191&N,B=N>>>13,D=0|o[9],F=8191&D,L=D>>>13,z=0|a[0],U=8191&z,$=z>>>13,H=0|a[1],V=8191&H,q=H>>>13,W=0|a[2],X=8191&W,K=W>>>13,Y=0|a[3],Z=8191&Y,G=Y>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,ue=0|a[8],he=8191&ue,fe=ue>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,$))+Math.imul(f,U)|0))<<13)|0;c=((s=Math.imul(f,$))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,$))+Math.imul(m,U)|0,s=Math.imul(m,$);var ge=(c+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,q)|0)+Math.imul(f,V)|0))<<13)|0;c=((s=s+Math.imul(f,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,$))+Math.imul(y,U)|0,s=Math.imul(y,$),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,s=s+Math.imul(m,q)|0;var ye=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,X)|0))<<13)|0;c=((s=s+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,$))+Math.imul(_,U)|0,s=Math.imul(_,$),n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(y,V)|0,s=s+Math.imul(y,q)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,K)|0;var ve=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,Z)|0))<<13)|0;c=((s=s+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,$))+Math.imul(S,U)|0,s=Math.imul(S,$),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,V)|0,s=s+Math.imul(_,q)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,K)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,s=s+Math.imul(m,G)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((s=s+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,$))+Math.imul(T,U)|0,s=Math.imul(T,$),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(S,V)|0,s=s+Math.imul(S,q)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,K)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(y,Z)|0,s=s+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((s=s+Math.imul(f,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(A,U),i=(i=Math.imul(A,$))+Math.imul(R,U)|0,s=Math.imul(R,$),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(T,V)|0,s=s+Math.imul(T,q)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(S,X)|0,s=s+Math.imul(S,K)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,s=s+Math.imul(_,G)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,s=s+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,s=s+Math.imul(m,ne)|0;var xe=(c+(n=n+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(f,se)|0))<<13)|0;c=((s=s+Math.imul(f,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,$))+Math.imul(I,U)|0,s=Math.imul(I,$),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(R,V)|0,s=s+Math.imul(R,q)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,K)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,Z)|0,s=s+Math.imul(S,G)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(y,re)|0,s=s+Math.imul(y,ne)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var ke=(c+(n=n+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((s=s+Math.imul(f,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,$))+Math.imul(B,U)|0,s=Math.imul(B,$),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,q)|0)+Math.imul(I,V)|0,s=s+Math.imul(I,q)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(R,X)|0,s=s+Math.imul(R,K)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(T,Z)|0,s=s+Math.imul(T,G)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,s=s+Math.imul(_,ne)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(y,se)|0,s=s+Math.imul(y,oe)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ce)|0;var Se=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,fe)|0)+Math.imul(f,he)|0))<<13)|0;c=((s=s+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,$))+Math.imul(L,U)|0,s=Math.imul(L,$),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,q)|0)+Math.imul(B,V)|0,s=s+Math.imul(B,q)|0,n=n+Math.imul(j,X)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(I,X)|0,s=s+Math.imul(I,K)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(R,Z)|0,s=s+Math.imul(R,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,s=s+Math.imul(S,ne)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,oe)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(y,le)|0,s=s+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,he)|0,s=s+Math.imul(m,fe)|0;var Me=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((s=s+Math.imul(f,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,V),i=(i=Math.imul(F,q))+Math.imul(L,V)|0,s=Math.imul(L,q),n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(B,X)|0,s=s+Math.imul(B,K)|0,n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(I,Z)|0,s=s+Math.imul(I,G)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(R,Q)|0,s=s+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(T,re)|0,s=s+Math.imul(T,ne)|0,n=n+Math.imul(k,se)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,oe)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,le)|0,s=s+Math.imul(_,ce)|0,n=n+Math.imul(g,he)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(y,he)|0,s=s+Math.imul(y,fe)|0;var Ce=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,K))+Math.imul(L,X)|0,s=Math.imul(L,K),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(B,Z)|0,s=s+Math.imul(B,G)|0,n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(I,Q)|0,s=s+Math.imul(I,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(R,re)|0,s=s+Math.imul(R,ne)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,oe)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,le)|0,s=s+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,fe)|0;var Te=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((s=s+Math.imul(y,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,G))+Math.imul(L,Z)|0,s=Math.imul(L,G),n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(B,Q)|0,s=s+Math.imul(B,ee)|0,n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(I,re)|0,s=s+Math.imul(I,ne)|0,n=n+Math.imul(A,se)|0,i=(i=i+Math.imul(A,oe)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,oe)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(T,le)|0,s=s+Math.imul(T,ce)|0,n=n+Math.imul(k,he)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(S,he)|0,s=s+Math.imul(S,fe)|0;var Ee=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((s=s+Math.imul(_,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(L,Q)|0,s=Math.imul(L,ee),n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(B,re)|0,s=s+Math.imul(B,ne)|0,n=n+Math.imul(j,se)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,oe)|0,n=n+Math.imul(A,le)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ce)|0,n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(T,he)|0,s=s+Math.imul(T,fe)|0;var Ae=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(S,pe)|0))<<13)|0;c=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(L,re)|0,s=Math.imul(L,ne),n=n+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(B,se)|0,s=s+Math.imul(B,oe)|0,n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,ce)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,ce)|0,n=n+Math.imul(A,he)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(R,he)|0,s=s+Math.imul(R,fe)|0;var Re=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,se),i=(i=Math.imul(F,oe))+Math.imul(L,se)|0,s=Math.imul(L,oe),n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(B,le)|0,s=s+Math.imul(B,ce)|0,n=n+Math.imul(j,he)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(I,he)|0,s=s+Math.imul(I,fe)|0;var Oe=(c+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,ce))+Math.imul(L,le)|0,s=Math.imul(L,ce),n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(B,he)|0,s=s+Math.imul(B,fe)|0;var je=(c+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(F,he),i=(i=Math.imul(F,fe))+Math.imul(L,he)|0,s=Math.imul(L,fe);var Ie=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(B,pe)|0))<<13)|0;c=((s=s+Math.imul(B,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Ne=(c+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,me))+Math.imul(L,pe)|0))<<13)|0;return c=((s=Math.imul(L,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=be,l[1]=ge,l[2]=ye,l[3]=ve,l[4]=we,l[5]=_e,l[6]=xe,l[7]=ke,l[8]=Se,l[9]=Me,l[10]=Ce,l[11]=Te,l[12]=Ee,l[13]=Ae,l[14]=Re,l[15]=Oe,l[16]=je,l[17]=Ie,l[18]=Ne,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(p=d),s.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,s=0;s>>26)|0)>>>26,o&=67108863}r.words[s]=a,n=o,o=i}return 0!==n?r.words[s]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=s.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,s){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&s,s>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=s>>>26,this.words[r]=67108863&s}return 0!==t&&(this.words[r]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new s(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-s|h>>>s,u=h&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){n(\"number\"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(n(\"number\"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&s}for(;i>26,this.words[i+r]=67108863&s;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var a,l=n.length-i.length;if(\"mod\"!==t){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),\"div\"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},s.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),\"mod\"!==t&&(i=a.div.neg()),\"div\"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),\"mod\"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),\"div\"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?\"div\"===t?{div:this.divn(e.words[0]),mod:null}:\"mod\"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,\"div\",!1).div},s.prototype.mod=function(e){return this.divmod(e,\"mod\",!1).mod},s.prototype.umod=function(e){return this.divmod(e,\"mod\",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},s.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;0==(t.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),o.isub(l)):(r.isub(t),a.isub(i),l.isub(o))}return{a:a,b:l,gcd:r.iushln(c)}},s.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a)):(r.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var s=t;t=r,r=s}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){n(\"number\"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,\"Number is too big\");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new k(e)},s.prototype.toRed=function(e){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(e)},s.prototype.redAdd=function(e){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,e)},s.prototype.redISub=function(e){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,e)},s.prototype.redShl=function(e){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,e)},s.prototype.redMul=function(e){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return n(this.red&&!e.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){y.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function _(){y.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function x(){y.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function k(e){if(\"string\"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),\"modulus must be greater than 1\"),this.m=e,this.prime=null}function S(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(v,y),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=s}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(g[e])return g[e];var t;if(\"k256\"===e)t=new v;else if(\"p224\"===e)t=new w;else if(\"p192\"===e)t=new _;else{if(\"p25519\"!==e)throw new Error(\"Unknown prime \"+e);t=new x}return g[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,\"red works only with positives\"),n(e.red,\"red works only with red numbers\")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),\"red works only with positives\"),n(e.red&&e.red===t.red,\"red works only with red numbers\")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new s(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;0!==d.cmp(a);){for(var m=d,b=0;0!==m.cmp(a);b++)m=m.redSqr();n(b=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[o]),a=0,o=0)):a=0}l=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new S(e)},i(S,k),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t)},{buffer:188}],185:[function(e,t,r){\"use strict\";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=c(e),o=n[0],a=n[1],l=new s(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),u=0,h=a>0?o-4:o;for(r=0;r>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[u++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=0,a=r-i;oa?a:o+16383));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+\"==\")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+\"=\"));return s.join(\"\")};for(var n=[],i=[],s=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0,l=o.length;a0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,s,o=[],a=t;a>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],186:[function(e,t,r){\"use strict\";!function(t,r){function n(e,t){if(!e)throw new Error(t||\"Assertion failed\")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function s(e,t,r){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(\"le\"!==t&&\"be\"!==t||(r=t,t=10),this._init(e||0,t||10,r||\"be\"))}var o;\"object\"==typeof t?t.exports=s:(void 0).BN=s,s.BN=s,s.wordSize=26;try{o=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:e(\"buffer\").Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,\"Invalid character in \"+e)}function l(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var s=0,o=0,a=Math.min(e.length,r),l=t;l=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&o0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,r){if(\"number\"==typeof e)return this._initNumber(e,t,r);if(\"object\"==typeof e)return this._initArray(e,t,r);\"hex\"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;\"-\"===(e=e.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if(\"le\"===r)for(i=0,s=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var s=e.length-r,o=s%n,a=Math.min(s,s-o)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},\"undefined\"!=typeof Symbol&&\"function\"==typeof Symbol.for)try{s.prototype[Symbol.for(\"nodejs.util.inspect.custom\")]=h}catch(e){s.prototype.inspect=h}else s.prototype.inspect=h;function h(){return(this.red?\"\"}var f=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||\"hex\"===e){r=\"\";for(var i=0,s=0,o=0;o>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),r=0!==s||o!==this.length-1?f[6-l.length]+l+r:l+r}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],u=p[e];r=\"\";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(u).toString(e);r=(h=h.idivn(u)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%t!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,l=o/67108864|0;r.words[0]=a;for(var c=1;c>>26,h=67108863&l,f=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=f;d++){var p=c-d|0;u+=(o=(i=0|e.words[p])*(s=0|t.words[d])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r._strip()}s.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,\"byte array longer than desired length\"),n(s>0,\"Requested array length <= 0\");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this[\"_toArrayLike\"+(\"le\"===t?\"LE\":\"BE\")](o,i),o},s.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,s=0;i>8&255),r>16&255),6===s?(r>24&255),n=0,s=0):(n=o>>>24,s+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===s?(r>=0&&(e[r--]=o>>24&255),n=0,s=0):(n=o>>>24,s+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){n(\"number\"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){n(\"number\"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s>>26;for(;0!==i&&s>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var s=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==s&&o>26,this.words[o]=67108863&t;if(0===s&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,b=0|o[2],g=8191&b,y=b>>>13,v=0|o[3],w=8191&v,_=v>>>13,x=0|o[4],k=8191&x,S=x>>>13,M=0|o[5],C=8191&M,T=M>>>13,E=0|o[6],A=8191&E,R=E>>>13,O=0|o[7],j=8191&O,I=O>>>13,N=0|o[8],P=8191&N,B=N>>>13,D=0|o[9],F=8191&D,L=D>>>13,z=0|a[0],U=8191&z,$=z>>>13,H=0|a[1],V=8191&H,q=H>>>13,W=0|a[2],X=8191&W,K=W>>>13,Y=0|a[3],Z=8191&Y,G=Y>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],le=8191&ae,ce=ae>>>13,ue=0|a[8],he=8191&ue,fe=ue>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,$))+Math.imul(f,U)|0))<<13)|0;c=((s=Math.imul(f,$))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,$))+Math.imul(m,U)|0,s=Math.imul(m,$);var ge=(c+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,q)|0)+Math.imul(f,V)|0))<<13)|0;c=((s=s+Math.imul(f,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,$))+Math.imul(y,U)|0,s=Math.imul(y,$),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,s=s+Math.imul(m,q)|0;var ye=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,X)|0))<<13)|0;c=((s=s+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,$))+Math.imul(_,U)|0,s=Math.imul(_,$),n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(y,V)|0,s=s+Math.imul(y,q)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,K)|0;var ve=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,Z)|0))<<13)|0;c=((s=s+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,$))+Math.imul(S,U)|0,s=Math.imul(S,$),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,V)|0,s=s+Math.imul(_,q)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,K)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,s=s+Math.imul(m,G)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((s=s+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,$))+Math.imul(T,U)|0,s=Math.imul(T,$),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(S,V)|0,s=s+Math.imul(S,q)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,K)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(y,Z)|0,s=s+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((s=s+Math.imul(f,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(A,U),i=(i=Math.imul(A,$))+Math.imul(R,U)|0,s=Math.imul(R,$),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(T,V)|0,s=s+Math.imul(T,q)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(S,X)|0,s=s+Math.imul(S,K)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,s=s+Math.imul(_,G)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,s=s+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,s=s+Math.imul(m,ne)|0;var xe=(c+(n=n+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(f,se)|0))<<13)|0;c=((s=s+Math.imul(f,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,$))+Math.imul(I,U)|0,s=Math.imul(I,$),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(R,V)|0,s=s+Math.imul(R,q)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,K)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,Z)|0,s=s+Math.imul(S,G)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(y,re)|0,s=s+Math.imul(y,ne)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var ke=(c+(n=n+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((s=s+Math.imul(f,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,$))+Math.imul(B,U)|0,s=Math.imul(B,$),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,q)|0)+Math.imul(I,V)|0,s=s+Math.imul(I,q)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(R,X)|0,s=s+Math.imul(R,K)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(T,Z)|0,s=s+Math.imul(T,G)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,s=s+Math.imul(_,ne)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(y,se)|0,s=s+Math.imul(y,oe)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ce)|0;var Se=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,fe)|0)+Math.imul(f,he)|0))<<13)|0;c=((s=s+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,$))+Math.imul(L,U)|0,s=Math.imul(L,$),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,q)|0)+Math.imul(B,V)|0,s=s+Math.imul(B,q)|0,n=n+Math.imul(j,X)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(I,X)|0,s=s+Math.imul(I,K)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(R,Z)|0,s=s+Math.imul(R,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,s=s+Math.imul(S,ne)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,oe)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(y,le)|0,s=s+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,he)|0,s=s+Math.imul(m,fe)|0;var Me=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((s=s+Math.imul(f,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,V),i=(i=Math.imul(F,q))+Math.imul(L,V)|0,s=Math.imul(L,q),n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(B,X)|0,s=s+Math.imul(B,K)|0,n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(I,Z)|0,s=s+Math.imul(I,G)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(R,Q)|0,s=s+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(T,re)|0,s=s+Math.imul(T,ne)|0,n=n+Math.imul(k,se)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,oe)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,le)|0,s=s+Math.imul(_,ce)|0,n=n+Math.imul(g,he)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(y,he)|0,s=s+Math.imul(y,fe)|0;var Ce=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,K))+Math.imul(L,X)|0,s=Math.imul(L,K),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(B,Z)|0,s=s+Math.imul(B,G)|0,n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(I,Q)|0,s=s+Math.imul(I,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(R,re)|0,s=s+Math.imul(R,ne)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,oe)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,le)|0,s=s+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,fe)|0;var Te=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((s=s+Math.imul(y,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,G))+Math.imul(L,Z)|0,s=Math.imul(L,G),n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(B,Q)|0,s=s+Math.imul(B,ee)|0,n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(I,re)|0,s=s+Math.imul(I,ne)|0,n=n+Math.imul(A,se)|0,i=(i=i+Math.imul(A,oe)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,oe)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(T,le)|0,s=s+Math.imul(T,ce)|0,n=n+Math.imul(k,he)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(S,he)|0,s=s+Math.imul(S,fe)|0;var Ee=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((s=s+Math.imul(_,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(L,Q)|0,s=Math.imul(L,ee),n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(B,re)|0,s=s+Math.imul(B,ne)|0,n=n+Math.imul(j,se)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,oe)|0,n=n+Math.imul(A,le)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ce)|0,n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(T,he)|0,s=s+Math.imul(T,fe)|0;var Ae=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(S,pe)|0))<<13)|0;c=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(L,re)|0,s=Math.imul(L,ne),n=n+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(B,se)|0,s=s+Math.imul(B,oe)|0,n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,ce)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,ce)|0,n=n+Math.imul(A,he)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(R,he)|0,s=s+Math.imul(R,fe)|0;var Re=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,se),i=(i=Math.imul(F,oe))+Math.imul(L,se)|0,s=Math.imul(L,oe),n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(B,le)|0,s=s+Math.imul(B,ce)|0,n=n+Math.imul(j,he)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(I,he)|0,s=s+Math.imul(I,fe)|0;var Oe=(c+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,ce))+Math.imul(L,le)|0,s=Math.imul(L,ce),n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(B,he)|0,s=s+Math.imul(B,fe)|0;var je=(c+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(F,he),i=(i=Math.imul(F,fe))+Math.imul(L,he)|0,s=Math.imul(L,fe);var Ie=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(B,pe)|0))<<13)|0;c=((s=s+Math.imul(B,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Ne=(c+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,me))+Math.imul(L,pe)|0))<<13)|0;return c=((s=Math.imul(L,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=be,l[1]=ge,l[2]=ye,l[3]=ve,l[4]=we,l[5]=_e,l[6]=xe,l[7]=ke,l[8]=Se,l[9]=Me,l[10]=Ce,l[11]=Te,l[12]=Ee,l[13]=Ae,l[14]=Re,l[15]=Oe,l[16]=je,l[17]=Ie,l[18]=Ne,0!==c&&(l[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,s=0;s>>26)|0)>>>26,o&=67108863}r.words[s]=a,n=o,o=i}return 0!==n?r.words[s]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(b=m),s.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?m(this,e,t):r<1024?g(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=s.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,s){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&s,s>>>=13;for(o=2*t;o>=26,r+=s/67108864|0,r+=o>>>26,this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new s(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-s|h>>>s,u=h&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){n(\"number\"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(n(\"number\"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&s}for(;i>26,this.words[i+r]=67108863&s;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var a,l=n.length-i.length;if(\"mod\"!==t){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a._strip(),n._strip(),\"div\"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},s.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),\"mod\"!==t&&(i=a.div.neg()),\"div\"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),\"mod\"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),\"div\"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?\"div\"===t?{div:this.divn(e.words[0]),mod:null}:\"mod\"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,\"div\",!1).div},s.prototype.mod=function(e){return this.divmod(e,\"mod\",!1).mod},s.prototype.umod=function(e){return this.divmod(e,\"mod\",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(r*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*r;this.words[i]=s/e|0,r=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;0==(t.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),o.isub(l)):(r.isub(t),a.isub(i),l.isub(o))}return{a:a,b:l,gcd:r.iushln(c)}},s.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a)):(r.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var s=t;t=r,r=s}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){n(\"number\"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,\"Number is too big\");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new C(e)},s.prototype.toRed=function(e){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(e)},s.prototype.redAdd=function(e){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,e)},s.prototype.redISub=function(e){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,e)},s.prototype.redShl=function(e){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,e)},s.prototype.redMul=function(e){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return n(this.red&&!e.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){_.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function k(){_.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function S(){_.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function M(){_.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function C(e){if(\"string\"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),\"modulus must be greater than 1\"),this.m=e,this.prime=null}function T(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(x,_),x.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=s}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(w[e])return w[e];var t;if(\"k256\"===e)t=new x;else if(\"p224\"===e)t=new k;else if(\"p192\"===e)t=new S;else{if(\"p25519\"!==e)throw new Error(\"Unknown prime \"+e);t=new M}return w[e]=t,t},C.prototype._verify1=function(e){n(0===e.negative,\"red works only with positives\"),n(e.red,\"red works only with red numbers\")},C.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),\"red works only with positives\"),n(e.red&&e.red===t.red,\"red works only with red numbers\")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},C.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new s(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;0!==d.cmp(a);){for(var m=d,b=0;0!==m.cmp(a);b++)m=m.redSqr();n(b=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[o]),a=0,o=0)):a=0}l=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new T(e)},i(T,C),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t)},{buffer:188}],187:[function(e,t,r){\"use strict\";var n;function i(e){this.rand=e}if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^u[p>>>16&255]^h[m>>>8&255]^f[255&b]^t[g++],o=c[p>>>24]^u[m>>>16&255]^h[b>>>8&255]^f[255&d]^t[g++],a=c[m>>>24]^u[b>>>16&255]^h[d>>>8&255]^f[255&p]^t[g++],l=c[b>>>24]^u[d>>>16&255]^h[p>>>8&255]^f[255&m]^t[g++],d=s,p=o,m=a,b=l;return s=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&b])^t[g++],o=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[b>>>8&255]<<8|n[255&d])^t[g++],a=(n[m>>>24]<<24|n[b>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[g++],l=(n[b>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[g++],[s>>>=0,o>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],s=[[],[],[],[]],o=0,a=0,l=0;l<256;++l){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[o]=c,n[c]=o;var u=e[o],h=e[u],f=e[h],d=257*e[c]^16843008*c;i[0][o]=d<<24|d>>>8,i[1][o]=d<<16|d>>>16,i[2][o]=d<<8|d>>>24,i[3][o]=d,d=16843009*f^65537*h^257*u^16843008*o,s[0][c]=d<<24|d>>>8,s[1][c]=d<<16|d>>>16,s[2][c]=d<<8|d>>>24,s[3][c]=d,0===o?o=a=1:(o=u^e[e[e[f^u]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:s}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],s=0;s>>24,o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o],o^=a[s/t|0]<<24):t>6&&s%t==4&&(o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o]),i[s]=i[s-t]^o}for(var c=[],u=0;u>>24]]^l.INV_SUB_MIX[1][l.SBOX[f>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[f>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&f]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return o(e=i(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=o(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),s=n.allocUnsafe(16);return s.writeUInt32BE(r[0],0),s.writeUInt32BE(r[3],4),s.writeUInt32BE(r[2],8),s.writeUInt32BE(r[1],12),s},c.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},t.exports.AES=c},{\"safe-buffer\":494}],190:[function(e,t,r){\"use strict\";var n=e(\"./aes\"),i=e(\"safe-buffer\").Buffer,s=e(\"cipher-base\"),o=e(\"inherits\"),a=e(\"./ghash\"),l=e(\"buffer-xor\"),c=e(\"./incr32\");function u(e,t,r,o){s.call(this);var l=i.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new a(u),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new a(r),s=t.length,o=s%16;n.update(t),o&&(o=16-o,n.update(i.alloc(o,0))),n.update(i.alloc(8,0));var l=8*s,u=i.alloc(8);u.writeUIntBE(l,0,8),n.update(u),e._finID=n.state;var h=i.from(e._finID);return c(h),h}(this,r,u),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(u,s),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error(\"Unsupported state or unable to authenticate data\");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i16)throw new Error(\"unable to decrypt data\");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=s[e.toLowerCase()];if(!r)throw new TypeError(\"invalid suite type\");var n=c(t,!1,r.key,r.iv);return f(e,n.key,n.iv)},r.createDecipheriv=f},{\"./aes\":189,\"./authCipher\":190,\"./modes\":202,\"./streamCipher\":205,\"cipher-base\":221,evp_bytestokey:423,inherits:440,\"safe-buffer\":494}],193:[function(e,t,r){\"use strict\";var n=e(\"./modes\"),i=e(\"./authCipher\"),s=e(\"safe-buffer\").Buffer,o=e(\"./streamCipher\"),a=e(\"cipher-base\"),l=e(\"./aes\"),c=e(\"evp_bytestokey\");function u(e,t,r){a.call(this),this._cache=new f,this._cipher=new l.AES(t),this._prev=s.from(r),this._mode=e,this._autopadding=!0}e(\"inherits\")(u,a),u.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return s.concat(n)};var h=s.alloc(16,16);function f(){this.cache=s.allocUnsafe(0)}function d(e,t,r){var a=n[e.toLowerCase()];if(!a)throw new TypeError(\"invalid suite type\");if(\"string\"==typeof t&&(t=s.from(t)),t.length!==a.key/8)throw new TypeError(\"invalid key length \"+t.length);if(\"string\"==typeof r&&(r=s.from(r)),\"GCM\"!==a.mode&&r.length!==a.iv)throw new TypeError(\"invalid iv length \"+r.length);return\"stream\"===a.type?new o(a.module,t,r):\"auth\"===a.type?new i(a.module,t,r):new u(a.module,t,r)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error(\"data not multiple of block length\")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=s.concat([this.cache,e])},f.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},f.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),r=-1;++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=s(i)},o.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},t.exports=o},{\"safe-buffer\":494}],195:[function(e,t,r){\"use strict\";t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],196:[function(e,t,r){\"use strict\";var n=e(\"buffer-xor\");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},{\"buffer-xor\":219}],197:[function(e,t,r){\"use strict\";var n=e(\"safe-buffer\").Buffer,i=e(\"buffer-xor\");function s(e,t,r){var s=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(s),e._prev=n.concat([e._prev,r?t:o]),o}r.encrypt=function(e,t,r){for(var i,o=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){o=n.concat([o,s(e,t,r)]);break}i=e._cache.length,o=n.concat([o,s(e,t.slice(0,i),r)]),t=t.slice(i)}return o}},{\"buffer-xor\":219,\"safe-buffer\":494}],198:[function(e,t,r){\"use strict\";var n=e(\"safe-buffer\").Buffer;function i(e,t,r){for(var n,i,o=-1,a=0;++o<8;)n=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>o%8,e._prev=s(e._prev,r?n:i);return a}function s(e,t){var r=e.length,i=-1,s=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return s}r.encrypt=function(e,t,r){for(var s=t.length,o=n.allocUnsafe(s),a=-1;++a=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function o(e,t){var i=function(e){var t=s(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),a=new n(e).mul(i.blinder).umod(t.modulus),l=a.toRed(n.mont(t.prime1)),c=a.toRed(n.mont(t.prime2)),u=t.coefficient,h=t.prime1,f=t.prime2,d=l.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),m=d.isub(p).imul(u).umod(h).imul(f);return p.iadd(m).imul(i.unblinder).umod(t.modulus).toArrayLike(r,\"be\",o)}o.getr=s,t.exports=o}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"bn.js\":186,buffer:220,randombytes:475}],210:[function(e,t,r){\"use strict\";t.exports=e(\"./browser/algorithms.json\")},{\"./browser/algorithms.json\":211}],211:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:\"rsa\",hash:\"sha224\",id:\"302d300d06096086480165030402040500041c\"},\"RSA-SHA224\":{sign:\"ecdsa/rsa\",hash:\"sha224\",id:\"302d300d06096086480165030402040500041c\"},sha256WithRSAEncryption:{sign:\"rsa\",hash:\"sha256\",id:\"3031300d060960864801650304020105000420\"},\"RSA-SHA256\":{sign:\"ecdsa/rsa\",hash:\"sha256\",id:\"3031300d060960864801650304020105000420\"},sha384WithRSAEncryption:{sign:\"rsa\",hash:\"sha384\",id:\"3041300d060960864801650304020205000430\"},\"RSA-SHA384\":{sign:\"ecdsa/rsa\",hash:\"sha384\",id:\"3041300d060960864801650304020205000430\"},sha512WithRSAEncryption:{sign:\"rsa\",hash:\"sha512\",id:\"3051300d060960864801650304020305000440\"},\"RSA-SHA512\":{sign:\"ecdsa/rsa\",hash:\"sha512\",id:\"3051300d060960864801650304020305000440\"},\"RSA-SHA1\":{sign:\"rsa\",hash:\"sha1\",id:\"3021300906052b0e03021a05000414\"},\"ecdsa-with-SHA1\":{sign:\"ecdsa\",hash:\"sha1\",id:\"\"},sha256:{sign:\"ecdsa\",hash:\"sha256\",id:\"\"},sha224:{sign:\"ecdsa\",hash:\"sha224\",id:\"\"},sha384:{sign:\"ecdsa\",hash:\"sha384\",id:\"\"},sha512:{sign:\"ecdsa\",hash:\"sha512\",id:\"\"},\"DSA-SHA\":{sign:\"dsa\",hash:\"sha1\",id:\"\"},\"DSA-SHA1\":{sign:\"dsa\",hash:\"sha1\",id:\"\"},DSA:{sign:\"dsa\",hash:\"sha1\",id:\"\"},\"DSA-WITH-SHA224\":{sign:\"dsa\",hash:\"sha224\",id:\"\"},\"DSA-SHA224\":{sign:\"dsa\",hash:\"sha224\",id:\"\"},\"DSA-WITH-SHA256\":{sign:\"dsa\",hash:\"sha256\",id:\"\"},\"DSA-SHA256\":{sign:\"dsa\",hash:\"sha256\",id:\"\"},\"DSA-WITH-SHA384\":{sign:\"dsa\",hash:\"sha384\",id:\"\"},\"DSA-SHA384\":{sign:\"dsa\",hash:\"sha384\",id:\"\"},\"DSA-WITH-SHA512\":{sign:\"dsa\",hash:\"sha512\",id:\"\"},\"DSA-SHA512\":{sign:\"dsa\",hash:\"sha512\",id:\"\"},\"DSA-RIPEMD160\":{sign:\"dsa\",hash:\"rmd160\",id:\"\"},ripemd160WithRSA:{sign:\"rsa\",hash:\"rmd160\",id:\"3021300906052b2403020105000414\"},\"RSA-RIPEMD160\":{sign:\"rsa\",hash:\"rmd160\",id:\"3021300906052b2403020105000414\"},md5WithRSAEncryption:{sign:\"rsa\",hash:\"md5\",id:\"3020300c06082a864886f70d020505000410\"},\"RSA-MD5\":{sign:\"rsa\",hash:\"md5\",id:\"3020300c06082a864886f70d020505000410\"}}},{}],212:[function(e,t,r){t.exports={\"1.3.132.0.10\":\"secp256k1\",\"1.3.132.0.33\":\"p224\",\"1.2.840.10045.3.1.1\":\"p192\",\"1.2.840.10045.3.1.7\":\"p256\",\"1.3.132.0.34\":\"p384\",\"1.3.132.0.35\":\"p521\"}},{}],213:[function(e,t,r){\"use strict\";var n=e(\"safe-buffer\").Buffer,i=e(\"create-hash\"),s=e(\"readable-stream\"),o=e(\"inherits\"),a=e(\"./sign\"),l=e(\"./verify\"),c=e(\"./algorithms.json\");function u(e){s.Writable.call(this);var t=c[e];if(!t)throw new Error(\"Unknown message digest\");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){s.Writable.call(this);var t=c[e];if(!t)throw new Error(\"Unknown message digest\");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){return new u(e)}function d(e){return new h(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,\"hex\"),c[e.toLowerCase()]=c[e]})),o(u,s.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return\"string\"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(h,s.Writable),h.prototype._write=function(e,t,r){this._hash.update(e),r()},h.prototype.update=function(e,t){return\"string\"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,r){\"string\"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return l(t,i,e,this._signType,this._tag)},t.exports={Sign:f,Verify:d,createSign:f,createVerify:d}},{\"./algorithms.json\":211,\"./sign\":214,\"./verify\":215,\"create-hash\":386,inherits:440,\"readable-stream\":491,\"safe-buffer\":494}],214:[function(e,t,r){\"use strict\";var n=e(\"safe-buffer\").Buffer,i=e(\"create-hmac\"),s=e(\"browserify-rsa\"),o=e(\"elliptic\").ec,a=e(\"bn.js\"),l=e(\"parse-asn1\"),c=e(\"./curves.json\");function u(e,t,r,s){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function f(e,t,r){var s,o;do{for(s=n.alloc(0);8*s.length=t)throw new Error(\"invalid sig\")}t.exports=function(e,t,r,c,u){var h=o(r);if(\"ec\"===h.type){if(\"ecdsa\"!==c&&\"ecdsa/rsa\"!==c)throw new Error(\"wrong public key type\");return function(e,t,r){var n=a[r.data.algorithm.curve.join(\".\")];if(!n)throw new Error(\"unknown curve \"+r.data.algorithm.curve.join(\".\"));var i=new s(n),o=r.data.subjectPrivateKey.data;return i.verify(t,e,o)}(e,t,h)}if(\"dsa\"===h.type){if(\"dsa\"!==c)throw new Error(\"wrong public key type\");return function(e,t,r){var n=r.data.p,s=r.data.q,a=r.data.g,c=r.data.pub_key,u=o.signature.decode(e,\"der\"),h=u.s,f=u.r;l(h,s),l(f,s);var d=i.mont(n),p=h.invm(s);return 0===a.toRed(d).redPow(new i(t).mul(p).mod(s)).fromRed().mul(c.toRed(d).redPow(f.mul(p).mod(s)).fromRed()).mod(n).mod(s).cmp(f)}(e,t,h)}if(\"rsa\"!==c&&\"ecdsa/rsa\"!==c)throw new Error(\"wrong public key type\");t=n.concat([u,t]);for(var f=h.modulus.byteLength(),d=[1],p=0;t.length+d.length+2>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,\"\\ufffd\";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,\"\\ufffd\";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,\"\\ufffd\"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString(\"utf16le\",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(\"utf16le\",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(\"utf16le\",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString(\"base64\",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(\"base64\",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+this.lastChar.toString(\"base64\",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):\"\"}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return\"\";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString(\"utf8\",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString(\"utf8\",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{\"safe-buffer\":217}],219:[function(e,t,r){(function(e){(function(){\"use strict\";t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),s=0;s\n * @license MIT\n */\n\"use strict\";var t=e(\"base64-js\"),n=e(\"ieee754\");r.Buffer=s,r.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},r.INSPECT_MAX_BYTES=50;function i(e){if(e>2147483647)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return l(e)}return o(e,t,r)}function o(e,t,r){if(\"string\"==typeof e)return function(e,t){\"string\"==typeof t&&\"\"!==t||(t=\"utf8\");if(!s.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);var r=0|h(e,t),n=i(r),o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647..toString(16)+\" bytes\");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return P(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return B(e).length;default:if(i)return n?-1:P(e).length;t=(\"\"+t).toLowerCase(),i=!0}}function f(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return C(this,t,r);case\"utf8\":case\"utf-8\":return k(this,t,r);case\"ascii\":return S(this,t,r);case\"latin1\":case\"binary\":return M(this,t,r);case\"base64\":return x(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return T(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function p(e,t,r,n,i){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),L(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function m(e,t,r,n,i){var s,o=1,a=e.length,l=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(s=r;sa&&(r=a-l),s=r;s>=0;s--){for(var h=!0,f=0;fi&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var o=0;o>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function x(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r=\"\",n=0;for(;nt&&(e+=\" ... \"),\"\"},s.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),l=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var s=!1;;)switch(n){case\"hex\":return b(this,e,t,r);case\"utf8\":case\"utf-8\":return g(this,e,t,r);case\"ascii\":return y(this,e,t,r);case\"latin1\":case\"binary\":return v(this,e,t,r);case\"base64\":return w(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return _(this,e,t,r);default:if(s)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),s=!0}},s.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i=\"\",s=t;sr)throw new RangeError(\"Trying to access beyond buffer length\")}function A(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError(\"Index out of range\")}function R(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function O(e,t,r,i,s){return t=+t,r>>>=0,s||R(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function j(e,t,r,i,s){return t=+t,r>>>=0,s||R(e,0,r,8),n.write(e,t,r,i,52,8),r+8}s.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e],i=1,s=0;++s>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e],i=1,s=0;++s=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},s.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||A(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,n)||A(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.prototype.fill=function(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!s.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){var i=e.charCodeAt(0);(\"utf8\"===n&&i<128||\"latin1\"===n)&&(e=i)}}else\"number\"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function B(e){return t.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(I,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function D(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function L(e){return e!=e}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"base64-js\":185,buffer:220,ieee754:439}],221:[function(e,t,r){\"use strict\";var n=e(\"safe-buffer\").Buffer,i=e(\"stream\").Transform,s=e(\"string_decoder\").StringDecoder;function o(e){i.call(this),this.hashMode=\"string\"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e(\"inherits\")(o,i),o.prototype.update=function(e,t,r){\"string\"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error(\"trying to get auth tag in unsupported state\")},o.prototype.setAuthTag=function(){throw new Error(\"trying to set auth tag in unsupported state\")},o.prototype.setAAD=function(){throw new Error(\"trying to set aad in unsupported state\")},o.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new s(t),this._encoding=t),this._encoding!==t)throw new Error(\"can't switch encodings\");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},t.exports=o},{inherits:440,\"safe-buffer\":494,stream:505,string_decoder:218}],222:[function(e,t,r){\"use strict\";var n=e(\"../internals/is-callable\"),i=e(\"../internals/try-to-string\"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(i(e)+\" is not a function\")}},{\"../internals/is-callable\":285,\"../internals/try-to-string\":349}],223:[function(e,t,r){\"use strict\";var n=e(\"../internals/is-constructor\"),i=e(\"../internals/try-to-string\"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(i(e)+\" is not a constructor\")}},{\"../internals/is-constructor\":286,\"../internals/try-to-string\":349}],224:[function(e,t,r){\"use strict\";var n=e(\"../internals/is-callable\"),i=String,s=TypeError;t.exports=function(e){if(\"object\"==typeof e||n(e))return e;throw new s(\"Can't set \"+i(e)+\" as a prototype\")}},{\"../internals/is-callable\":285}],225:[function(e,t,r){\"use strict\";var n=e(\"../internals/well-known-symbol\"),i=e(\"../internals/object-create\"),s=e(\"../internals/object-define-property\").f,o=n(\"unscopables\"),a=Array.prototype;void 0===a[o]&&s(a,o,{configurable:!0,value:i(null)}),t.exports=function(e){a[o][e]=!0}},{\"../internals/object-create\":306,\"../internals/object-define-property\":308,\"../internals/well-known-symbol\":357}],226:[function(e,t,r){\"use strict\";var n=e(\"../internals/object-is-prototype-of\"),i=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new i(\"Incorrect invocation\")}},{\"../internals/object-is-prototype-of\":314}],227:[function(e,t,r){\"use strict\";var n=e(\"../internals/is-object\"),i=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(i(e)+\" is not an object\")}},{\"../internals/is-object\":289}],228:[function(e,t,r){\"use strict\";var n=e(\"../internals/to-indexed-object\"),i=e(\"../internals/to-absolute-index\"),s=e(\"../internals/length-of-array-like\"),o=function(e){return function(t,r,o){var a,l=n(t),c=s(l),u=i(o,c);if(e&&r!=r){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===r)return e||u||0;return!e&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},{\"../internals/length-of-array-like\":299,\"../internals/to-absolute-index\":340,\"../internals/to-indexed-object\":341}],229:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-bind-context\"),i=e(\"../internals/function-uncurry-this\"),s=e(\"../internals/indexed-object\"),o=e(\"../internals/to-object\"),a=e(\"../internals/length-of-array-like\"),l=e(\"../internals/array-species-create\"),c=i([].push),u=function(e){var t=1===e,r=2===e,i=3===e,u=4===e,h=6===e,f=7===e,d=5===e||h;return function(p,m,b,g){for(var y,v,w=o(p),_=s(w),x=n(m,b),k=a(_),S=0,M=g||l,C=t?M(p,k):r||f?M(p,0):void 0;k>S;S++)if((d||S in _)&&(v=x(y=_[S],S,w),e))if(t)C[S]=v;else if(v)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:c(C,y)}else switch(e){case 4:return!1;case 7:c(C,y)}return h?-1:i||u?u:C}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},{\"../internals/array-species-create\":233,\"../internals/function-bind-context\":262,\"../internals/function-uncurry-this\":268,\"../internals/indexed-object\":280,\"../internals/length-of-array-like\":299,\"../internals/to-object\":344}],230:[function(e,t,r){\"use strict\";var n=e(\"../internals/to-absolute-index\"),i=e(\"../internals/length-of-array-like\"),s=e(\"../internals/create-property\"),o=Array,a=Math.max;t.exports=function(e,t,r){for(var l=i(e),c=n(t,l),u=n(void 0===r?l:r,l),h=o(a(u-c,0)),f=0;c0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\\/(\\d+)/))&&(i=+n[1]),t.exports=i},{\"../internals/engine-user-agent\":256,\"../internals/global\":274}],258:[function(e,t,r){\"use strict\";t.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},{}],259:[function(e,t,r){\"use strict\";var n=e(\"../internals/global\"),i=e(\"../internals/object-get-own-property-descriptor\").f,s=e(\"../internals/create-non-enumerable-property\"),o=e(\"../internals/define-built-in\"),a=e(\"../internals/define-global-property\"),l=e(\"../internals/copy-constructor-properties\"),c=e(\"../internals/is-forced\");t.exports=function(e,t){var r,u,h,f,d,p=e.target,m=e.global,b=e.stat;if(r=m?n:b?n[p]||a(p,{}):(n[p]||{}).prototype)for(u in t){if(f=t[u],h=e.dontCallGetSet?(d=i(r,u))&&d.value:r[u],!c(m?u:p+(b?\".\":\"#\")+u,e.forced)&&void 0!==h){if(typeof f==typeof h)continue;l(f,h)}(e.sham||h&&h.sham)&&s(f,\"sham\",!0),o(r,u,f,e)}}},{\"../internals/copy-constructor-properties\":237,\"../internals/create-non-enumerable-property\":241,\"../internals/define-built-in\":245,\"../internals/define-global-property\":246,\"../internals/global\":274,\"../internals/is-forced\":287,\"../internals/object-get-own-property-descriptor\":309}],260:[function(e,t,r){\"use strict\";t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],261:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-bind-native\"),i=Function.prototype,s=i.apply,o=i.call;t.exports=\"object\"==typeof Reflect&&Reflect.apply||(n?o.bind(s):function(){return o.apply(s,arguments)})},{\"../internals/function-bind-native\":263}],262:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-uncurry-this-clause\"),i=e(\"../internals/a-callable\"),s=e(\"../internals/function-bind-native\"),o=n(n.bind);t.exports=function(e,t){return i(e),void 0===t?e:s?o(e,t):function(){return e.apply(t,arguments)}}},{\"../internals/a-callable\":222,\"../internals/function-bind-native\":263,\"../internals/function-uncurry-this-clause\":267}],263:[function(e,t,r){\"use strict\";var n=e(\"../internals/fails\");t.exports=!n((function(){var e=function(){}.bind();return\"function\"!=typeof e||e.hasOwnProperty(\"prototype\")}))},{\"../internals/fails\":260}],264:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-bind-native\"),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},{\"../internals/function-bind-native\":263}],265:[function(e,t,r){\"use strict\";var n=e(\"../internals/descriptors\"),i=e(\"../internals/has-own-property\"),s=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,a=i(s,\"name\"),l=a&&\"something\"===function(){}.name,c=a&&(!n||n&&o(s,\"name\").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},{\"../internals/descriptors\":247,\"../internals/has-own-property\":275}],266:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-uncurry-this\"),i=e(\"../internals/a-callable\");t.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},{\"../internals/a-callable\":222,\"../internals/function-uncurry-this\":268}],267:[function(e,t,r){\"use strict\";var n=e(\"../internals/classof-raw\"),i=e(\"../internals/function-uncurry-this\");t.exports=function(e){if(\"Function\"===n(e))return i(e)}},{\"../internals/classof-raw\":235,\"../internals/function-uncurry-this\":268}],268:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-bind-native\"),i=Function.prototype,s=i.call,o=n&&i.bind.bind(s,s);t.exports=n?o:function(e){return function(){return s.apply(e,arguments)}}},{\"../internals/function-bind-native\":263}],269:[function(e,t,r){\"use strict\";var n=e(\"../internals/global\"),i=e(\"../internals/is-callable\"),s=function(e){return i(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?s(n[e]):n[e]&&n[e][t]}},{\"../internals/global\":274,\"../internals/is-callable\":285}],270:[function(e,t,r){\"use strict\";var n=e(\"../internals/classof\"),i=e(\"../internals/get-method\"),s=e(\"../internals/is-null-or-undefined\"),o=e(\"../internals/iterators\"),a=e(\"../internals/well-known-symbol\")(\"iterator\");t.exports=function(e){if(!s(e))return i(e,a)||i(e,\"@@iterator\")||o[n(e)]}},{\"../internals/classof\":236,\"../internals/get-method\":273,\"../internals/is-null-or-undefined\":288,\"../internals/iterators\":298,\"../internals/well-known-symbol\":357}],271:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-call\"),i=e(\"../internals/a-callable\"),s=e(\"../internals/an-object\"),o=e(\"../internals/try-to-string\"),a=e(\"../internals/get-iterator-method\"),l=TypeError;t.exports=function(e,t){var r=arguments.length<2?a(e):t;if(i(r))return s(n(r,e));throw new l(o(e)+\" is not iterable\")}},{\"../internals/a-callable\":222,\"../internals/an-object\":227,\"../internals/function-call\":264,\"../internals/get-iterator-method\":270,\"../internals/try-to-string\":349}],272:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-uncurry-this\"),i=e(\"../internals/is-array\"),s=e(\"../internals/is-callable\"),o=e(\"../internals/classof-raw\"),a=e(\"../internals/to-string\"),l=n([].push);t.exports=function(e){if(s(e))return e;if(i(e)){for(var t=e.length,r=[],n=0;ny;y++)if((w=R(e[y]))&&c(m,w))return w;return new p(!1)}b=u(e,g)}for(_=M?e.next:b.next;!(x=i(_,b)).done;){try{w=R(x.value)}catch(e){f(b,\"throw\",e)}if(\"object\"==typeof w&&w&&c(m,w))return w}return new p(!1)}},{\"../internals/an-object\":227,\"../internals/function-bind-context\":262,\"../internals/function-call\":264,\"../internals/get-iterator\":271,\"../internals/get-iterator-method\":270,\"../internals/is-array-iterator-method\":283,\"../internals/iterator-close\":294,\"../internals/length-of-array-like\":299,\"../internals/object-is-prototype-of\":314,\"../internals/try-to-string\":349}],294:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-call\"),i=e(\"../internals/an-object\"),s=e(\"../internals/get-method\");t.exports=function(e,t,r){var o,a;i(e);try{if(!(o=s(e,\"return\"))){if(\"throw\"===t)throw r;return r}o=n(o,e)}catch(e){a=!0,o=e}if(\"throw\"===t)throw r;if(a)throw o;return i(o),r}},{\"../internals/an-object\":227,\"../internals/function-call\":264,\"../internals/get-method\":273}],295:[function(e,t,r){\"use strict\";var n=e(\"../internals/iterators-core\").IteratorPrototype,i=e(\"../internals/object-create\"),s=e(\"../internals/create-property-descriptor\"),o=e(\"../internals/set-to-string-tag\"),a=e(\"../internals/iterators\"),l=function(){return this};t.exports=function(e,t,r,c){var u=t+\" Iterator\";return e.prototype=i(n,{next:s(+!c,r)}),o(e,u,!1,!0),a[u]=l,e}},{\"../internals/create-property-descriptor\":242,\"../internals/iterators\":298,\"../internals/iterators-core\":297,\"../internals/object-create\":306,\"../internals/set-to-string-tag\":331}],296:[function(e,t,r){\"use strict\";var n=e(\"../internals/export\"),i=e(\"../internals/function-call\"),s=e(\"../internals/is-pure\"),o=e(\"../internals/function-name\"),a=e(\"../internals/is-callable\"),l=e(\"../internals/iterator-create-constructor\"),c=e(\"../internals/object-get-prototype-of\"),u=e(\"../internals/object-set-prototype-of\"),h=e(\"../internals/set-to-string-tag\"),f=e(\"../internals/create-non-enumerable-property\"),d=e(\"../internals/define-built-in\"),p=e(\"../internals/well-known-symbol\"),m=e(\"../internals/iterators\"),b=e(\"../internals/iterators-core\"),g=o.PROPER,y=o.CONFIGURABLE,v=b.IteratorPrototype,w=b.BUGGY_SAFARI_ITERATORS,_=p(\"iterator\"),x=function(){return this};t.exports=function(e,t,r,o,p,b,k){l(r,t,o);var S,M,C,T=function(e){if(e===p&&j)return j;if(!w&&e&&e in R)return R[e];switch(e){case\"keys\":case\"values\":case\"entries\":return function(){return new r(this,e)}}return function(){return new r(this)}},E=t+\" Iterator\",A=!1,R=e.prototype,O=R[_]||R[\"@@iterator\"]||p&&R[p],j=!w&&O||T(p),I=\"Array\"===t&&R.entries||O;if(I&&(S=c(I.call(new e)))!==Object.prototype&&S.next&&(s||c(S)===v||(u?u(S,v):a(S[_])||d(S,_,x)),h(S,E,!0,!0),s&&(m[E]=x)),g&&\"values\"===p&&O&&\"values\"!==O.name&&(!s&&y?f(R,\"name\",\"values\"):(A=!0,j=function(){return i(O,this)})),p)if(M={values:T(\"values\"),keys:b?j:T(\"keys\"),entries:T(\"entries\")},k)for(C in M)(w||A||!(C in R))&&d(R,C,M[C]);else n({target:t,proto:!0,forced:w||A},M);return s&&!k||R[_]===j||d(R,_,j,{name:p}),m[t]=j,M}},{\"../internals/create-non-enumerable-property\":241,\"../internals/define-built-in\":245,\"../internals/export\":259,\"../internals/function-call\":264,\"../internals/function-name\":265,\"../internals/is-callable\":285,\"../internals/is-pure\":290,\"../internals/iterator-create-constructor\":295,\"../internals/iterators\":298,\"../internals/iterators-core\":297,\"../internals/object-get-prototype-of\":313,\"../internals/object-set-prototype-of\":318,\"../internals/set-to-string-tag\":331,\"../internals/well-known-symbol\":357}],297:[function(e,t,r){\"use strict\";var n,i,s,o=e(\"../internals/fails\"),a=e(\"../internals/is-callable\"),l=e(\"../internals/is-object\"),c=e(\"../internals/object-create\"),u=e(\"../internals/object-get-prototype-of\"),h=e(\"../internals/define-built-in\"),f=e(\"../internals/well-known-symbol\"),d=e(\"../internals/is-pure\"),p=f(\"iterator\"),m=!1;[].keys&&(\"next\"in(s=[].keys())?(i=u(u(s)))!==Object.prototype&&(n=i):m=!0),!l(n)||o((function(){var e={};return n[p].call(e)!==e}))?n={}:d&&(n=c(n)),a(n[p])||h(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},{\"../internals/define-built-in\":245,\"../internals/fails\":260,\"../internals/is-callable\":285,\"../internals/is-object\":289,\"../internals/is-pure\":290,\"../internals/object-create\":306,\"../internals/object-get-prototype-of\":313,\"../internals/well-known-symbol\":357}],298:[function(e,t,r){arguments[4][276][0].apply(r,arguments)},{dup:276}],299:[function(e,t,r){\"use strict\";var n=e(\"../internals/to-length\");t.exports=function(e){return n(e.length)}},{\"../internals/to-length\":343}],300:[function(e,t,r){\"use strict\";var n=e(\"../internals/function-uncurry-this\"),i=e(\"../internals/fails\"),s=e(\"../internals/is-callable\"),o=e(\"../internals/has-own-property\"),a=e(\"../internals/descriptors\"),l=e(\"../internals/function-name\").CONFIGURABLE,c=e(\"../internals/inspect-source\"),u=e(\"../internals/internal-state\"),h=u.enforce,f=u.get,d=String,p=Object.defineProperty,m=n(\"\".slice),b=n(\"\".replace),g=n([].join),y=a&&!i((function(){return 8!==p((function(){}),\"length\",{value:8}).length})),v=String(String).split(\"String\"),w=t.exports=function(e,t,r){\"Symbol(\"===m(d(t),0,7)&&(t=\"[\"+b(d(t),/^Symbol\\(([^)]*)\\)/,\"$1\")+\"]\"),r&&r.getter&&(t=\"get \"+t),r&&r.setter&&(t=\"set \"+t),(!o(e,\"name\")||l&&e.name!==t)&&(a?p(e,\"name\",{value:t,configurable:!0}):e.name=t),y&&r&&o(r,\"arity\")&&e.length!==r.arity&&p(e,\"length\",{value:r.arity});try{r&&o(r,\"constructor\")&&r.constructor?a&&p(e,\"prototype\",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=h(e);return o(n,\"source\")||(n.source=g(v,\"string\"==typeof t?t:\"\")),e};Function.prototype.toString=w((function(){return s(this)&&f(this).source||c(this)}),\"toString\")},{\"../internals/descriptors\":247,\"../internals/fails\":260,\"../internals/function-name\":265,\"../internals/function-uncurry-this\":268,\"../internals/has-own-property\":275,\"../internals/inspect-source\":281,\"../internals/internal-state\":282,\"../internals/is-callable\":285}],301:[function(e,t,r){\"use strict\";var n=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?i:n)(t)}},{}],302:[function(e,t,r){\"use strict\";var n,i,s,o,a,l=e(\"../internals/global\"),c=e(\"../internals/function-bind-context\"),u=e(\"../internals/object-get-own-property-descriptor\").f,h=e(\"../internals/task\").set,f=e(\"../internals/queue\"),d=e(\"../internals/engine-is-ios\"),p=e(\"../internals/engine-is-ios-pebble\"),m=e(\"../internals/engine-is-webos-webkit\"),b=e(\"../internals/engine-is-node\"),g=l.MutationObserver||l.WebKitMutationObserver,y=l.document,v=l.process,w=l.Promise,_=u(l,\"queueMicrotask\"),x=_&&_.value;if(!x){var k=new f,S=function(){var e,t;for(b&&(e=v.domain)&&e.exit();t=k.get();)try{t()}catch(e){throw k.head&&n(),e}e&&e.enter()};d||b||m||!g||!y?!p&&w&&w.resolve?((o=w.resolve(void 0)).constructor=w,a=c(o.then,o),n=function(){a(S)}):b?n=function(){v.nextTick(S)}:(h=c(h,l),n=function(){h(S)}):(i=!0,s=y.createTextNode(\"\"),new g(S).observe(s,{characterData:!0}),n=function(){s.data=i=!i}),x=function(e){k.head||n(),k.add(e)}}t.exports=x},{\"../internals/engine-is-ios\":253,\"../internals/engine-is-ios-pebble\":252,\"../internals/engine-is-node\":254,\"../internals/engine-is-webos-webkit\":255,\"../internals/function-bind-context\":262,\"../internals/global\":274,\"../internals/object-get-own-property-descriptor\":309,\"../internals/queue\":328,\"../internals/task\":339}],303:[function(e,t,r){\"use strict\";var n=e(\"../internals/a-callable\"),i=TypeError,s=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new i(\"Bad Promise constructor\");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};t.exports.f=function(e){return new s(e)}},{\"../internals/a-callable\":222}],304:[function(e,t,r){\"use strict\";var n=e(\"../internals/is-regexp\"),i=TypeError;t.exports=function(e){if(n(e))throw new i(\"The method doesn't accept regular expressions\");return e}},{\"../internals/is-regexp\":291}],305:[function(e,t,r){\"use strict\";var n=e(\"../internals/descriptors\"),i=e(\"../internals/function-uncurry-this\"),s=e(\"../internals/function-call\"),o=e(\"../internals/fails\"),a=e(\"../internals/object-keys\"),l=e(\"../internals/object-get-own-property-symbols\"),c=e(\"../internals/object-property-is-enumerable\"),u=e(\"../internals/to-object\"),h=e(\"../internals/indexed-object\"),f=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!f||o((function(){if(n&&1!==f({b:1},f(d({},\"a\",{enumerable:!0,get:function(){d(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(\"assign detection\");return e[r]=7,\"abcdefghijklmnopqrst\".split(\"\").forEach((function(e){t[e]=e})),7!==f({},e)[r]||\"abcdefghijklmnopqrst\"!==a(f({},t)).join(\"\")}))?function(e,t){for(var r=u(e),i=arguments.length,o=1,f=l.f,d=c.f;i>o;)for(var m,b=h(arguments[o++]),g=f?p(a(b),f(b)):a(b),y=g.length,v=0;y>v;)m=g[v++],n&&!s(d,b,m)||(r[m]=b[m]);return r}:f},{\"../internals/descriptors\":247,\"../internals/fails\":260,\"../internals/function-call\":264,\"../internals/function-uncurry-this\":268,\"../internals/indexed-object\":280,\"../internals/object-get-own-property-symbols\":312,\"../internals/object-keys\":316,\"../internals/object-property-is-enumerable\":317,\"../internals/to-object\":344}],306:[function(e,t,r){\"use strict\";var n,i=e(\"../internals/an-object\"),s=e(\"../internals/object-define-properties\"),o=e(\"../internals/enum-bug-keys\"),a=e(\"../internals/hidden-keys\"),l=e(\"../internals/html\"),c=e(\"../internals/document-create-element\"),u=e(\"../internals/shared-key\"),h=u(\"IE_PROTO\"),f=function(){},d=function(e){return\"