@dfinity/nns 0.7.0 → 0.8.0-next-2022-09-23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/candid/genesis_token.d.ts +10 -8
- package/dist/candid/governance.certified.idl.js +107 -4
- package/dist/candid/governance.d.ts +99 -44
- package/dist/candid/governance.did +49 -3
- package/dist/candid/governance.idl.js +107 -4
- package/dist/candid/ledger.d.ts +15 -15
- package/dist/candid/sns_wasm.certified.idl.js +9 -5
- package/dist/candid/sns_wasm.d.ts +24 -21
- package/dist/candid/sns_wasm.did +6 -6
- package/dist/candid/sns_wasm.idl.js +9 -5
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/index.cjs.js.map +2 -2
- package/dist/esm/account_identifier.js +1 -1
- package/dist/esm/chunk-5S3NUDW3.js +2 -0
- package/dist/esm/chunk-5S3NUDW3.js.map +7 -0
- package/dist/esm/{chunk-SXX75EEC.js → chunk-I4ASNREM.js} +3 -3
- package/dist/esm/{chunk-SXX75EEC.js.map → chunk-I4ASNREM.js.map} +2 -2
- package/dist/esm/chunk-NA2JZFZA.js +2 -0
- package/dist/esm/chunk-NA2JZFZA.js.map +7 -0
- package/dist/esm/{chunk-EBY4MEUW.js → chunk-OQ6FZDUA.js} +5 -5
- package/dist/esm/{chunk-EBY4MEUW.js.map → chunk-OQ6FZDUA.js.map} +2 -2
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ledger.canister.js +1 -1
- package/dist/esm/sns_wasm.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +1 -2
- package/dist/types/types/governance_converters.d.ts +27 -0
- package/dist/types/utils/converter.utils.d.ts +0 -5
- package/package.json +3 -3
- package/dist/esm/chunk-LBNBEXHT.js +0 -2
- package/dist/esm/chunk-LBNBEXHT.js.map +0 -7
- package/dist/esm/chunk-LWTBV6PO.js +0 -2
- package/dist/esm/chunk-LWTBV6PO.js.map +0 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as a,h as b}from"./chunk-I4ASNREM.js";import"./chunk-XMMTS4WT.js";import"./chunk-Q3ETFEQV.js";export{a as AccountIdentifier,b as SubAccount};
|
|
2
2
|
//# sourceMappingURL=account_identifier.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as P}from"./chunk-H6Y4RZE2.js";import{createServices as W}from"@dfinity/utils";var T=({IDL:e})=>{let s=e.Record({access_controls_enabled:e.Bool,sns_subnet_ids:e.Vec(e.Principal)}),t=e.Record({wasm:e.Vec(e.Nat8),canister_type:e.Int32}),n=e.Record({hash:e.Vec(e.Nat8),wasm:e.Opt(t)}),o=e.Record({message:e.Text}),c=e.Variant({Error:o,Hash:e.Vec(e.Nat8)}),p=e.Record({result:e.Opt(c)}),_=e.Record({total_e8s:e.Nat64}),r=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Nat64,memo:e.Nat64,stake_e8s:e.Nat64}),d=e.Record({developer_neurons:e.Vec(r)}),l=e.Record({airdrop_neurons:e.Vec(r)}),u=e.Record({total_e8s:e.Nat64,initial_swap_amount_e8s:e.Nat64}),m=e.Record({treasury_distribution:e.Opt(_),developer_distribution:e.Opt(d),airdrop_distribution:e.Opt(l),swap_distribution:e.Opt(u)}),R=e.Variant({FractionalDeveloperVotingPower:m}),O=e.Record({url:e.Opt(e.Text),fallback_controller_principal_ids:e.Vec(e.Text),token_symbol:e.Opt(e.Text),neuron_minimum_stake_e8s:e.Opt(e.Nat64),logo:e.Opt(e.Text),name:e.Opt(e.Text),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),description:e.Opt(e.Text),transaction_fee_e8s:e.Opt(e.Nat64),sns_initialization_parameters:e.Opt(e.Text),initial_token_distribution:e.Opt(R),token_name:e.Opt(e.Text),proposal_reject_cost_e8s:e.Opt(e.Nat64)}),N=e.Record({sns_init_payload:e.Opt(O)}),y=e.Record({root:e.Opt(e.Principal),swap:e.Opt(e.Principal),ledger:e.Opt(e.Principal),governance:e.Opt(e.Principal)}),S=e.Record({subnet_id:e.Opt(e.Principal),error:e.Opt(o),canisters:e.Opt(y)}),i=e.Record({archive_wasm_hash:e.Vec(e.Nat8),root_wasm_hash:e.Vec(e.Nat8),swap_wasm_hash:e.Vec(e.Nat8),ledger_wasm_hash:e.Vec(e.Nat8),governance_wasm_hash:e.Vec(e.Nat8)}),v=e.Record({current_version:e.Opt(i)}),V=e.Record({next_version:e.Opt(i)}),w=e.Record({hash:e.Vec(e.Nat8)}),b=e.Record({wasm:e.Opt(t)}),x=e.Record({root_canister_id:e.Opt(e.Principal)}),h=e.Record({instances:e.Vec(x)});return e.Service({add_wasm:e.Func([n],[p],[]),deploy_new_sns:e.Func([N],[S],[]),get_latest_sns_version_pretty:e.Func([e.Null],[e.Vec(e.Tuple(e.Text,e.Text))],[]),get_next_sns_version:e.Func([v],[V],[]),get_wasm:e.Func([w],[b],[]),list_deployed_snses:e.Func([e.Record({})],[h],[])})};var g=({IDL:e})=>{let s=e.Record({access_controls_enabled:e.Bool,sns_subnet_ids:e.Vec(e.Principal)}),t=e.Record({wasm:e.Vec(e.Nat8),canister_type:e.Int32}),n=e.Record({hash:e.Vec(e.Nat8),wasm:e.Opt(t)}),o=e.Record({message:e.Text}),c=e.Variant({Error:o,Hash:e.Vec(e.Nat8)}),p=e.Record({result:e.Opt(c)}),_=e.Record({total_e8s:e.Nat64}),r=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Nat64,memo:e.Nat64,stake_e8s:e.Nat64}),d=e.Record({developer_neurons:e.Vec(r)}),l=e.Record({airdrop_neurons:e.Vec(r)}),u=e.Record({total_e8s:e.Nat64,initial_swap_amount_e8s:e.Nat64}),m=e.Record({treasury_distribution:e.Opt(_),developer_distribution:e.Opt(d),airdrop_distribution:e.Opt(l),swap_distribution:e.Opt(u)}),R=e.Variant({FractionalDeveloperVotingPower:m}),O=e.Record({url:e.Opt(e.Text),fallback_controller_principal_ids:e.Vec(e.Text),token_symbol:e.Opt(e.Text),neuron_minimum_stake_e8s:e.Opt(e.Nat64),logo:e.Opt(e.Text),name:e.Opt(e.Text),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),description:e.Opt(e.Text),transaction_fee_e8s:e.Opt(e.Nat64),sns_initialization_parameters:e.Opt(e.Text),initial_token_distribution:e.Opt(R),token_name:e.Opt(e.Text),proposal_reject_cost_e8s:e.Opt(e.Nat64)}),N=e.Record({sns_init_payload:e.Opt(O)}),y=e.Record({root:e.Opt(e.Principal),swap:e.Opt(e.Principal),ledger:e.Opt(e.Principal),governance:e.Opt(e.Principal)}),S=e.Record({subnet_id:e.Opt(e.Principal),error:e.Opt(o),canisters:e.Opt(y)}),i=e.Record({archive_wasm_hash:e.Vec(e.Nat8),root_wasm_hash:e.Vec(e.Nat8),swap_wasm_hash:e.Vec(e.Nat8),ledger_wasm_hash:e.Vec(e.Nat8),governance_wasm_hash:e.Vec(e.Nat8)}),v=e.Record({current_version:e.Opt(i)}),V=e.Record({next_version:e.Opt(i)}),w=e.Record({hash:e.Vec(e.Nat8)}),b=e.Record({wasm:e.Opt(t)}),x=e.Record({root_canister_id:e.Opt(e.Principal)}),h=e.Record({instances:e.Vec(x)});return e.Service({add_wasm:e.Func([n],[p],[]),deploy_new_sns:e.Func([N],[S],[]),get_latest_sns_version_pretty:e.Func([e.Null],[e.Vec(e.Tuple(e.Text,e.Text))],["query"]),get_next_sns_version:e.Func([v],[V],["query"]),get_wasm:e.Func([w],[b],["query"]),list_deployed_snses:e.Func([e.Record({})],[h],["query"])})};var a=class{constructor(s,t){this.service=s;this.certifiedService=t}static create(s={}){let{service:t,certifiedService:n}=W({options:{...s,canisterId:s.canisterId??P},idlFactory:g,certifiedIdlFactory:T});return new a(t,n)}listSnses=async({certified:s=!0})=>{let t=s?this.certifiedService:this.service,{instances:n}=await t.list_deployed_snses({});return n}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-5S3NUDW3.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/sns_wasm.canister.ts", "../../candid/sns_wasm.certified.idl.js", "../../candid/sns_wasm.idl.js"],
|
|
4
|
+
"sourcesContent": ["import { createServices, type CanisterOptions } from \"@dfinity/utils\";\nimport type {\n DeployedSns,\n _SERVICE as SnsWasmService,\n} from \"../candid/sns_wasm\";\nimport { idlFactory as certifiedIdlFactory } from \"../candid/sns_wasm.certified.idl\";\nimport { idlFactory } from \"../candid/sns_wasm.idl\";\nimport { MAINNET_SNS_WASM_CANISTER_ID } from \"./constants/canister_ids\";\n\nexport class SnsWasmCanister {\n private constructor(\n private readonly service: SnsWasmService,\n private readonly certifiedService: SnsWasmService\n ) {}\n\n public static create(options: CanisterOptions<SnsWasmService> = {}) {\n const { service, certifiedService } = createServices<SnsWasmService>({\n options: {\n ...options,\n canisterId: options.canisterId ?? MAINNET_SNS_WASM_CANISTER_ID,\n },\n idlFactory,\n certifiedIdlFactory,\n });\n\n return new SnsWasmCanister(service, certifiedService);\n }\n\n public listSnses = async ({\n certified = true,\n }: {\n certified?: boolean;\n }): Promise<DeployedSns[]> => {\n const service = certified ? this.certifiedService : this.service;\n\n const { instances } = await service.list_deployed_snses({});\n return instances;\n };\n}\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/sns_wasm.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsWasmCanisterInitPayload = IDL.Record({\n 'access_controls_enabled' : IDL.Bool,\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n const SnsWasm = IDL.Record({\n 'wasm' : IDL.Vec(IDL.Nat8),\n 'canister_type' : IDL.Int32,\n });\n const AddWasmRequest = IDL.Record({\n 'hash' : IDL.Vec(IDL.Nat8),\n 'wasm' : IDL.Opt(SnsWasm),\n });\n const SnsWasmError = IDL.Record({ 'message' : IDL.Text });\n const Result = IDL.Variant({\n 'Error' : SnsWasmError,\n 'Hash' : IDL.Vec(IDL.Nat8),\n });\n const AddWasmResponse = IDL.Record({ 'result' : IDL.Opt(Result) });\n const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });\n const NeuronDistribution = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'dissolve_delay_seconds' : IDL.Nat64,\n 'memo' : IDL.Nat64,\n 'stake_e8s' : IDL.Nat64,\n });\n const DeveloperDistribution = IDL.Record({\n 'developer_neurons' : IDL.Vec(NeuronDistribution),\n });\n const AirdropDistribution = IDL.Record({\n 'airdrop_neurons' : IDL.Vec(NeuronDistribution),\n });\n const SwapDistribution = IDL.Record({\n 'total_e8s' : IDL.Nat64,\n 'initial_swap_amount_e8s' : IDL.Nat64,\n });\n const FractionalDeveloperVotingPower = IDL.Record({\n 'treasury_distribution' : IDL.Opt(TreasuryDistribution),\n 'developer_distribution' : IDL.Opt(DeveloperDistribution),\n 'airdrop_distribution' : IDL.Opt(AirdropDistribution),\n 'swap_distribution' : IDL.Opt(SwapDistribution),\n });\n const InitialTokenDistribution = IDL.Variant({\n 'FractionalDeveloperVotingPower' : FractionalDeveloperVotingPower,\n });\n const SnsInitPayload = IDL.Record({\n 'url' : IDL.Opt(IDL.Text),\n 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),\n 'token_symbol' : IDL.Opt(IDL.Text),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'logo' : IDL.Opt(IDL.Text),\n 'name' : IDL.Opt(IDL.Text),\n 'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),\n 'description' : IDL.Opt(IDL.Text),\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_initialization_parameters' : IDL.Opt(IDL.Text),\n 'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),\n 'token_name' : IDL.Opt(IDL.Text),\n 'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),\n });\n const DeployNewSnsRequest = IDL.Record({\n 'sns_init_payload' : IDL.Opt(SnsInitPayload),\n });\n const SnsCanisterIds = IDL.Record({\n 'root' : IDL.Opt(IDL.Principal),\n 'swap' : IDL.Opt(IDL.Principal),\n 'ledger' : IDL.Opt(IDL.Principal),\n 'governance' : IDL.Opt(IDL.Principal),\n });\n const DeployNewSnsResponse = IDL.Record({\n 'subnet_id' : IDL.Opt(IDL.Principal),\n 'error' : IDL.Opt(SnsWasmError),\n 'canisters' : IDL.Opt(SnsCanisterIds),\n });\n const SnsVersion = IDL.Record({\n 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'root_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),\n });\n const GetNextSnsVersionRequest = IDL.Record({\n 'current_version' : IDL.Opt(SnsVersion),\n });\n const GetNextSnsVersionResponse = IDL.Record({\n 'next_version' : IDL.Opt(SnsVersion),\n });\n const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });\n const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });\n const DeployedSns = IDL.Record({\n 'root_canister_id' : IDL.Opt(IDL.Principal),\n });\n const ListDeployedSnsesResponse = IDL.Record({\n 'instances' : IDL.Vec(DeployedSns),\n });\n return IDL.Service({\n 'add_wasm' : IDL.Func([AddWasmRequest], [AddWasmResponse], []),\n 'deploy_new_sns' : IDL.Func(\n [DeployNewSnsRequest],\n [DeployNewSnsResponse],\n [],\n ),\n 'get_latest_sns_version_pretty' : IDL.Func(\n [IDL.Null],\n [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],\n [],\n ),\n 'get_next_sns_version' : IDL.Func(\n [GetNextSnsVersionRequest],\n [GetNextSnsVersionResponse],\n [],\n ),\n 'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], []),\n 'list_deployed_snses' : IDL.Func(\n [IDL.Record({})],\n [ListDeployedSnsesResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsWasmCanisterInitPayload = IDL.Record({\n 'access_controls_enabled' : IDL.Bool,\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n return [SnsWasmCanisterInitPayload];\n};\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/sns_wasm.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsWasmCanisterInitPayload = IDL.Record({\n 'access_controls_enabled' : IDL.Bool,\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n const SnsWasm = IDL.Record({\n 'wasm' : IDL.Vec(IDL.Nat8),\n 'canister_type' : IDL.Int32,\n });\n const AddWasmRequest = IDL.Record({\n 'hash' : IDL.Vec(IDL.Nat8),\n 'wasm' : IDL.Opt(SnsWasm),\n });\n const SnsWasmError = IDL.Record({ 'message' : IDL.Text });\n const Result = IDL.Variant({\n 'Error' : SnsWasmError,\n 'Hash' : IDL.Vec(IDL.Nat8),\n });\n const AddWasmResponse = IDL.Record({ 'result' : IDL.Opt(Result) });\n const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });\n const NeuronDistribution = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'dissolve_delay_seconds' : IDL.Nat64,\n 'memo' : IDL.Nat64,\n 'stake_e8s' : IDL.Nat64,\n });\n const DeveloperDistribution = IDL.Record({\n 'developer_neurons' : IDL.Vec(NeuronDistribution),\n });\n const AirdropDistribution = IDL.Record({\n 'airdrop_neurons' : IDL.Vec(NeuronDistribution),\n });\n const SwapDistribution = IDL.Record({\n 'total_e8s' : IDL.Nat64,\n 'initial_swap_amount_e8s' : IDL.Nat64,\n });\n const FractionalDeveloperVotingPower = IDL.Record({\n 'treasury_distribution' : IDL.Opt(TreasuryDistribution),\n 'developer_distribution' : IDL.Opt(DeveloperDistribution),\n 'airdrop_distribution' : IDL.Opt(AirdropDistribution),\n 'swap_distribution' : IDL.Opt(SwapDistribution),\n });\n const InitialTokenDistribution = IDL.Variant({\n 'FractionalDeveloperVotingPower' : FractionalDeveloperVotingPower,\n });\n const SnsInitPayload = IDL.Record({\n 'url' : IDL.Opt(IDL.Text),\n 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),\n 'token_symbol' : IDL.Opt(IDL.Text),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'logo' : IDL.Opt(IDL.Text),\n 'name' : IDL.Opt(IDL.Text),\n 'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),\n 'description' : IDL.Opt(IDL.Text),\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_initialization_parameters' : IDL.Opt(IDL.Text),\n 'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),\n 'token_name' : IDL.Opt(IDL.Text),\n 'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),\n });\n const DeployNewSnsRequest = IDL.Record({\n 'sns_init_payload' : IDL.Opt(SnsInitPayload),\n });\n const SnsCanisterIds = IDL.Record({\n 'root' : IDL.Opt(IDL.Principal),\n 'swap' : IDL.Opt(IDL.Principal),\n 'ledger' : IDL.Opt(IDL.Principal),\n 'governance' : IDL.Opt(IDL.Principal),\n });\n const DeployNewSnsResponse = IDL.Record({\n 'subnet_id' : IDL.Opt(IDL.Principal),\n 'error' : IDL.Opt(SnsWasmError),\n 'canisters' : IDL.Opt(SnsCanisterIds),\n });\n const SnsVersion = IDL.Record({\n 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'root_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),\n });\n const GetNextSnsVersionRequest = IDL.Record({\n 'current_version' : IDL.Opt(SnsVersion),\n });\n const GetNextSnsVersionResponse = IDL.Record({\n 'next_version' : IDL.Opt(SnsVersion),\n });\n const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });\n const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });\n const DeployedSns = IDL.Record({\n 'root_canister_id' : IDL.Opt(IDL.Principal),\n });\n const ListDeployedSnsesResponse = IDL.Record({\n 'instances' : IDL.Vec(DeployedSns),\n });\n return IDL.Service({\n 'add_wasm' : IDL.Func([AddWasmRequest], [AddWasmResponse], []),\n 'deploy_new_sns' : IDL.Func(\n [DeployNewSnsRequest],\n [DeployNewSnsResponse],\n [],\n ),\n 'get_latest_sns_version_pretty' : IDL.Func(\n [IDL.Null],\n [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],\n ['query'],\n ),\n 'get_next_sns_version' : IDL.Func(\n [GetNextSnsVersionRequest],\n [GetNextSnsVersionResponse],\n ['query'],\n ),\n 'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], ['query']),\n 'list_deployed_snses' : IDL.Func(\n [IDL.Record({})],\n [ListDeployedSnsesResponse],\n ['query'],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsWasmCanisterInitPayload = IDL.Record({\n 'access_controls_enabled' : IDL.Bool,\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n return [SnsWasmCanisterInitPayload];\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{c as dx}from"./chunk-XMMTS4WT.js";import{a as M,b as k,c as u0}from"./chunk-Q3ETFEQV.js";var s0=M((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=window:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(r){return typeof r=="object"&&r.buffer&&r.buffer.constructor===ArrayBuffer});var createOutputMethod=function(r,x){return function(e){return new Sha256(x,!0).update(e)[r]()}},createMethod=function(r){var x=createOutputMethod("hex",r);NODE_JS&&(x=nodeWrap(x,r)),x.create=function(){return new Sha256(r)},x.update=function(i){return x.create().update(i)};for(var e=0;e<OUTPUT_TYPES.length;++e){var t=OUTPUT_TYPES[e];x[t]=createOutputMethod(t,r)}return x},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(r){if(typeof r=="string")return crypto.createHash(algorithm).update(r,"utf8").digest("hex");if(r==null)throw new Error(ERROR);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(r)).digest("hex"):method(r)};return nodeMethod},createHmacOutputMethod=function(r,x){return function(e,t){return new HmacSha256(e,x,!0).update(t)[r]()}},createHmacMethod=function(r){var x=createHmacOutputMethod("hex",r);x.create=function(i){return new HmacSha256(i,r)},x.update=function(i,c){return x.create(i).update(c)};for(var e=0;e<OUTPUT_TYPES.length;++e){var t=OUTPUT_TYPES[e];x[t]=createHmacOutputMethod(t,r)}return x};function Sha256(r,x){x?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=r}Sha256.prototype.update=function(r){if(!this.finalized){var x,e=typeof r;if(e!=="string"){if(e==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);x=!0}for(var t,i=0,c,f=r.length,n=this.blocks;i<f;){if(this.hashed&&(this.hashed=!1,n[0]=this.block,n[16]=n[1]=n[2]=n[3]=n[4]=n[5]=n[6]=n[7]=n[8]=n[9]=n[10]=n[11]=n[12]=n[13]=n[14]=n[15]=0),x)for(c=this.start;i<f&&c<64;++i)n[c>>2]|=r[i]<<SHIFT[c++&3];else for(c=this.start;i<f&&c<64;++i)t=r.charCodeAt(i),t<128?n[c>>2]|=t<<SHIFT[c++&3]:t<2048?(n[c>>2]|=(192|t>>6)<<SHIFT[c++&3],n[c>>2]|=(128|t&63)<<SHIFT[c++&3]):t<55296||t>=57344?(n[c>>2]|=(224|t>>12)<<SHIFT[c++&3],n[c>>2]|=(128|t>>6&63)<<SHIFT[c++&3],n[c>>2]|=(128|t&63)<<SHIFT[c++&3]):(t=65536+((t&1023)<<10|r.charCodeAt(++i)&1023),n[c>>2]|=(240|t>>18)<<SHIFT[c++&3],n[c>>2]|=(128|t>>12&63)<<SHIFT[c++&3],n[c>>2]|=(128|t>>6&63)<<SHIFT[c++&3],n[c>>2]|=(128|t&63)<<SHIFT[c++&3]);this.lastByteIndex=c,this.bytes+=c-this.start,c>=64?(this.block=n[16],this.start=c-64,this.hash(),this.hashed=!0):this.start=c}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var r=this.blocks,x=this.lastByteIndex;r[16]=this.block,r[x>>2]|=EXTRA[x&3],this.block=r[16],x>=56&&(this.hashed||this.hash(),r[0]=this.block,r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),r[14]=this.hBytes<<3|this.bytes>>>29,r[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var r=this.h0,x=this.h1,e=this.h2,t=this.h3,i=this.h4,c=this.h5,f=this.h6,n=this.h7,o=this.blocks,d,h,b,l,u,w,E,T,W,Y,N;for(d=16;d<64;++d)u=o[d-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,u=o[d-2],b=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,o[d]=o[d-16]+h+o[d-7]+b<<0;for(N=x&e,d=0;d<64;d+=4)this.first?(this.is224?(T=300032,u=o[0]-1413257819,n=u-150054599<<0,t=u+24177077<<0):(T=704751109,u=o[0]-210244248,n=u-1521486534<<0,t=u+143694565<<0),this.first=!1):(h=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),b=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),T=r&x,l=T^r&e^N,E=i&c^~i&f,u=n+b+E+K[d]+o[d],w=h+l,n=t+u<<0,t=u+w<<0),h=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),b=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),W=t&r,l=W^t&x^T,E=n&i^~n&c,u=f+b+E+K[d+1]+o[d+1],w=h+l,f=e+u<<0,e=u+w<<0,h=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),b=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7),Y=e&t,l=Y^e&r^W,E=f&n^~f&i,u=c+b+E+K[d+2]+o[d+2],w=h+l,c=x+u<<0,x=u+w<<0,h=(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10),b=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),N=x&e,l=N^x&t^Y,E=c&f^~c&n,u=i+b+E+K[d+3]+o[d+3],w=h+l,i=r+u<<0,r=u+w<<0;this.h0=this.h0+r<<0,this.h1=this.h1+x<<0,this.h2=this.h2+e<<0,this.h3=this.h3+t<<0,this.h4=this.h4+i<<0,this.h5=this.h5+c<<0,this.h6=this.h6+f<<0,this.h7=this.h7+n<<0},Sha256.prototype.hex=function(){this.finalize();var r=this.h0,x=this.h1,e=this.h2,t=this.h3,i=this.h4,c=this.h5,f=this.h6,n=this.h7,o=HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[x>>28&15]+HEX_CHARS[x>>24&15]+HEX_CHARS[x>>20&15]+HEX_CHARS[x>>16&15]+HEX_CHARS[x>>12&15]+HEX_CHARS[x>>8&15]+HEX_CHARS[x>>4&15]+HEX_CHARS[x&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[c>>28&15]+HEX_CHARS[c>>24&15]+HEX_CHARS[c>>20&15]+HEX_CHARS[c>>16&15]+HEX_CHARS[c>>12&15]+HEX_CHARS[c>>8&15]+HEX_CHARS[c>>4&15]+HEX_CHARS[c&15]+HEX_CHARS[f>>28&15]+HEX_CHARS[f>>24&15]+HEX_CHARS[f>>20&15]+HEX_CHARS[f>>16&15]+HEX_CHARS[f>>12&15]+HEX_CHARS[f>>8&15]+HEX_CHARS[f>>4&15]+HEX_CHARS[f&15];return this.is224||(o+=HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]),o},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var r=this.h0,x=this.h1,e=this.h2,t=this.h3,i=this.h4,c=this.h5,f=this.h6,n=this.h7,o=[r>>24&255,r>>16&255,r>>8&255,r&255,x>>24&255,x>>16&255,x>>8&255,x&255,e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,i>>24&255,i>>16&255,i>>8&255,i&255,c>>24&255,c>>16&255,c>>8&255,c&255,f>>24&255,f>>16&255,f>>8&255,f&255];return this.is224||o.push(n>>24&255,n>>16&255,n>>8&255,n&255),o},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var r=new ArrayBuffer(this.is224?28:32),x=new DataView(r);return x.setUint32(0,this.h0),x.setUint32(4,this.h1),x.setUint32(8,this.h2),x.setUint32(12,this.h3),x.setUint32(16,this.h4),x.setUint32(20,this.h5),x.setUint32(24,this.h6),this.is224||x.setUint32(28,this.h7),r};function HmacSha256(r,x,e){var t,i=typeof r;if(i==="string"){var c=[],f=r.length,n=0,o;for(t=0;t<f;++t)o=r.charCodeAt(t),o<128?c[n++]=o:o<2048?(c[n++]=192|o>>6,c[n++]=128|o&63):o<55296||o>=57344?(c[n++]=224|o>>12,c[n++]=128|o>>6&63,c[n++]=128|o&63):(o=65536+((o&1023)<<10|r.charCodeAt(++t)&1023),c[n++]=240|o>>18,c[n++]=128|o>>12&63,c[n++]=128|o>>6&63,c[n++]=128|o&63);r=c}else if(i==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);r.length>64&&(r=new Sha256(x,!0).update(r).array());var d=[],h=[];for(t=0;t<64;++t){var b=r[t]||0;d[t]=92^b,h[t]=54^b}Sha256.call(this,x,e),this.update(h),this.oKeyPad=d,this.inner=!0,this.sharedMemory=e}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var r=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(r),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var y0=M(D=>{"use strict";D.byteLength=hx;D.toByteArray=sx;D.fromByteArray=yx;var m=[],A=[],bx=typeof Uint8Array<"u"?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(g=0,p0=j.length;g<p0;++g)m[g]=j[g],A[j.charCodeAt(g)]=g;var g,p0;A["-".charCodeAt(0)]=62;A["_".charCodeAt(0)]=63;function l0(r){var x=r.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");e===-1&&(e=x);var t=e===x?0:4-e%4;return[e,t]}function hx(r){var x=l0(r),e=x[0],t=x[1];return(e+t)*3/4-t}function ux(r,x,e){return(x+e)*3/4-e}function sx(r){var x,e=l0(r),t=e[0],i=e[1],c=new bx(ux(r,t,i)),f=0,n=i>0?t-4:t,o;for(o=0;o<n;o+=4)x=A[r.charCodeAt(o)]<<18|A[r.charCodeAt(o+1)]<<12|A[r.charCodeAt(o+2)]<<6|A[r.charCodeAt(o+3)],c[f++]=x>>16&255,c[f++]=x>>8&255,c[f++]=x&255;return i===2&&(x=A[r.charCodeAt(o)]<<2|A[r.charCodeAt(o+1)]>>4,c[f++]=x&255),i===1&&(x=A[r.charCodeAt(o)]<<10|A[r.charCodeAt(o+1)]<<4|A[r.charCodeAt(o+2)]>>2,c[f++]=x>>8&255,c[f++]=x&255),c}function px(r){return m[r>>18&63]+m[r>>12&63]+m[r>>6&63]+m[r&63]}function lx(r,x,e){for(var t,i=[],c=x;c<e;c+=3)t=(r[c]<<16&16711680)+(r[c+1]<<8&65280)+(r[c+2]&255),i.push(px(t));return i.join("")}function yx(r){for(var x,e=r.length,t=e%3,i=[],c=16383,f=0,n=e-t;f<n;f+=c)i.push(lx(r,f,f+c>n?n:f+c));return t===1?(x=r[e-1],i.push(m[x>>2]+m[x<<4&63]+"==")):t===2&&(x=(r[e-2]<<8)+r[e-1],i.push(m[x>>10]+m[x>>4&63]+m[x<<2&63]+"=")),i.join("")}});var w0=M(J=>{J.read=function(r,x,e,t,i){var c,f,n=i*8-t-1,o=(1<<n)-1,d=o>>1,h=-7,b=e?i-1:0,l=e?-1:1,u=r[x+b];for(b+=l,c=u&(1<<-h)-1,u>>=-h,h+=n;h>0;c=c*256+r[x+b],b+=l,h-=8);for(f=c&(1<<-h)-1,c>>=-h,h+=t;h>0;f=f*256+r[x+b],b+=l,h-=8);if(c===0)c=1-d;else{if(c===o)return f?NaN:(u?-1:1)*(1/0);f=f+Math.pow(2,t),c=c-d}return(u?-1:1)*f*Math.pow(2,c-t)};J.write=function(r,x,e,t,i,c){var f,n,o,d=c*8-i-1,h=(1<<d)-1,b=h>>1,l=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=t?0:c-1,w=t?1:-1,E=x<0||x===0&&1/x<0?1:0;for(x=Math.abs(x),isNaN(x)||x===1/0?(n=isNaN(x)?1:0,f=h):(f=Math.floor(Math.log(x)/Math.LN2),x*(o=Math.pow(2,-f))<1&&(f--,o*=2),f+b>=1?x+=l/o:x+=l*Math.pow(2,1-b),x*o>=2&&(f++,o/=2),f+b>=h?(n=0,f=h):f+b>=1?(n=(x*o-1)*Math.pow(2,i),f=f+b):(n=x*Math.pow(2,b-1)*Math.pow(2,i),f=0));i>=8;r[e+u]=n&255,u+=w,n/=256,i-=8);for(f=f<<i|n,d+=i;d>0;r[e+u]=f&255,u+=w,f/=256,d-=8);r[e+u-w]|=E*128}});var e0=M(_=>{"use strict";var V=y0(),H=w0(),A0=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;_.Buffer=a;_.SlowBuffer=Bx;_.INSPECT_MAX_BYTES=50;var L=2147483647;_.kMaxLength=L;a.TYPED_ARRAY_SUPPORT=wx();!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function wx(){try{let r=new Uint8Array(1),x={foo:function(){return 42}};return Object.setPrototypeOf(x,Uint8Array.prototype),Object.setPrototypeOf(r,x),r.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function B(r){if(r>L)throw new RangeError('The value "'+r+'" is invalid for option "size"');let x=new Uint8Array(r);return Object.setPrototypeOf(x,a.prototype),x}function a(r,x,e){if(typeof r=="number"){if(typeof x=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(r)}return B0(r,x,e)}a.poolSize=8192;function B0(r,x,e){if(typeof r=="string")return Ex(r,x);if(ArrayBuffer.isView(r))return mx(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(F(r,ArrayBuffer)||r&&F(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(F(r,SharedArrayBuffer)||r&&F(r.buffer,SharedArrayBuffer)))return q(r,x,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let t=r.valueOf&&r.valueOf();if(t!=null&&t!==r)return a.from(t,x,e);let i=Fx(r);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return a.from(r[Symbol.toPrimitive]("string"),x,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}a.from=function(r,x,e){return B0(r,x,e)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function I0(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function Ax(r,x,e){return I0(r),r<=0?B(r):x!==void 0?typeof e=="string"?B(r).fill(x,e):B(r).fill(x):B(r)}a.alloc=function(r,x,e){return Ax(r,x,e)};function Z(r){return I0(r),B(r<0?0:Q(r)|0)}a.allocUnsafe=function(r){return Z(r)};a.allocUnsafeSlow=function(r){return Z(r)};function Ex(r,x){if((typeof x!="string"||x==="")&&(x="utf8"),!a.isEncoding(x))throw new TypeError("Unknown encoding: "+x);let e=g0(r,x)|0,t=B(e),i=t.write(r,x);return i!==e&&(t=t.slice(0,i)),t}function z(r){let x=r.length<0?0:Q(r.length)|0,e=B(x);for(let t=0;t<x;t+=1)e[t]=r[t]&255;return e}function mx(r){if(F(r,Uint8Array)){let x=new Uint8Array(r);return q(x.buffer,x.byteOffset,x.byteLength)}return z(r)}function q(r,x,e){if(x<0||r.byteLength<x)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<x+(e||0))throw new RangeError('"length" is outside of buffer bounds');let t;return x===void 0&&e===void 0?t=new Uint8Array(r):e===void 0?t=new Uint8Array(r,x):t=new Uint8Array(r,x,e),Object.setPrototypeOf(t,a.prototype),t}function Fx(r){if(a.isBuffer(r)){let x=Q(r.length)|0,e=B(x);return e.length===0||r.copy(e,0,0,x),e}if(r.length!==void 0)return typeof r.length!="number"||x0(r.length)?B(0):z(r);if(r.type==="Buffer"&&Array.isArray(r.data))return z(r.data)}function Q(r){if(r>=L)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+L.toString(16)+" bytes");return r|0}function Bx(r){return+r!=r&&(r=0),a.alloc(+r)}a.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==a.prototype};a.compare=function(x,e){if(F(x,Uint8Array)&&(x=a.from(x,x.offset,x.byteLength)),F(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(x)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===e)return 0;let t=x.length,i=e.length;for(let c=0,f=Math.min(t,i);c<f;++c)if(x[c]!==e[c]){t=x[c],i=e[c];break}return t<i?-1:i<t?1:0};a.isEncoding=function(x){switch(String(x).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(x,e){if(!Array.isArray(x))throw new TypeError('"list" argument must be an Array of Buffers');if(x.length===0)return a.alloc(0);let t;if(e===void 0)for(e=0,t=0;t<x.length;++t)e+=x[t].length;let i=a.allocUnsafe(e),c=0;for(t=0;t<x.length;++t){let f=x[t];if(F(f,Uint8Array))c+f.length>i.length?(a.isBuffer(f)||(f=a.from(f)),f.copy(i,c)):Uint8Array.prototype.set.call(i,f,c);else if(a.isBuffer(f))f.copy(i,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=f.length}return i};function g0(r,x){if(a.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||F(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let e=r.length,t=arguments.length>2&&arguments[2]===!0;if(!t&&e===0)return 0;let i=!1;for(;;)switch(x){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return G(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return O0(r).length;default:if(i)return t?-1:G(r).length;x=(""+x).toLowerCase(),i=!0}}a.byteLength=g0;function Ix(r,x,e){let t=!1;if((x===void 0||x<0)&&(x=0),x>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,x>>>=0,e<=x))return"";for(r||(r="utf8");;)switch(r){case"hex":return Ox(this,x,e);case"utf8":case"utf-8":return R0(this,x,e);case"ascii":return Tx(this,x,e);case"latin1":case"binary":return Xx(this,x,e);case"base64":return _x(this,x,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nx(this,x,e);default:if(t)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),t=!0}}a.prototype._isBuffer=!0;function S(r,x,e){let t=r[x];r[x]=r[e],r[e]=t}a.prototype.swap16=function(){let x=this.length;if(x%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<x;e+=2)S(this,e,e+1);return this};a.prototype.swap32=function(){let x=this.length;if(x%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<x;e+=4)S(this,e,e+3),S(this,e+1,e+2);return this};a.prototype.swap64=function(){let x=this.length;if(x%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<x;e+=8)S(this,e,e+7),S(this,e+1,e+6),S(this,e+2,e+5),S(this,e+3,e+4);return this};a.prototype.toString=function(){let x=this.length;return x===0?"":arguments.length===0?R0(this,0,x):Ix.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(x){if(!a.isBuffer(x))throw new TypeError("Argument must be a Buffer");return this===x?!0:a.compare(this,x)===0};a.prototype.inspect=function(){let x="",e=_.INSPECT_MAX_BYTES;return x=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(x+=" ... "),"<Buffer "+x+">"};A0&&(a.prototype[A0]=a.prototype.inspect);a.prototype.compare=function(x,e,t,i,c){if(F(x,Uint8Array)&&(x=a.from(x,x.offset,x.byteLength)),!a.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(e===void 0&&(e=0),t===void 0&&(t=x?x.length:0),i===void 0&&(i=0),c===void 0&&(c=this.length),e<0||t>x.length||i<0||c>this.length)throw new RangeError("out of range index");if(i>=c&&e>=t)return 0;if(i>=c)return-1;if(e>=t)return 1;if(e>>>=0,t>>>=0,i>>>=0,c>>>=0,this===x)return 0;let f=c-i,n=t-e,o=Math.min(f,n),d=this.slice(i,c),h=x.slice(e,t);for(let b=0;b<o;++b)if(d[b]!==h[b]){f=d[b],n=h[b];break}return f<n?-1:n<f?1:0};function S0(r,x,e,t,i){if(r.length===0)return-1;if(typeof e=="string"?(t=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,x0(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof x=="string"&&(x=a.from(x,t)),a.isBuffer(x))return x.length===0?-1:E0(r,x,e,t,i);if(typeof x=="number")return x=x&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,x,e):Uint8Array.prototype.lastIndexOf.call(r,x,e):E0(r,[x],e,t,i);throw new TypeError("val must be string, number or Buffer")}function E0(r,x,e,t,i){let c=1,f=r.length,n=x.length;if(t!==void 0&&(t=String(t).toLowerCase(),t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le")){if(r.length<2||x.length<2)return-1;c=2,f/=2,n/=2,e/=2}function o(h,b){return c===1?h[b]:h.readUInt16BE(b*c)}let d;if(i){let h=-1;for(d=e;d<f;d++)if(o(r,d)===o(x,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===n)return h*c}else h!==-1&&(d-=d-h),h=-1}else for(e+n>f&&(e=f-n),d=e;d>=0;d--){let h=!0;for(let b=0;b<n;b++)if(o(r,d+b)!==o(x,b)){h=!1;break}if(h)return d}return-1}a.prototype.includes=function(x,e,t){return this.indexOf(x,e,t)!==-1};a.prototype.indexOf=function(x,e,t){return S0(this,x,e,t,!0)};a.prototype.lastIndexOf=function(x,e,t){return S0(this,x,e,t,!1)};function gx(r,x,e,t){e=Number(e)||0;let i=r.length-e;t?(t=Number(t),t>i&&(t=i)):t=i;let c=x.length;t>c/2&&(t=c/2);let f;for(f=0;f<t;++f){let n=parseInt(x.substr(f*2,2),16);if(x0(n))return f;r[e+f]=n}return f}function Sx(r,x,e,t){return P(G(x,r.length-e),r,e,t)}function Rx(r,x,e,t){return P(Lx(x),r,e,t)}function Hx(r,x,e,t){return P(O0(x),r,e,t)}function Ux(r,x,e,t){return P(Px(x,r.length-e),r,e,t)}a.prototype.write=function(x,e,t,i){if(e===void 0)i="utf8",t=this.length,e=0;else if(t===void 0&&typeof e=="string")i=e,t=this.length,e=0;else if(isFinite(e))e=e>>>0,isFinite(t)?(t=t>>>0,i===void 0&&(i="utf8")):(i=t,t=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((t===void 0||t>c)&&(t=c),x.length>0&&(t<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let f=!1;for(;;)switch(i){case"hex":return gx(this,x,e,t);case"utf8":case"utf-8":return Sx(this,x,e,t);case"ascii":case"latin1":case"binary":return Rx(this,x,e,t);case"base64":return Hx(this,x,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ux(this,x,e,t);default:if(f)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _x(r,x,e){return x===0&&e===r.length?V.fromByteArray(r):V.fromByteArray(r.slice(x,e))}function R0(r,x,e){e=Math.min(r.length,e);let t=[],i=x;for(;i<e;){let c=r[i],f=null,n=c>239?4:c>223?3:c>191?2:1;if(i+n<=e){let o,d,h,b;switch(n){case 1:c<128&&(f=c);break;case 2:o=r[i+1],(o&192)===128&&(b=(c&31)<<6|o&63,b>127&&(f=b));break;case 3:o=r[i+1],d=r[i+2],(o&192)===128&&(d&192)===128&&(b=(c&15)<<12|(o&63)<<6|d&63,b>2047&&(b<55296||b>57343)&&(f=b));break;case 4:o=r[i+1],d=r[i+2],h=r[i+3],(o&192)===128&&(d&192)===128&&(h&192)===128&&(b=(c&15)<<18|(o&63)<<12|(d&63)<<6|h&63,b>65535&&b<1114112&&(f=b))}}f===null?(f=65533,n=1):f>65535&&(f-=65536,t.push(f>>>10&1023|55296),f=56320|f&1023),t.push(f),i+=n}return Cx(t)}var m0=4096;function Cx(r){let x=r.length;if(x<=m0)return String.fromCharCode.apply(String,r);let e="",t=0;for(;t<x;)e+=String.fromCharCode.apply(String,r.slice(t,t+=m0));return e}function Tx(r,x,e){let t="";e=Math.min(r.length,e);for(let i=x;i<e;++i)t+=String.fromCharCode(r[i]&127);return t}function Xx(r,x,e){let t="";e=Math.min(r.length,e);for(let i=x;i<e;++i)t+=String.fromCharCode(r[i]);return t}function Ox(r,x,e){let t=r.length;(!x||x<0)&&(x=0),(!e||e<0||e>t)&&(e=t);let i="";for(let c=x;c<e;++c)i+=$x[r[c]];return i}function Nx(r,x,e){let t=r.slice(x,e),i="";for(let c=0;c<t.length-1;c+=2)i+=String.fromCharCode(t[c]+t[c+1]*256);return i}a.prototype.slice=function(x,e){let t=this.length;x=~~x,e=e===void 0?t:~~e,x<0?(x+=t,x<0&&(x=0)):x>t&&(x=t),e<0?(e+=t,e<0&&(e=0)):e>t&&(e=t),e<x&&(e=x);let i=this.subarray(x,e);return Object.setPrototypeOf(i,a.prototype),i};function p(r,x,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+x>e)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(x,e,t){x=x>>>0,e=e>>>0,t||p(x,e,this.length);let i=this[x],c=1,f=0;for(;++f<e&&(c*=256);)i+=this[x+f]*c;return i};a.prototype.readUintBE=a.prototype.readUIntBE=function(x,e,t){x=x>>>0,e=e>>>0,t||p(x,e,this.length);let i=this[x+--e],c=1;for(;e>0&&(c*=256);)i+=this[x+--e]*c;return i};a.prototype.readUint8=a.prototype.readUInt8=function(x,e){return x=x>>>0,e||p(x,1,this.length),this[x]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(x,e){return x=x>>>0,e||p(x,2,this.length),this[x]|this[x+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(x,e){return x=x>>>0,e||p(x,2,this.length),this[x]<<8|this[x+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(x,e){return x=x>>>0,e||p(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+this[x+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(x,e){return x=x>>>0,e||p(x,4,this.length),this[x]*16777216+(this[x+1]<<16|this[x+2]<<8|this[x+3])};a.prototype.readBigUInt64LE=I(function(x){x=x>>>0,U(x,"offset");let e=this[x],t=this[x+7];(e===void 0||t===void 0)&&X(x,this.length-8);let i=e+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24,c=this[++x]+this[++x]*2**8+this[++x]*2**16+t*2**24;return BigInt(i)+(BigInt(c)<<BigInt(32))});a.prototype.readBigUInt64BE=I(function(x){x=x>>>0,U(x,"offset");let e=this[x],t=this[x+7];(e===void 0||t===void 0)&&X(x,this.length-8);let i=e*2**24+this[++x]*2**16+this[++x]*2**8+this[++x],c=this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+t;return(BigInt(i)<<BigInt(32))+BigInt(c)});a.prototype.readIntLE=function(x,e,t){x=x>>>0,e=e>>>0,t||p(x,e,this.length);let i=this[x],c=1,f=0;for(;++f<e&&(c*=256);)i+=this[x+f]*c;return c*=128,i>=c&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(x,e,t){x=x>>>0,e=e>>>0,t||p(x,e,this.length);let i=e,c=1,f=this[x+--i];for(;i>0&&(c*=256);)f+=this[x+--i]*c;return c*=128,f>=c&&(f-=Math.pow(2,8*e)),f};a.prototype.readInt8=function(x,e){return x=x>>>0,e||p(x,1,this.length),this[x]&128?(255-this[x]+1)*-1:this[x]};a.prototype.readInt16LE=function(x,e){x=x>>>0,e||p(x,2,this.length);let t=this[x]|this[x+1]<<8;return t&32768?t|4294901760:t};a.prototype.readInt16BE=function(x,e){x=x>>>0,e||p(x,2,this.length);let t=this[x+1]|this[x]<<8;return t&32768?t|4294901760:t};a.prototype.readInt32LE=function(x,e){return x=x>>>0,e||p(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24};a.prototype.readInt32BE=function(x,e){return x=x>>>0,e||p(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]};a.prototype.readBigInt64LE=I(function(x){x=x>>>0,U(x,"offset");let e=this[x],t=this[x+7];(e===void 0||t===void 0)&&X(x,this.length-8);let i=this[x+4]+this[x+5]*2**8+this[x+6]*2**16+(t<<24);return(BigInt(i)<<BigInt(32))+BigInt(e+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24)});a.prototype.readBigInt64BE=I(function(x){x=x>>>0,U(x,"offset");let e=this[x],t=this[x+7];(e===void 0||t===void 0)&&X(x,this.length-8);let i=(e<<24)+this[++x]*2**16+this[++x]*2**8+this[++x];return(BigInt(i)<<BigInt(32))+BigInt(this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+t)});a.prototype.readFloatLE=function(x,e){return x=x>>>0,e||p(x,4,this.length),H.read(this,x,!0,23,4)};a.prototype.readFloatBE=function(x,e){return x=x>>>0,e||p(x,4,this.length),H.read(this,x,!1,23,4)};a.prototype.readDoubleLE=function(x,e){return x=x>>>0,e||p(x,8,this.length),H.read(this,x,!0,52,8)};a.prototype.readDoubleBE=function(x,e){return x=x>>>0,e||p(x,8,this.length),H.read(this,x,!1,52,8)};function y(r,x,e,t,i,c){if(!a.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(x>i||x<c)throw new RangeError('"value" argument is out of bounds');if(e+t>r.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(x,e,t,i){if(x=+x,e=e>>>0,t=t>>>0,!i){let n=Math.pow(2,8*t)-1;y(this,x,e,t,n,0)}let c=1,f=0;for(this[e]=x&255;++f<t&&(c*=256);)this[e+f]=x/c&255;return e+t};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(x,e,t,i){if(x=+x,e=e>>>0,t=t>>>0,!i){let n=Math.pow(2,8*t)-1;y(this,x,e,t,n,0)}let c=t-1,f=1;for(this[e+c]=x&255;--c>=0&&(f*=256);)this[e+c]=x/f&255;return e+t};a.prototype.writeUint8=a.prototype.writeUInt8=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,1,255,0),this[e]=x&255,e+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,2,65535,0),this[e]=x&255,this[e+1]=x>>>8,e+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,2,65535,0),this[e]=x>>>8,this[e+1]=x&255,e+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,4,4294967295,0),this[e+3]=x>>>24,this[e+2]=x>>>16,this[e+1]=x>>>8,this[e]=x&255,e+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,4,4294967295,0),this[e]=x>>>24,this[e+1]=x>>>16,this[e+2]=x>>>8,this[e+3]=x&255,e+4};function H0(r,x,e,t,i){X0(x,t,i,r,e,7);let c=Number(x&BigInt(4294967295));r[e++]=c,c=c>>8,r[e++]=c,c=c>>8,r[e++]=c,c=c>>8,r[e++]=c;let f=Number(x>>BigInt(32)&BigInt(4294967295));return r[e++]=f,f=f>>8,r[e++]=f,f=f>>8,r[e++]=f,f=f>>8,r[e++]=f,e}function U0(r,x,e,t,i){X0(x,t,i,r,e,7);let c=Number(x&BigInt(4294967295));r[e+7]=c,c=c>>8,r[e+6]=c,c=c>>8,r[e+5]=c,c=c>>8,r[e+4]=c;let f=Number(x>>BigInt(32)&BigInt(4294967295));return r[e+3]=f,f=f>>8,r[e+2]=f,f=f>>8,r[e+1]=f,f=f>>8,r[e]=f,e+8}a.prototype.writeBigUInt64LE=I(function(x,e=0){return H0(this,x,e,BigInt(0),BigInt("0xffffffffffffffff"))});a.prototype.writeBigUInt64BE=I(function(x,e=0){return U0(this,x,e,BigInt(0),BigInt("0xffffffffffffffff"))});a.prototype.writeIntLE=function(x,e,t,i){if(x=+x,e=e>>>0,!i){let o=Math.pow(2,8*t-1);y(this,x,e,t,o-1,-o)}let c=0,f=1,n=0;for(this[e]=x&255;++c<t&&(f*=256);)x<0&&n===0&&this[e+c-1]!==0&&(n=1),this[e+c]=(x/f>>0)-n&255;return e+t};a.prototype.writeIntBE=function(x,e,t,i){if(x=+x,e=e>>>0,!i){let o=Math.pow(2,8*t-1);y(this,x,e,t,o-1,-o)}let c=t-1,f=1,n=0;for(this[e+c]=x&255;--c>=0&&(f*=256);)x<0&&n===0&&this[e+c+1]!==0&&(n=1),this[e+c]=(x/f>>0)-n&255;return e+t};a.prototype.writeInt8=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,1,127,-128),x<0&&(x=255+x+1),this[e]=x&255,e+1};a.prototype.writeInt16LE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,2,32767,-32768),this[e]=x&255,this[e+1]=x>>>8,e+2};a.prototype.writeInt16BE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,2,32767,-32768),this[e]=x>>>8,this[e+1]=x&255,e+2};a.prototype.writeInt32LE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,4,2147483647,-2147483648),this[e]=x&255,this[e+1]=x>>>8,this[e+2]=x>>>16,this[e+3]=x>>>24,e+4};a.prototype.writeInt32BE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[e]=x>>>24,this[e+1]=x>>>16,this[e+2]=x>>>8,this[e+3]=x&255,e+4};a.prototype.writeBigInt64LE=I(function(x,e=0){return H0(this,x,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});a.prototype.writeBigInt64BE=I(function(x,e=0){return U0(this,x,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _0(r,x,e,t,i,c){if(e+t>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function C0(r,x,e,t,i){return x=+x,e=e>>>0,i||_0(r,x,e,4,34028234663852886e22,-34028234663852886e22),H.write(r,x,e,t,23,4),e+4}a.prototype.writeFloatLE=function(x,e,t){return C0(this,x,e,!0,t)};a.prototype.writeFloatBE=function(x,e,t){return C0(this,x,e,!1,t)};function T0(r,x,e,t,i){return x=+x,e=e>>>0,i||_0(r,x,e,8,17976931348623157e292,-17976931348623157e292),H.write(r,x,e,t,52,8),e+8}a.prototype.writeDoubleLE=function(x,e,t){return T0(this,x,e,!0,t)};a.prototype.writeDoubleBE=function(x,e,t){return T0(this,x,e,!1,t)};a.prototype.copy=function(x,e,t,i){if(!a.isBuffer(x))throw new TypeError("argument should be a Buffer");if(t||(t=0),!i&&i!==0&&(i=this.length),e>=x.length&&(e=x.length),e||(e=0),i>0&&i<t&&(i=t),i===t||x.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),x.length-e<i-t&&(i=x.length-e+t);let c=i-t;return this===x&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(e,t,i):Uint8Array.prototype.set.call(x,this.subarray(t,i),e),c};a.prototype.fill=function(x,e,t,i){if(typeof x=="string"){if(typeof e=="string"?(i=e,e=0,t=this.length):typeof t=="string"&&(i=t,t=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(x.length===1){let f=x.charCodeAt(0);(i==="utf8"&&f<128||i==="latin1")&&(x=f)}}else typeof x=="number"?x=x&255:typeof x=="boolean"&&(x=Number(x));if(e<0||this.length<e||this.length<t)throw new RangeError("Out of range index");if(t<=e)return this;e=e>>>0,t=t===void 0?this.length:t>>>0,x||(x=0);let c;if(typeof x=="number")for(c=e;c<t;++c)this[c]=x;else{let f=a.isBuffer(x)?x:a.from(x,i),n=f.length;if(n===0)throw new TypeError('The value "'+x+'" is invalid for argument "value"');for(c=0;c<t-e;++c)this[c+e]=f[c%n]}return this};var R={};function v(r,x,e){R[r]=class extends e{constructor(){super(),Object.defineProperty(this,"message",{value:x.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}v("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);v("ERR_INVALID_ARG_TYPE",function(r,x){return`The "${r}" argument must be of type number. Received type ${typeof x}`},TypeError);v("ERR_OUT_OF_RANGE",function(r,x,e){let t=`The value of "${r}" is out of range.`,i=e;return Number.isInteger(e)&&Math.abs(e)>2**32?i=F0(String(e)):typeof e=="bigint"&&(i=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(i=F0(i)),i+="n"),t+=` It must be ${x}. Received ${i}`,t},RangeError);function F0(r){let x="",e=r.length,t=r[0]==="-"?1:0;for(;e>=t+4;e-=3)x=`_${r.slice(e-3,e)}${x}`;return`${r.slice(0,e)}${x}`}function Mx(r,x,e){U(x,"offset"),(r[x]===void 0||r[x+e]===void 0)&&X(x,r.length-(e+1))}function X0(r,x,e,t,i,c){if(r>e||r<x){let f=typeof x=="bigint"?"n":"",n;throw c>3?x===0||x===BigInt(0)?n=`>= 0${f} and < 2${f} ** ${(c+1)*8}${f}`:n=`>= -(2${f} ** ${(c+1)*8-1}${f}) and < 2 ** ${(c+1)*8-1}${f}`:n=`>= ${x}${f} and <= ${e}${f}`,new R.ERR_OUT_OF_RANGE("value",n,r)}Mx(t,i,c)}function U(r,x){if(typeof r!="number")throw new R.ERR_INVALID_ARG_TYPE(x,"number",r)}function X(r,x,e){throw Math.floor(r)!==r?(U(r,e),new R.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):x<0?new R.ERR_BUFFER_OUT_OF_BOUNDS:new R.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${x}`,r)}var kx=/[^+/0-9A-Za-z-_]/g;function Dx(r){if(r=r.split("=")[0],r=r.trim().replace(kx,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function G(r,x){x=x||1/0;let e,t=r.length,i=null,c=[];for(let f=0;f<t;++f){if(e=r.charCodeAt(f),e>55295&&e<57344){if(!i){if(e>56319){(x-=3)>-1&&c.push(239,191,189);continue}else if(f+1===t){(x-=3)>-1&&c.push(239,191,189);continue}i=e;continue}if(e<56320){(x-=3)>-1&&c.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(x-=3)>-1&&c.push(239,191,189);if(i=null,e<128){if((x-=1)<0)break;c.push(e)}else if(e<2048){if((x-=2)<0)break;c.push(e>>6|192,e&63|128)}else if(e<65536){if((x-=3)<0)break;c.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((x-=4)<0)break;c.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return c}function Lx(r){let x=[];for(let e=0;e<r.length;++e)x.push(r.charCodeAt(e)&255);return x}function Px(r,x){let e,t,i,c=[];for(let f=0;f<r.length&&!((x-=2)<0);++f)e=r.charCodeAt(f),t=e>>8,i=e%256,c.push(i),c.push(t);return c}function O0(r){return V.toByteArray(Dx(r))}function P(r,x,e,t){let i;for(i=0;i<t&&!(i+e>=x.length||i>=r.length);++i)x[i+e]=r[i];return i}function F(r,x){return r instanceof x||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===x.name}function x0(r){return r!==r}var $x=function(){let r="0123456789abcdef",x=new Array(256);for(let e=0;e<16;++e){let t=e*16;for(let i=0;i<16;++i)x[t+i]=r[e]+r[i]}return x}();function I(r){return typeof BigInt>"u"?Wx:r}function Wx(){throw new Error("BigInt not supported")}});var ax=k(s0()),ox=k(dx());var h0=k(e0());var Yx=(r,x=0)=>{let e=~~x,t=0;for(let i=0;i<r.length;i++)t+=r[i];return e+=t%256,e%256},N0=Yx;var M0=k(e0(),1),jx=(r,x)=>M0.Buffer.from(r,x),r0=jx;function s(r,x){let e=(t,i)=>x(r0(t),i)>>>0;return e.signed=(t,i)=>x(r0(t),i),e.unsigned=e,e.model=r,e}var k0=s("crc1",N0);var t0=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];typeof Int32Array<"u"&&(t0=new Int32Array(t0));var Jx=(r,x=0)=>{let e=~~x;for(let t=0;t<r.length;t++)e=t0[(e^r[t])&255]&255;return e},D0=Jx;var L0=s("crc-8",D0);var i0=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];typeof Int32Array<"u"&&(i0=new Int32Array(i0));var Vx=(r,x=0)=>{let e=~~x;for(let t=0;t<r.length;t++)e=i0[(e^r[t])&255]&255;return e},P0=Vx;var $0=s("dallas-1-wire",P0);var c0=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(c0=new Int32Array(c0));var zx=(r,x=0)=>{let e=~~x;for(let t=0;t<r.length;t++)e=(c0[(e^r[t])&255]^e>>8)&65535;return e},W0=zx;var Y0=s("crc-16",W0);var f0=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];typeof Int32Array<"u"&&(f0=new Int32Array(f0));var Kx=(r,x)=>{let e=typeof x<"u"?~~x:65535;for(let t=0;t<r.length;t++)e=(f0[(e>>8^r[t])&255]^e<<8)&65535;return e},j0=Kx;var J0=s("ccitt",j0);var n0=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(n0=new Int32Array(n0));var qx=(r,x)=>{let e=typeof x<"u"?~~x:65535;for(let t=0;t<r.length;t++)e=(n0[(e^r[t])&255]^e>>8)&65535;return e},V0=qx;var z0=s("crc-16-modbus",V0);var Gx=(r,x)=>{let e=typeof x<"u"?~~x:0;for(let t=0;t<r.length;t++){let i=e>>>8&255;i^=r[t]&255,i^=i>>>4,e=e<<8&65535,e^=i,i=i<<5&65535,e^=i,i=i<<7&65535,e^=i}return e},K0=Gx;var q0=s("xmodem",K0);var a0=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];typeof Int32Array<"u"&&(a0=new Int32Array(a0));var Zx=(r,x)=>{let e=typeof x<"u"?~~x:0;for(let t=0;t<r.length;t++)e=(a0[(e^r[t])&255]^e>>8)&65535;return e},G0=Zx;var Z0=s("kermit",G0);var o0=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];typeof Int32Array<"u"&&(o0=new Int32Array(o0));var Qx=(r,x)=>{let e=typeof x<"u"?~~x:11994318;for(let t=0;t<r.length;t++)e=(o0[(e>>16^r[t])&255]^e<<8)&16777215;return e},Q0=Qx;var v0=s("crc-24",Q0);var d0=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(d0=new Int32Array(d0));var vx=(r,x)=>{let e=x===0?0:~~x^-1;for(let t=0;t<r.length;t++)e=d0[(e^r[t])&255]^e>>>8;return e^-1},xx=vx;var ex=s("crc-32",xx);var b0=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(b0=new Int32Array(b0));var xe=(r,x=-1)=>{let e=x===0?0:~~x;for(let t=0;t<r.length;t++)e=b0[(e^r[t])&255]^e>>>8;return e},rx=xe;var tx=s("jam",rx);var ix={crc1:k0,crc8:L0,crc81wire:$0,crc16:Y0,crc16ccitt:J0,crc16modbus:z0,crc16xmodem:q0,crc16kermit:Z0,crc24:v0,crc32:ex,crcjam:tx};var br=r=>{let x=new DataView(r.buffer,r.byteOffset,r.byteLength);if(typeof x.getBigUint64=="function")return x.getBigUint64(0);{let e=BigInt(x.getUint32(0)),t=BigInt(x.getUint32(4));return(e<<BigInt(32))+t}},hr=r=>{let x=new Uint8Array(r);return Array.from(x)},ur=r=>new Uint8Array(r);var cx=r=>Array.from(r).map(x=>x.charCodeAt(0)),fx=r=>r.reduce((x,e)=>x+e.toString(16).padStart(2,"0"),""),nx=r=>{let x=new ArrayBuffer(4);return new DataView(x).setUint32(0,ix.crc32(h0.Buffer.from(r)),!1),h0.Buffer.from(x)};var O=class{constructor(x){this.bytes=x}static fromHex(x){return new O(Uint8Array.from(Buffer.from(x,"hex")))}static fromPrincipal({principal:x,subAccount:e=$.ZERO}){let t=cx(`
|
|
2
|
-
account-id`),i=
|
|
1
|
+
import{c as ox}from"./chunk-XMMTS4WT.js";import{a as k,b as N,c as u0}from"./chunk-Q3ETFEQV.js";var s0=k((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=window:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(r){return typeof r=="object"&&r.buffer&&r.buffer.constructor===ArrayBuffer});var createOutputMethod=function(r,x){return function(e){return new Sha256(x,!0).update(e)[r]()}},createMethod=function(r){var x=createOutputMethod("hex",r);NODE_JS&&(x=nodeWrap(x,r)),x.create=function(){return new Sha256(r)},x.update=function(i){return x.create().update(i)};for(var e=0;e<OUTPUT_TYPES.length;++e){var t=OUTPUT_TYPES[e];x[t]=createOutputMethod(t,r)}return x},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(r){if(typeof r=="string")return crypto.createHash(algorithm).update(r,"utf8").digest("hex");if(r==null)throw new Error(ERROR);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(r)).digest("hex"):method(r)};return nodeMethod},createHmacOutputMethod=function(r,x){return function(e,t){return new HmacSha256(e,x,!0).update(t)[r]()}},createHmacMethod=function(r){var x=createHmacOutputMethod("hex",r);x.create=function(i){return new HmacSha256(i,r)},x.update=function(i,c){return x.create(i).update(c)};for(var e=0;e<OUTPUT_TYPES.length;++e){var t=OUTPUT_TYPES[e];x[t]=createHmacOutputMethod(t,r)}return x};function Sha256(r,x){x?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=r}Sha256.prototype.update=function(r){if(!this.finalized){var x,e=typeof r;if(e!=="string"){if(e==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);x=!0}for(var t,i=0,c,f=r.length,n=this.blocks;i<f;){if(this.hashed&&(this.hashed=!1,n[0]=this.block,n[16]=n[1]=n[2]=n[3]=n[4]=n[5]=n[6]=n[7]=n[8]=n[9]=n[10]=n[11]=n[12]=n[13]=n[14]=n[15]=0),x)for(c=this.start;i<f&&c<64;++i)n[c>>2]|=r[i]<<SHIFT[c++&3];else for(c=this.start;i<f&&c<64;++i)t=r.charCodeAt(i),t<128?n[c>>2]|=t<<SHIFT[c++&3]:t<2048?(n[c>>2]|=(192|t>>6)<<SHIFT[c++&3],n[c>>2]|=(128|t&63)<<SHIFT[c++&3]):t<55296||t>=57344?(n[c>>2]|=(224|t>>12)<<SHIFT[c++&3],n[c>>2]|=(128|t>>6&63)<<SHIFT[c++&3],n[c>>2]|=(128|t&63)<<SHIFT[c++&3]):(t=65536+((t&1023)<<10|r.charCodeAt(++i)&1023),n[c>>2]|=(240|t>>18)<<SHIFT[c++&3],n[c>>2]|=(128|t>>12&63)<<SHIFT[c++&3],n[c>>2]|=(128|t>>6&63)<<SHIFT[c++&3],n[c>>2]|=(128|t&63)<<SHIFT[c++&3]);this.lastByteIndex=c,this.bytes+=c-this.start,c>=64?(this.block=n[16],this.start=c-64,this.hash(),this.hashed=!0):this.start=c}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var r=this.blocks,x=this.lastByteIndex;r[16]=this.block,r[x>>2]|=EXTRA[x&3],this.block=r[16],x>=56&&(this.hashed||this.hash(),r[0]=this.block,r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),r[14]=this.hBytes<<3|this.bytes>>>29,r[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var r=this.h0,x=this.h1,e=this.h2,t=this.h3,i=this.h4,c=this.h5,f=this.h6,n=this.h7,o=this.blocks,d,h,b,l,u,w,A,T,W,Y,M;for(d=16;d<64;++d)u=o[d-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,u=o[d-2],b=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,o[d]=o[d-16]+h+o[d-7]+b<<0;for(M=x&e,d=0;d<64;d+=4)this.first?(this.is224?(T=300032,u=o[0]-1413257819,n=u-150054599<<0,t=u+24177077<<0):(T=704751109,u=o[0]-210244248,n=u-1521486534<<0,t=u+143694565<<0),this.first=!1):(h=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),b=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),T=r&x,l=T^r&e^M,A=i&c^~i&f,u=n+b+A+K[d]+o[d],w=h+l,n=t+u<<0,t=u+w<<0),h=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),b=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),W=t&r,l=W^t&x^T,A=n&i^~n&c,u=f+b+A+K[d+1]+o[d+1],w=h+l,f=e+u<<0,e=u+w<<0,h=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),b=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7),Y=e&t,l=Y^e&r^W,A=f&n^~f&i,u=c+b+A+K[d+2]+o[d+2],w=h+l,c=x+u<<0,x=u+w<<0,h=(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10),b=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),M=x&e,l=M^x&t^Y,A=c&f^~c&n,u=i+b+A+K[d+3]+o[d+3],w=h+l,i=r+u<<0,r=u+w<<0;this.h0=this.h0+r<<0,this.h1=this.h1+x<<0,this.h2=this.h2+e<<0,this.h3=this.h3+t<<0,this.h4=this.h4+i<<0,this.h5=this.h5+c<<0,this.h6=this.h6+f<<0,this.h7=this.h7+n<<0},Sha256.prototype.hex=function(){this.finalize();var r=this.h0,x=this.h1,e=this.h2,t=this.h3,i=this.h4,c=this.h5,f=this.h6,n=this.h7,o=HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[x>>28&15]+HEX_CHARS[x>>24&15]+HEX_CHARS[x>>20&15]+HEX_CHARS[x>>16&15]+HEX_CHARS[x>>12&15]+HEX_CHARS[x>>8&15]+HEX_CHARS[x>>4&15]+HEX_CHARS[x&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[c>>28&15]+HEX_CHARS[c>>24&15]+HEX_CHARS[c>>20&15]+HEX_CHARS[c>>16&15]+HEX_CHARS[c>>12&15]+HEX_CHARS[c>>8&15]+HEX_CHARS[c>>4&15]+HEX_CHARS[c&15]+HEX_CHARS[f>>28&15]+HEX_CHARS[f>>24&15]+HEX_CHARS[f>>20&15]+HEX_CHARS[f>>16&15]+HEX_CHARS[f>>12&15]+HEX_CHARS[f>>8&15]+HEX_CHARS[f>>4&15]+HEX_CHARS[f&15];return this.is224||(o+=HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]),o},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var r=this.h0,x=this.h1,e=this.h2,t=this.h3,i=this.h4,c=this.h5,f=this.h6,n=this.h7,o=[r>>24&255,r>>16&255,r>>8&255,r&255,x>>24&255,x>>16&255,x>>8&255,x&255,e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,i>>24&255,i>>16&255,i>>8&255,i&255,c>>24&255,c>>16&255,c>>8&255,c&255,f>>24&255,f>>16&255,f>>8&255,f&255];return this.is224||o.push(n>>24&255,n>>16&255,n>>8&255,n&255),o},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var r=new ArrayBuffer(this.is224?28:32),x=new DataView(r);return x.setUint32(0,this.h0),x.setUint32(4,this.h1),x.setUint32(8,this.h2),x.setUint32(12,this.h3),x.setUint32(16,this.h4),x.setUint32(20,this.h5),x.setUint32(24,this.h6),this.is224||x.setUint32(28,this.h7),r};function HmacSha256(r,x,e){var t,i=typeof r;if(i==="string"){var c=[],f=r.length,n=0,o;for(t=0;t<f;++t)o=r.charCodeAt(t),o<128?c[n++]=o:o<2048?(c[n++]=192|o>>6,c[n++]=128|o&63):o<55296||o>=57344?(c[n++]=224|o>>12,c[n++]=128|o>>6&63,c[n++]=128|o&63):(o=65536+((o&1023)<<10|r.charCodeAt(++t)&1023),c[n++]=240|o>>18,c[n++]=128|o>>12&63,c[n++]=128|o>>6&63,c[n++]=128|o&63);r=c}else if(i==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);r.length>64&&(r=new Sha256(x,!0).update(r).array());var d=[],h=[];for(t=0;t<64;++t){var b=r[t]||0;d[t]=92^b,h[t]=54^b}Sha256.call(this,x,e),this.update(h),this.oKeyPad=d,this.inner=!0,this.sharedMemory=e}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var r=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(r),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var y0=k(D=>{"use strict";D.byteLength=bx;D.toByteArray=ux;D.fromByteArray=lx;var F=[],E=[],dx=typeof Uint8Array<"u"?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,p0=j.length;S<p0;++S)F[S]=j[S],E[j.charCodeAt(S)]=S;var S,p0;E["-".charCodeAt(0)]=62;E["_".charCodeAt(0)]=63;function l0(r){var x=r.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");e===-1&&(e=x);var t=e===x?0:4-e%4;return[e,t]}function bx(r){var x=l0(r),e=x[0],t=x[1];return(e+t)*3/4-t}function hx(r,x,e){return(x+e)*3/4-e}function ux(r){var x,e=l0(r),t=e[0],i=e[1],c=new dx(hx(r,t,i)),f=0,n=i>0?t-4:t,o;for(o=0;o<n;o+=4)x=E[r.charCodeAt(o)]<<18|E[r.charCodeAt(o+1)]<<12|E[r.charCodeAt(o+2)]<<6|E[r.charCodeAt(o+3)],c[f++]=x>>16&255,c[f++]=x>>8&255,c[f++]=x&255;return i===2&&(x=E[r.charCodeAt(o)]<<2|E[r.charCodeAt(o+1)]>>4,c[f++]=x&255),i===1&&(x=E[r.charCodeAt(o)]<<10|E[r.charCodeAt(o+1)]<<4|E[r.charCodeAt(o+2)]>>2,c[f++]=x>>8&255,c[f++]=x&255),c}function sx(r){return F[r>>18&63]+F[r>>12&63]+F[r>>6&63]+F[r&63]}function px(r,x,e){for(var t,i=[],c=x;c<e;c+=3)t=(r[c]<<16&16711680)+(r[c+1]<<8&65280)+(r[c+2]&255),i.push(sx(t));return i.join("")}function lx(r){for(var x,e=r.length,t=e%3,i=[],c=16383,f=0,n=e-t;f<n;f+=c)i.push(px(r,f,f+c>n?n:f+c));return t===1?(x=r[e-1],i.push(F[x>>2]+F[x<<4&63]+"==")):t===2&&(x=(r[e-2]<<8)+r[e-1],i.push(F[x>>10]+F[x>>4&63]+F[x<<2&63]+"=")),i.join("")}});var w0=k(J=>{J.read=function(r,x,e,t,i){var c,f,n=i*8-t-1,o=(1<<n)-1,d=o>>1,h=-7,b=e?i-1:0,l=e?-1:1,u=r[x+b];for(b+=l,c=u&(1<<-h)-1,u>>=-h,h+=n;h>0;c=c*256+r[x+b],b+=l,h-=8);for(f=c&(1<<-h)-1,c>>=-h,h+=t;h>0;f=f*256+r[x+b],b+=l,h-=8);if(c===0)c=1-d;else{if(c===o)return f?NaN:(u?-1:1)*(1/0);f=f+Math.pow(2,t),c=c-d}return(u?-1:1)*f*Math.pow(2,c-t)};J.write=function(r,x,e,t,i,c){var f,n,o,d=c*8-i-1,h=(1<<d)-1,b=h>>1,l=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=t?0:c-1,w=t?1:-1,A=x<0||x===0&&1/x<0?1:0;for(x=Math.abs(x),isNaN(x)||x===1/0?(n=isNaN(x)?1:0,f=h):(f=Math.floor(Math.log(x)/Math.LN2),x*(o=Math.pow(2,-f))<1&&(f--,o*=2),f+b>=1?x+=l/o:x+=l*Math.pow(2,1-b),x*o>=2&&(f++,o/=2),f+b>=h?(n=0,f=h):f+b>=1?(n=(x*o-1)*Math.pow(2,i),f=f+b):(n=x*Math.pow(2,b-1)*Math.pow(2,i),f=0));i>=8;r[e+u]=n&255,u+=w,n/=256,i-=8);for(f=f<<i|n,d+=i;d>0;r[e+u]=f&255,u+=w,f/=256,d-=8);r[e+u-w]|=A*128}});var e0=k(_=>{"use strict";var z=y0(),H=w0(),E0=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;_.Buffer=a;_.SlowBuffer=mx;_.INSPECT_MAX_BYTES=50;var P=2147483647;_.kMaxLength=P;a.TYPED_ARRAY_SUPPORT=yx();!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function yx(){try{let r=new Uint8Array(1),x={foo:function(){return 42}};return Object.setPrototypeOf(x,Uint8Array.prototype),Object.setPrototypeOf(r,x),r.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function B(r){if(r>P)throw new RangeError('The value "'+r+'" is invalid for option "size"');let x=new Uint8Array(r);return Object.setPrototypeOf(x,a.prototype),x}function a(r,x,e){if(typeof r=="number"){if(typeof x=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(r)}return B0(r,x,e)}a.poolSize=8192;function B0(r,x,e){if(typeof r=="string")return Ex(r,x);if(ArrayBuffer.isView(r))return Ax(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(m(r,ArrayBuffer)||r&&m(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(m(r,SharedArrayBuffer)||r&&m(r.buffer,SharedArrayBuffer)))return q(r,x,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let t=r.valueOf&&r.valueOf();if(t!=null&&t!==r)return a.from(t,x,e);let i=Fx(r);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return a.from(r[Symbol.toPrimitive]("string"),x,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}a.from=function(r,x,e){return B0(r,x,e)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function I0(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function wx(r,x,e){return I0(r),r<=0?B(r):x!==void 0?typeof e=="string"?B(r).fill(x,e):B(r).fill(x):B(r)}a.alloc=function(r,x,e){return wx(r,x,e)};function Z(r){return I0(r),B(r<0?0:Q(r)|0)}a.allocUnsafe=function(r){return Z(r)};a.allocUnsafeSlow=function(r){return Z(r)};function Ex(r,x){if((typeof x!="string"||x==="")&&(x="utf8"),!a.isEncoding(x))throw new TypeError("Unknown encoding: "+x);let e=S0(r,x)|0,t=B(e),i=t.write(r,x);return i!==e&&(t=t.slice(0,i)),t}function V(r){let x=r.length<0?0:Q(r.length)|0,e=B(x);for(let t=0;t<x;t+=1)e[t]=r[t]&255;return e}function Ax(r){if(m(r,Uint8Array)){let x=new Uint8Array(r);return q(x.buffer,x.byteOffset,x.byteLength)}return V(r)}function q(r,x,e){if(x<0||r.byteLength<x)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<x+(e||0))throw new RangeError('"length" is outside of buffer bounds');let t;return x===void 0&&e===void 0?t=new Uint8Array(r):e===void 0?t=new Uint8Array(r,x):t=new Uint8Array(r,x,e),Object.setPrototypeOf(t,a.prototype),t}function Fx(r){if(a.isBuffer(r)){let x=Q(r.length)|0,e=B(x);return e.length===0||r.copy(e,0,0,x),e}if(r.length!==void 0)return typeof r.length!="number"||x0(r.length)?B(0):V(r);if(r.type==="Buffer"&&Array.isArray(r.data))return V(r.data)}function Q(r){if(r>=P)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P.toString(16)+" bytes");return r|0}function mx(r){return+r!=r&&(r=0),a.alloc(+r)}a.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==a.prototype};a.compare=function(x,e){if(m(x,Uint8Array)&&(x=a.from(x,x.offset,x.byteLength)),m(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(x)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===e)return 0;let t=x.length,i=e.length;for(let c=0,f=Math.min(t,i);c<f;++c)if(x[c]!==e[c]){t=x[c],i=e[c];break}return t<i?-1:i<t?1:0};a.isEncoding=function(x){switch(String(x).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(x,e){if(!Array.isArray(x))throw new TypeError('"list" argument must be an Array of Buffers');if(x.length===0)return a.alloc(0);let t;if(e===void 0)for(e=0,t=0;t<x.length;++t)e+=x[t].length;let i=a.allocUnsafe(e),c=0;for(t=0;t<x.length;++t){let f=x[t];if(m(f,Uint8Array))c+f.length>i.length?(a.isBuffer(f)||(f=a.from(f)),f.copy(i,c)):Uint8Array.prototype.set.call(i,f,c);else if(a.isBuffer(f))f.copy(i,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=f.length}return i};function S0(r,x){if(a.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||m(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let e=r.length,t=arguments.length>2&&arguments[2]===!0;if(!t&&e===0)return 0;let i=!1;for(;;)switch(x){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return G(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return O0(r).length;default:if(i)return t?-1:G(r).length;x=(""+x).toLowerCase(),i=!0}}a.byteLength=S0;function Bx(r,x,e){let t=!1;if((x===void 0||x<0)&&(x=0),x>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,x>>>=0,e<=x))return"";for(r||(r="utf8");;)switch(r){case"hex":return Xx(this,x,e);case"utf8":case"utf-8":return g0(this,x,e);case"ascii":return Cx(this,x,e);case"latin1":case"binary":return Tx(this,x,e);case"base64":return Ux(this,x,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ox(this,x,e);default:if(t)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),t=!0}}a.prototype._isBuffer=!0;function R(r,x,e){let t=r[x];r[x]=r[e],r[e]=t}a.prototype.swap16=function(){let x=this.length;if(x%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<x;e+=2)R(this,e,e+1);return this};a.prototype.swap32=function(){let x=this.length;if(x%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<x;e+=4)R(this,e,e+3),R(this,e+1,e+2);return this};a.prototype.swap64=function(){let x=this.length;if(x%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<x;e+=8)R(this,e,e+7),R(this,e+1,e+6),R(this,e+2,e+5),R(this,e+3,e+4);return this};a.prototype.toString=function(){let x=this.length;return x===0?"":arguments.length===0?g0(this,0,x):Bx.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(x){if(!a.isBuffer(x))throw new TypeError("Argument must be a Buffer");return this===x?!0:a.compare(this,x)===0};a.prototype.inspect=function(){let x="",e=_.INSPECT_MAX_BYTES;return x=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(x+=" ... "),"<Buffer "+x+">"};E0&&(a.prototype[E0]=a.prototype.inspect);a.prototype.compare=function(x,e,t,i,c){if(m(x,Uint8Array)&&(x=a.from(x,x.offset,x.byteLength)),!a.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(e===void 0&&(e=0),t===void 0&&(t=x?x.length:0),i===void 0&&(i=0),c===void 0&&(c=this.length),e<0||t>x.length||i<0||c>this.length)throw new RangeError("out of range index");if(i>=c&&e>=t)return 0;if(i>=c)return-1;if(e>=t)return 1;if(e>>>=0,t>>>=0,i>>>=0,c>>>=0,this===x)return 0;let f=c-i,n=t-e,o=Math.min(f,n),d=this.slice(i,c),h=x.slice(e,t);for(let b=0;b<o;++b)if(d[b]!==h[b]){f=d[b],n=h[b];break}return f<n?-1:n<f?1:0};function R0(r,x,e,t,i){if(r.length===0)return-1;if(typeof e=="string"?(t=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,x0(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof x=="string"&&(x=a.from(x,t)),a.isBuffer(x))return x.length===0?-1:A0(r,x,e,t,i);if(typeof x=="number")return x=x&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,x,e):Uint8Array.prototype.lastIndexOf.call(r,x,e):A0(r,[x],e,t,i);throw new TypeError("val must be string, number or Buffer")}function A0(r,x,e,t,i){let c=1,f=r.length,n=x.length;if(t!==void 0&&(t=String(t).toLowerCase(),t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le")){if(r.length<2||x.length<2)return-1;c=2,f/=2,n/=2,e/=2}function o(h,b){return c===1?h[b]:h.readUInt16BE(b*c)}let d;if(i){let h=-1;for(d=e;d<f;d++)if(o(r,d)===o(x,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===n)return h*c}else h!==-1&&(d-=d-h),h=-1}else for(e+n>f&&(e=f-n),d=e;d>=0;d--){let h=!0;for(let b=0;b<n;b++)if(o(r,d+b)!==o(x,b)){h=!1;break}if(h)return d}return-1}a.prototype.includes=function(x,e,t){return this.indexOf(x,e,t)!==-1};a.prototype.indexOf=function(x,e,t){return R0(this,x,e,t,!0)};a.prototype.lastIndexOf=function(x,e,t){return R0(this,x,e,t,!1)};function Ix(r,x,e,t){e=Number(e)||0;let i=r.length-e;t?(t=Number(t),t>i&&(t=i)):t=i;let c=x.length;t>c/2&&(t=c/2);let f;for(f=0;f<t;++f){let n=parseInt(x.substr(f*2,2),16);if(x0(n))return f;r[e+f]=n}return f}function Sx(r,x,e,t){return L(G(x,r.length-e),r,e,t)}function Rx(r,x,e,t){return L(Dx(x),r,e,t)}function gx(r,x,e,t){return L(O0(x),r,e,t)}function Hx(r,x,e,t){return L(Px(x,r.length-e),r,e,t)}a.prototype.write=function(x,e,t,i){if(e===void 0)i="utf8",t=this.length,e=0;else if(t===void 0&&typeof e=="string")i=e,t=this.length,e=0;else if(isFinite(e))e=e>>>0,isFinite(t)?(t=t>>>0,i===void 0&&(i="utf8")):(i=t,t=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((t===void 0||t>c)&&(t=c),x.length>0&&(t<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let f=!1;for(;;)switch(i){case"hex":return Ix(this,x,e,t);case"utf8":case"utf-8":return Sx(this,x,e,t);case"ascii":case"latin1":case"binary":return Rx(this,x,e,t);case"base64":return gx(this,x,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Hx(this,x,e,t);default:if(f)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ux(r,x,e){return x===0&&e===r.length?z.fromByteArray(r):z.fromByteArray(r.slice(x,e))}function g0(r,x,e){e=Math.min(r.length,e);let t=[],i=x;for(;i<e;){let c=r[i],f=null,n=c>239?4:c>223?3:c>191?2:1;if(i+n<=e){let o,d,h,b;switch(n){case 1:c<128&&(f=c);break;case 2:o=r[i+1],(o&192)===128&&(b=(c&31)<<6|o&63,b>127&&(f=b));break;case 3:o=r[i+1],d=r[i+2],(o&192)===128&&(d&192)===128&&(b=(c&15)<<12|(o&63)<<6|d&63,b>2047&&(b<55296||b>57343)&&(f=b));break;case 4:o=r[i+1],d=r[i+2],h=r[i+3],(o&192)===128&&(d&192)===128&&(h&192)===128&&(b=(c&15)<<18|(o&63)<<12|(d&63)<<6|h&63,b>65535&&b<1114112&&(f=b))}}f===null?(f=65533,n=1):f>65535&&(f-=65536,t.push(f>>>10&1023|55296),f=56320|f&1023),t.push(f),i+=n}return _x(t)}var F0=4096;function _x(r){let x=r.length;if(x<=F0)return String.fromCharCode.apply(String,r);let e="",t=0;for(;t<x;)e+=String.fromCharCode.apply(String,r.slice(t,t+=F0));return e}function Cx(r,x,e){let t="";e=Math.min(r.length,e);for(let i=x;i<e;++i)t+=String.fromCharCode(r[i]&127);return t}function Tx(r,x,e){let t="";e=Math.min(r.length,e);for(let i=x;i<e;++i)t+=String.fromCharCode(r[i]);return t}function Xx(r,x,e){let t=r.length;(!x||x<0)&&(x=0),(!e||e<0||e>t)&&(e=t);let i="";for(let c=x;c<e;++c)i+=Lx[r[c]];return i}function Ox(r,x,e){let t=r.slice(x,e),i="";for(let c=0;c<t.length-1;c+=2)i+=String.fromCharCode(t[c]+t[c+1]*256);return i}a.prototype.slice=function(x,e){let t=this.length;x=~~x,e=e===void 0?t:~~e,x<0?(x+=t,x<0&&(x=0)):x>t&&(x=t),e<0?(e+=t,e<0&&(e=0)):e>t&&(e=t),e<x&&(e=x);let i=this.subarray(x,e);return Object.setPrototypeOf(i,a.prototype),i};function p(r,x,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+x>e)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(x,e,t){x=x>>>0,e=e>>>0,t||p(x,e,this.length);let i=this[x],c=1,f=0;for(;++f<e&&(c*=256);)i+=this[x+f]*c;return i};a.prototype.readUintBE=a.prototype.readUIntBE=function(x,e,t){x=x>>>0,e=e>>>0,t||p(x,e,this.length);let i=this[x+--e],c=1;for(;e>0&&(c*=256);)i+=this[x+--e]*c;return i};a.prototype.readUint8=a.prototype.readUInt8=function(x,e){return x=x>>>0,e||p(x,1,this.length),this[x]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(x,e){return x=x>>>0,e||p(x,2,this.length),this[x]|this[x+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(x,e){return x=x>>>0,e||p(x,2,this.length),this[x]<<8|this[x+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(x,e){return x=x>>>0,e||p(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+this[x+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(x,e){return x=x>>>0,e||p(x,4,this.length),this[x]*16777216+(this[x+1]<<16|this[x+2]<<8|this[x+3])};a.prototype.readBigUInt64LE=I(function(x){x=x>>>0,U(x,"offset");let e=this[x],t=this[x+7];(e===void 0||t===void 0)&&X(x,this.length-8);let i=e+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24,c=this[++x]+this[++x]*2**8+this[++x]*2**16+t*2**24;return BigInt(i)+(BigInt(c)<<BigInt(32))});a.prototype.readBigUInt64BE=I(function(x){x=x>>>0,U(x,"offset");let e=this[x],t=this[x+7];(e===void 0||t===void 0)&&X(x,this.length-8);let i=e*2**24+this[++x]*2**16+this[++x]*2**8+this[++x],c=this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+t;return(BigInt(i)<<BigInt(32))+BigInt(c)});a.prototype.readIntLE=function(x,e,t){x=x>>>0,e=e>>>0,t||p(x,e,this.length);let i=this[x],c=1,f=0;for(;++f<e&&(c*=256);)i+=this[x+f]*c;return c*=128,i>=c&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(x,e,t){x=x>>>0,e=e>>>0,t||p(x,e,this.length);let i=e,c=1,f=this[x+--i];for(;i>0&&(c*=256);)f+=this[x+--i]*c;return c*=128,f>=c&&(f-=Math.pow(2,8*e)),f};a.prototype.readInt8=function(x,e){return x=x>>>0,e||p(x,1,this.length),this[x]&128?(255-this[x]+1)*-1:this[x]};a.prototype.readInt16LE=function(x,e){x=x>>>0,e||p(x,2,this.length);let t=this[x]|this[x+1]<<8;return t&32768?t|4294901760:t};a.prototype.readInt16BE=function(x,e){x=x>>>0,e||p(x,2,this.length);let t=this[x+1]|this[x]<<8;return t&32768?t|4294901760:t};a.prototype.readInt32LE=function(x,e){return x=x>>>0,e||p(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24};a.prototype.readInt32BE=function(x,e){return x=x>>>0,e||p(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]};a.prototype.readBigInt64LE=I(function(x){x=x>>>0,U(x,"offset");let e=this[x],t=this[x+7];(e===void 0||t===void 0)&&X(x,this.length-8);let i=this[x+4]+this[x+5]*2**8+this[x+6]*2**16+(t<<24);return(BigInt(i)<<BigInt(32))+BigInt(e+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24)});a.prototype.readBigInt64BE=I(function(x){x=x>>>0,U(x,"offset");let e=this[x],t=this[x+7];(e===void 0||t===void 0)&&X(x,this.length-8);let i=(e<<24)+this[++x]*2**16+this[++x]*2**8+this[++x];return(BigInt(i)<<BigInt(32))+BigInt(this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+t)});a.prototype.readFloatLE=function(x,e){return x=x>>>0,e||p(x,4,this.length),H.read(this,x,!0,23,4)};a.prototype.readFloatBE=function(x,e){return x=x>>>0,e||p(x,4,this.length),H.read(this,x,!1,23,4)};a.prototype.readDoubleLE=function(x,e){return x=x>>>0,e||p(x,8,this.length),H.read(this,x,!0,52,8)};a.prototype.readDoubleBE=function(x,e){return x=x>>>0,e||p(x,8,this.length),H.read(this,x,!1,52,8)};function y(r,x,e,t,i,c){if(!a.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(x>i||x<c)throw new RangeError('"value" argument is out of bounds');if(e+t>r.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(x,e,t,i){if(x=+x,e=e>>>0,t=t>>>0,!i){let n=Math.pow(2,8*t)-1;y(this,x,e,t,n,0)}let c=1,f=0;for(this[e]=x&255;++f<t&&(c*=256);)this[e+f]=x/c&255;return e+t};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(x,e,t,i){if(x=+x,e=e>>>0,t=t>>>0,!i){let n=Math.pow(2,8*t)-1;y(this,x,e,t,n,0)}let c=t-1,f=1;for(this[e+c]=x&255;--c>=0&&(f*=256);)this[e+c]=x/f&255;return e+t};a.prototype.writeUint8=a.prototype.writeUInt8=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,1,255,0),this[e]=x&255,e+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,2,65535,0),this[e]=x&255,this[e+1]=x>>>8,e+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,2,65535,0),this[e]=x>>>8,this[e+1]=x&255,e+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,4,4294967295,0),this[e+3]=x>>>24,this[e+2]=x>>>16,this[e+1]=x>>>8,this[e]=x&255,e+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,4,4294967295,0),this[e]=x>>>24,this[e+1]=x>>>16,this[e+2]=x>>>8,this[e+3]=x&255,e+4};function H0(r,x,e,t,i){X0(x,t,i,r,e,7);let c=Number(x&BigInt(4294967295));r[e++]=c,c=c>>8,r[e++]=c,c=c>>8,r[e++]=c,c=c>>8,r[e++]=c;let f=Number(x>>BigInt(32)&BigInt(4294967295));return r[e++]=f,f=f>>8,r[e++]=f,f=f>>8,r[e++]=f,f=f>>8,r[e++]=f,e}function U0(r,x,e,t,i){X0(x,t,i,r,e,7);let c=Number(x&BigInt(4294967295));r[e+7]=c,c=c>>8,r[e+6]=c,c=c>>8,r[e+5]=c,c=c>>8,r[e+4]=c;let f=Number(x>>BigInt(32)&BigInt(4294967295));return r[e+3]=f,f=f>>8,r[e+2]=f,f=f>>8,r[e+1]=f,f=f>>8,r[e]=f,e+8}a.prototype.writeBigUInt64LE=I(function(x,e=0){return H0(this,x,e,BigInt(0),BigInt("0xffffffffffffffff"))});a.prototype.writeBigUInt64BE=I(function(x,e=0){return U0(this,x,e,BigInt(0),BigInt("0xffffffffffffffff"))});a.prototype.writeIntLE=function(x,e,t,i){if(x=+x,e=e>>>0,!i){let o=Math.pow(2,8*t-1);y(this,x,e,t,o-1,-o)}let c=0,f=1,n=0;for(this[e]=x&255;++c<t&&(f*=256);)x<0&&n===0&&this[e+c-1]!==0&&(n=1),this[e+c]=(x/f>>0)-n&255;return e+t};a.prototype.writeIntBE=function(x,e,t,i){if(x=+x,e=e>>>0,!i){let o=Math.pow(2,8*t-1);y(this,x,e,t,o-1,-o)}let c=t-1,f=1,n=0;for(this[e+c]=x&255;--c>=0&&(f*=256);)x<0&&n===0&&this[e+c+1]!==0&&(n=1),this[e+c]=(x/f>>0)-n&255;return e+t};a.prototype.writeInt8=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,1,127,-128),x<0&&(x=255+x+1),this[e]=x&255,e+1};a.prototype.writeInt16LE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,2,32767,-32768),this[e]=x&255,this[e+1]=x>>>8,e+2};a.prototype.writeInt16BE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,2,32767,-32768),this[e]=x>>>8,this[e+1]=x&255,e+2};a.prototype.writeInt32LE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,4,2147483647,-2147483648),this[e]=x&255,this[e+1]=x>>>8,this[e+2]=x>>>16,this[e+3]=x>>>24,e+4};a.prototype.writeInt32BE=function(x,e,t){return x=+x,e=e>>>0,t||y(this,x,e,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[e]=x>>>24,this[e+1]=x>>>16,this[e+2]=x>>>8,this[e+3]=x&255,e+4};a.prototype.writeBigInt64LE=I(function(x,e=0){return H0(this,x,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});a.prototype.writeBigInt64BE=I(function(x,e=0){return U0(this,x,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _0(r,x,e,t,i,c){if(e+t>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function C0(r,x,e,t,i){return x=+x,e=e>>>0,i||_0(r,x,e,4,34028234663852886e22,-34028234663852886e22),H.write(r,x,e,t,23,4),e+4}a.prototype.writeFloatLE=function(x,e,t){return C0(this,x,e,!0,t)};a.prototype.writeFloatBE=function(x,e,t){return C0(this,x,e,!1,t)};function T0(r,x,e,t,i){return x=+x,e=e>>>0,i||_0(r,x,e,8,17976931348623157e292,-17976931348623157e292),H.write(r,x,e,t,52,8),e+8}a.prototype.writeDoubleLE=function(x,e,t){return T0(this,x,e,!0,t)};a.prototype.writeDoubleBE=function(x,e,t){return T0(this,x,e,!1,t)};a.prototype.copy=function(x,e,t,i){if(!a.isBuffer(x))throw new TypeError("argument should be a Buffer");if(t||(t=0),!i&&i!==0&&(i=this.length),e>=x.length&&(e=x.length),e||(e=0),i>0&&i<t&&(i=t),i===t||x.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),x.length-e<i-t&&(i=x.length-e+t);let c=i-t;return this===x&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(e,t,i):Uint8Array.prototype.set.call(x,this.subarray(t,i),e),c};a.prototype.fill=function(x,e,t,i){if(typeof x=="string"){if(typeof e=="string"?(i=e,e=0,t=this.length):typeof t=="string"&&(i=t,t=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(x.length===1){let f=x.charCodeAt(0);(i==="utf8"&&f<128||i==="latin1")&&(x=f)}}else typeof x=="number"?x=x&255:typeof x=="boolean"&&(x=Number(x));if(e<0||this.length<e||this.length<t)throw new RangeError("Out of range index");if(t<=e)return this;e=e>>>0,t=t===void 0?this.length:t>>>0,x||(x=0);let c;if(typeof x=="number")for(c=e;c<t;++c)this[c]=x;else{let f=a.isBuffer(x)?x:a.from(x,i),n=f.length;if(n===0)throw new TypeError('The value "'+x+'" is invalid for argument "value"');for(c=0;c<t-e;++c)this[c+e]=f[c%n]}return this};var g={};function v(r,x,e){g[r]=class extends e{constructor(){super(),Object.defineProperty(this,"message",{value:x.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}v("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);v("ERR_INVALID_ARG_TYPE",function(r,x){return`The "${r}" argument must be of type number. Received type ${typeof x}`},TypeError);v("ERR_OUT_OF_RANGE",function(r,x,e){let t=`The value of "${r}" is out of range.`,i=e;return Number.isInteger(e)&&Math.abs(e)>2**32?i=m0(String(e)):typeof e=="bigint"&&(i=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(i=m0(i)),i+="n"),t+=` It must be ${x}. Received ${i}`,t},RangeError);function m0(r){let x="",e=r.length,t=r[0]==="-"?1:0;for(;e>=t+4;e-=3)x=`_${r.slice(e-3,e)}${x}`;return`${r.slice(0,e)}${x}`}function Mx(r,x,e){U(x,"offset"),(r[x]===void 0||r[x+e]===void 0)&&X(x,r.length-(e+1))}function X0(r,x,e,t,i,c){if(r>e||r<x){let f=typeof x=="bigint"?"n":"",n;throw c>3?x===0||x===BigInt(0)?n=`>= 0${f} and < 2${f} ** ${(c+1)*8}${f}`:n=`>= -(2${f} ** ${(c+1)*8-1}${f}) and < 2 ** ${(c+1)*8-1}${f}`:n=`>= ${x}${f} and <= ${e}${f}`,new g.ERR_OUT_OF_RANGE("value",n,r)}Mx(t,i,c)}function U(r,x){if(typeof r!="number")throw new g.ERR_INVALID_ARG_TYPE(x,"number",r)}function X(r,x,e){throw Math.floor(r)!==r?(U(r,e),new g.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):x<0?new g.ERR_BUFFER_OUT_OF_BOUNDS:new g.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${x}`,r)}var kx=/[^+/0-9A-Za-z-_]/g;function Nx(r){if(r=r.split("=")[0],r=r.trim().replace(kx,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function G(r,x){x=x||1/0;let e,t=r.length,i=null,c=[];for(let f=0;f<t;++f){if(e=r.charCodeAt(f),e>55295&&e<57344){if(!i){if(e>56319){(x-=3)>-1&&c.push(239,191,189);continue}else if(f+1===t){(x-=3)>-1&&c.push(239,191,189);continue}i=e;continue}if(e<56320){(x-=3)>-1&&c.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(x-=3)>-1&&c.push(239,191,189);if(i=null,e<128){if((x-=1)<0)break;c.push(e)}else if(e<2048){if((x-=2)<0)break;c.push(e>>6|192,e&63|128)}else if(e<65536){if((x-=3)<0)break;c.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((x-=4)<0)break;c.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return c}function Dx(r){let x=[];for(let e=0;e<r.length;++e)x.push(r.charCodeAt(e)&255);return x}function Px(r,x){let e,t,i,c=[];for(let f=0;f<r.length&&!((x-=2)<0);++f)e=r.charCodeAt(f),t=e>>8,i=e%256,c.push(i),c.push(t);return c}function O0(r){return z.toByteArray(Nx(r))}function L(r,x,e,t){let i;for(i=0;i<t&&!(i+e>=x.length||i>=r.length);++i)x[i+e]=r[i];return i}function m(r,x){return r instanceof x||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===x.name}function x0(r){return r!==r}var Lx=function(){let r="0123456789abcdef",x=new Array(256);for(let e=0;e<16;++e){let t=e*16;for(let i=0;i<16;++i)x[t+i]=r[e]+r[i]}return x}();function I(r){return typeof BigInt>"u"?$x:r}function $x(){throw new Error("BigInt not supported")}});var nx=N(s0()),ax=N(ox());import{asciiStringToByteArray as xe}from"@dfinity/utils";var h0=N(e0());var Wx=(r,x=0)=>{let e=~~x,t=0;for(let i=0;i<r.length;i++)t+=r[i];return e+=t%256,e%256},M0=Wx;var k0=N(e0(),1),Yx=(r,x)=>k0.Buffer.from(r,x),r0=Yx;function s(r,x){let e=(t,i)=>x(r0(t),i)>>>0;return e.signed=(t,i)=>x(r0(t),i),e.unsigned=e,e.model=r,e}var N0=s("crc1",M0);var t0=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];typeof Int32Array<"u"&&(t0=new Int32Array(t0));var jx=(r,x=0)=>{let e=~~x;for(let t=0;t<r.length;t++)e=t0[(e^r[t])&255]&255;return e},D0=jx;var P0=s("crc-8",D0);var i0=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];typeof Int32Array<"u"&&(i0=new Int32Array(i0));var Jx=(r,x=0)=>{let e=~~x;for(let t=0;t<r.length;t++)e=i0[(e^r[t])&255]&255;return e},L0=Jx;var $0=s("dallas-1-wire",L0);var c0=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(c0=new Int32Array(c0));var zx=(r,x=0)=>{let e=~~x;for(let t=0;t<r.length;t++)e=(c0[(e^r[t])&255]^e>>8)&65535;return e},W0=zx;var Y0=s("crc-16",W0);var f0=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];typeof Int32Array<"u"&&(f0=new Int32Array(f0));var Vx=(r,x)=>{let e=typeof x<"u"?~~x:65535;for(let t=0;t<r.length;t++)e=(f0[(e>>8^r[t])&255]^e<<8)&65535;return e},j0=Vx;var J0=s("ccitt",j0);var n0=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(n0=new Int32Array(n0));var Kx=(r,x)=>{let e=typeof x<"u"?~~x:65535;for(let t=0;t<r.length;t++)e=(n0[(e^r[t])&255]^e>>8)&65535;return e},z0=Kx;var V0=s("crc-16-modbus",z0);var qx=(r,x)=>{let e=typeof x<"u"?~~x:0;for(let t=0;t<r.length;t++){let i=e>>>8&255;i^=r[t]&255,i^=i>>>4,e=e<<8&65535,e^=i,i=i<<5&65535,e^=i,i=i<<7&65535,e^=i}return e},K0=qx;var q0=s("xmodem",K0);var a0=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];typeof Int32Array<"u"&&(a0=new Int32Array(a0));var Gx=(r,x)=>{let e=typeof x<"u"?~~x:0;for(let t=0;t<r.length;t++)e=(a0[(e^r[t])&255]^e>>8)&65535;return e},G0=Gx;var Z0=s("kermit",G0);var o0=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];typeof Int32Array<"u"&&(o0=new Int32Array(o0));var Zx=(r,x)=>{let e=typeof x<"u"?~~x:11994318;for(let t=0;t<r.length;t++)e=(o0[(e>>16^r[t])&255]^e<<8)&16777215;return e},Q0=Zx;var v0=s("crc-24",Q0);var d0=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(d0=new Int32Array(d0));var Qx=(r,x)=>{let e=x===0?0:~~x^-1;for(let t=0;t<r.length;t++)e=d0[(e^r[t])&255]^e>>>8;return e^-1},xx=Qx;var ex=s("crc-32",xx);var b0=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(b0=new Int32Array(b0));var vx=(r,x=-1)=>{let e=x===0?0:~~x;for(let t=0;t<r.length;t++)e=b0[(e^r[t])&255]^e>>>8;return e},rx=vx;var tx=s("jam",rx);var ix={crc1:N0,crc8:P0,crc81wire:$0,crc16:Y0,crc16ccitt:J0,crc16modbus:V0,crc16xmodem:q0,crc16kermit:Z0,crc24:v0,crc32:ex,crcjam:tx};var cx=r=>r.reduce((x,e)=>x+e.toString(16).padStart(2,"0"),""),fx=r=>{let x=new ArrayBuffer(4);return new DataView(x).setUint32(0,ix.crc32(h0.Buffer.from(r)),!1),h0.Buffer.from(x)};var O=class{constructor(x){this.bytes=x}static fromHex(x){return new O(Uint8Array.from(Buffer.from(x,"hex")))}static fromPrincipal({principal:x,subAccount:e=$.ZERO}){let t=xe(`
|
|
2
|
+
account-id`),i=nx.sha224.create();i.update([...t,...x.toUint8Array(),...e.toUint8Array()]);let c=new Uint8Array(i.array()),f=fx(c),n=new Uint8Array([...f,...c]);return new O(n)}toProto(){let x=new ax.AccountIdentifier;return x.setHash(this.bytes),x}toHex(){return cx(this.bytes)}toUint8Array(){return this.bytes}toNumbers(){return Array.from(this.bytes)}toAccountIdentifierHash(){return{hash:this.toUint8Array()}}},C=class{constructor(x){this.bytes=x}static fromBytes(x){return x.length!=32?Error("Subaccount length must be 32-bytes"):new C(x)}static fromPrincipal(x){let e=new Uint8Array(32).fill(0),t=x.toUint8Array();e[0]=t.length;for(let i=0;i<t.length;i++)e[1+i]=t[i];return new C(e)}static fromID(x){if(x<0||x>255)throw"Subaccount ID must be >= 0 and <= 255";let e=new Uint8Array(32).fill(0);return e[31]=x,new C(e)}toUint8Array(){return this.bytes}},$=C;u0($,"ZERO",C.fromID(0));export{s0 as a,y0 as b,w0 as c,e0 as d,cx as e,fx as f,O as g,$ as h};
|
|
3
3
|
/*!
|
|
4
4
|
* The buffer module from node.js, for the browser.
|
|
5
5
|
*
|
|
@@ -15,4 +15,4 @@ account-id`),i=ax.sha224.create();i.update([...t,...x.toUint8Array(),...e.toUint
|
|
|
15
15
|
* @copyright Chen, Yi-Cyuan 2014-2017
|
|
16
16
|
* @license MIT
|
|
17
17
|
*/
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-I4ASNREM.js.map
|